Skip to content

Commit 32db155

Browse files
committed
Cmake project changes
- Added installation - cpm fixes
1 parent 241513f commit 32db155

12 files changed

Lines changed: 398 additions & 169 deletions

File tree

CMakeLists.txt

Lines changed: 22 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
cmake_minimum_required(VERSION 3.30)
2-
project(pcre2cpp VERSION 1.2.4 LANGUAGES CXX)
2+
project(pcre2cpp VERSION 1.2.5 LANGUAGES CXX)
33

44
option(BUILD_SHARED_LIBS "Build shared library" OFF)
5-
option(PCRE2CPP_BUILD_TESTS "Build tests" OFF)
6-
option(PCRE2CPP_BUILD_BENCHMARK "Build benchmark" OFF)
7-
option(PCRE2CPP_BUILD_COVERAGE "Enable coverage reporting" OFF)
8-
option(PCRE2CPP_BUILD_DOCUMENTATION "Build documentation" OFF)
9-
option(PCRE2CPP_ENABLE_CLANG_TIDY "Enables clang-tidy checks" OFF)
5+
option(PCRE2CPP_BUILD_TESTS "Build tests" ${PROJECT_IS_TOP_LEVEL})
6+
option(PCRE2CPP_BUILD_BENCHMARK "Build benchmark" ${PROJECT_IS_TOP_LEVEL})
7+
option(PCRE2CPP_BUILD_COVERAGE "Enable coverage reporting" ${PROJECT_IS_TOP_LEVEL})
8+
option(PCRE2CPP_BUILD_DOCUMENTATION "Build documentation" ${PROJECT_IS_TOP_LEVEL})
109

11-
option(PCRE2CPP_USE_EXTERNAL_MSTD "Uses users own mstd library (tested and compatible with: 1.5.0)" OFF)
12-
option(PCRE2CPP_USE_EXTERNAL_PCRE2 "Uses users own pcre2 library (tested and compatible with: 10.47)" OFF)
10+
option(PCRE2CPP_ENABLE_CLANG_TIDY "Enables clang-tidy checks" ${PROJECT_IS_TOP_LEVEL})
11+
12+
option(PCRE2CPP_INSTALL "Enables installation of this project" ${PROJECT_IS_TOP_LEVEL})
13+
option(PCRE2CPP_INSTALL_TEST "This is only to test if installation of pcre2cpp works" OFF)
14+
15+
option(PCRE2CPP_MSTD_EXTERNAL "Uses users own mstd library (tested and compatible with: 1.5.2)" OFF)
16+
option(PCRE2CPP_PCRE2_EXTERNAL "Uses users own pcre2 library (tested and compatible with: 10.47)" OFF)
1317

1418
option(PCRE2CPP_ENABLE_CXX20 "Enables C++20 features" OFF)
1519
option(PCRE2CPP_DISABLE_ASSERT_ON_RELEASE "Disables assert on release builds" OFF)
@@ -26,19 +30,27 @@ message(STATUS "PCRE2CPP_DISABLE_UTF16: ${PCRE2CPP_DISABLE_UTF16}")
2630
message(STATUS "PCRE2CPP_DISABLE_UTF32: ${PCRE2CPP_DISABLE_UTF32}")
2731

2832
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/third_party.cmake)
33+
2934
if (PCRE2CPP_ENABLE_CLANG_TIDY)
3035
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/clang_tidy.cmake)
3136
endif()
37+
3238
if (PCRE2CPP_BUILD_DOCUMENTATION)
3339
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/doxygen.cmake)
3440
endif()
3541

36-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/pcre2cpp)
42+
if (NOT PCRE2CPP_INSTALL_TEST)
43+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/pcre2cpp)
44+
endif()
3745

3846
if (PCRE2CPP_BUILD_TESTS OR PCRE2CPP_BUILD_COVERAGE)
3947
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tests)
4048
endif()
4149

50+
if (PCRE2CPP_BUILD_COVERAGE OR PCRE2CPP_BUILD_BENCHMARK)
51+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/benchmark)
52+
endif()
53+
4254
if (PCRE2CPP_BUILD_COVERAGE)
4355
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/coverage_report.cmake)
4456

@@ -48,40 +60,4 @@ if (PCRE2CPP_BUILD_COVERAGE)
4860
OUTPUT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/coverage_report
4961
CLEAN_TEMP
5062
)
51-
endif()
52-
53-
if (PCRE2CPP_BUILD_BENCHMARK)
54-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/benchmark)
55-
endif()
56-
57-
# TODO: zrob install cos nie dziala z TARGETS pcre2-8
58-
59-
# library installation
60-
#set(PROJECT_CONFIG_FILE ${PROJECT_NAME}-config)
61-
#install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_CONFIG_FILE}
62-
# LIBRARY DESTINATION lib
63-
# ARCHIVE DESTINATION lib
64-
# RUNTIME DESTINATION bin
65-
# INCLUDES DESTINATION ${INSTALL_HEADERS_PATH}
66-
#)
67-
68-
#install(DIRECTORY ${BUILD_HEADERS_PATH}/ DESTINATION ${INSTALL_HEADERS_PATH})
69-
#install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-targets)
70-
71-
# export cmake config
72-
#install(EXPORT ${PROJECT_CONFIG_FILE} DESTINATION cmake/${PROJECT_NAME} NAMESPACE ${PROJECT_NAMESPACE})
73-
#export(EXPORT ${PROJECT_CONFIG_FILE} NAMESPACE ${PROJECT_NAMESPACE})
74-
75-
# configuration version file
76-
#set(PROJECT_CONFIG_VERSION_FILE ${PROJECT_CONFIG_FILE}-version.cmake)
77-
#include(CMakePackageConfigHelpers)
78-
#write_basic_package_version_file(
79-
# "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_CONFIG_VERSION_FILE}"
80-
# VERSION ${PROJECT_VERSION}
81-
# COMPATIBILITY AnyNewerVersion
82-
#)
83-
84-
#install(FILES
85-
# "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_CONFIG_VERSION_FILE}"
86-
# DESTINATION cmake/${PROJECT_NAME}
87-
#)
63+
endif()

CMakePresets.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"CMAKE_CXX_STANDARD_REQUIRED": "ON",
1010
"CMAKE_CXX_EXTENSIONS": "OFF",
1111
"BUILD_SHARED_LIBS": "OFF",
12+
"PCRE2CPP_INSTALL_TEST": "OFF",
1213
"PCRE2CPP_DISABLE_UTF8": "OFF",
1314
"PCRE2CPP_DISABLE_UTF16": "OFF",
1415
"PCRE2CPP_DISABLE_UTF32": "OFF",

README.md

Lines changed: 62 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# pcre2cpp
22

3-
**pcre2cpp** is a C++ wrapper for the PCRE2 (Perl Compatible Regular Expressions) library written in C. It provides an object-oriented interface for the original PCRE2 library, while maintaining the same functionality and behavior. [DOCS](https://maipa01.github.io/pcre2cpp/html)
3+
**pcre2cpp** is a C++ wrapper for the PCRE2 (Perl Compatible Regular Expressions) library written in C. It provides an
4+
object-oriented interface for the original PCRE2 library, while maintaining the same functionality and
5+
behavior. [DOCS](https://maipa01.github.io/pcre2cpp/html "Documentation")
46

57
## Features
68

79
- Object-oriented interface to PCRE2 10.47.
8-
- Compatible with C++17 and C++20.
10+
- Compatible with C++17 and newer.
911
- Easy to use regular expression matching with built-in result capturing.
1012

1113
## Requirements
@@ -15,18 +17,46 @@
1517

1618
## Options
1719

18-
| CMAKE Option / #define | Description | Default |
19-
|:------------------------------------------|:-----------------------------------------------|:-------:|
20-
| **PCRE2CPP_ENABLE_CXX20** | Enables C++20 features | OFF |
21-
| **PCRE2CPP_DISABLE_ASSERT_ON_RELEASE** | Disables assert on release builds | OFF |
22-
| **PCRE2CPP_CHANGE_ASSERTS_TO_EXCEPTIONS** | Changes every assert to exceptions in pcre2cpp | OFF |
23-
| **PCRE2CPP_DISABLE_UTF8** | Disables UTF-8 support | OFF |
24-
| **PCRE2CPP_DISABLE_UTF16** | Disables UTF-16 support | OFF |
25-
| **PCRE2CPP_DISABLE_UTF32** | Disables UTF-32 support | OFF |
20+
### Compilation defines options
21+
22+
You can enable option using `#define option_name` or use cmake `set(option_name ON CACHE BOOL)`
23+
24+
| Cmake option/C++ define Name | Description | Default |
25+
|:----------------------------------------|:-----------------------------------------------|:-------:|
26+
| `PCRE2CPP_ENABLE_CXX20` | Enables C++20 features | OFF |
27+
| `PCRE2CPP_DISABLE_ASSERT_ON_RELEASE` | Disables assert on release builds | OFF |
28+
| `PCRE2CPP_CHANGE_ASSERTS_TO_EXCEPTIONS` | Changes every assert to exceptions in pcre2cpp | OFF |
29+
| `PCRE2CPP_DISABLE_UTF8` | Disables UTF-8 support | OFF |
30+
| `PCRE2CPP_DISABLE_UTF16` | Disables UTF-16 support | OFF |
31+
| `PCRE2CPP_DISABLE_UTF32` | Disables UTF-32 support | OFF |
32+
33+
### External libraries options
34+
35+
If you want to use external libraries not installed by project using CPM
36+
37+
| Cmake option Name | Description | Default |
38+
|:--------------------------|:-----------------------------------------------------------------|:-------:|
39+
| `PCRE2CPP_MSTD_EXTERNAL` | Uses users own mstd library (tested and compatible with: 1.5.2) | OFF |
40+
| `PCRE2CPP_PCRE2_EXTERNAL` | Uses users own pcre2 library (tested and compatible with: 10.47) | OFF |
41+
42+
### Project developing options
43+
44+
These options are used while testing or changing code in project
45+
46+
| Cmake option Name | Description | Default |
47+
|:-------------------------------|:-------------------------------------------------------|:-------------------------:|
48+
| `PCRE2CPP_BUILD_TESTS` | Build tests | `${PROJECT_IS_TOP_LEVEL}` |
49+
| `PCRE2CPP_BUILD_BENCHMARK` | Build benchmark | `${PROJECT_IS_TOP_LEVEL}` |
50+
| `PCRE2CPP_BUILD_COVERAGE` | Enable coverage reporting | `${PROJECT_IS_TOP_LEVEL}` |
51+
| `PCRE2CPP_BUILD_DOCUMENTATION` | Build documentation | `${PROJECT_IS_TOP_LEVEL}` |
52+
| `PCRE2CPP_ENABLE_CLANG_TIDY` | Enables clang-tidy checks | `${PROJECT_IS_TOP_LEVEL}` |
53+
| `PCRE2CPP_INSTALL` | Enables installation of this project | `${PROJECT_IS_TOP_LEVEL}` |
54+
| `PCRE2CPP_INSTALL_TEST` | This is only to test if installation of pcre2cpp works | OFF |
2655

2756
## Benchmarks
2857

2958
### Compilation (10,000 iterations)
59+
3060
| No. | std::regex (ms) | PCRE2 (ms) | pcre2cpp (ms) |
3161
|:--------|:---------------:|:-----------:|:-------------:|
3262
| **1.** | 72,9598 | **16,1092** | 18,5241 |
@@ -47,6 +77,7 @@
4777
| **pcre2cpp** | 18,3117 | - | 0,0018 | - |
4878

4979
### Match (10,000 iterations)
80+
5081
| No. | std::regex (ms) | PCRE2 (ms) | pcre2cpp (ms) |
5182
|:--------|:---------------:|:----------:|:-------------:|
5283
| **1.** | 200,0510 | **7,6231** | 7,6295 |
@@ -67,6 +98,7 @@
6798
| **pcre2cpp** | 7,9713 | - | **0,0008** | - |
6899

69100
### Match with all results (10,000 iterations)
101+
70102
| No. | std::regex (ms) | PCRE2 (ms) | pcre2cpp (ms) |
71103
|:--------|:---------------:|:-----------:|:-------------:|
72104
| **1.** | 200,0060 | **9,7453** | 11,9927 |
@@ -88,16 +120,22 @@
88120

89121
## Installation
90122

91-
To use **pcre2cpp**, simply download the latest release. There are no additional dependencies required.
123+
After installing, you can use `find_package(pcre2cpp)`.
92124

93-
1. Download the latest release of **pcre2cpp**.
94-
2. Link the `pcre2cpp` library statically in your build system (e.g., `CMake` or `Make`).
125+
### Components
95126

96-
Example for linking in `CMake`:
97-
```cmake
98-
find_package(pcre2cpp REQUIRED)
99-
target_link_libraries(your_project_name PRIVATE pcre2cpp)
100-
```
127+
You can also include components `find_pcakage(pcre2cpp COMPONENTS comp)`. They work the same way
128+
as [Compilation defines options](#compilation-defines-options), but
129+
they provide separate components you need to include.
130+
131+
| Component Name | Option | Target Name |
132+
|:---------------------|:----------------------------------------|:-------------------------------|
133+
| CXX20 | `PCRE2CPP_ENABLE_CXX20` | pcre2cpp::CXX20 |
134+
| NO_ASSERT_ON_RELEASE | `PCRE2CPP_DISABLE_ASSERT_ON_RELEASE` | pcre2cpp::NO_ASSERT_ON_RELEASE |
135+
| EXCEPTIONS | `PCRE2CPP_CHANGE_ASSERTS_TO_EXCEPTIONS` | pcre2cpp::EXCEPTIONS |
136+
| NO_UTF8 | `PCRE2CPP_DISABLE_UTF8` | pcre2cpp::NO_UTF8 |
137+
| NO_UTF16 | `PCRE2CPP_DISABLE_UTF16` | pcre2cpp::NO_UTF16 |
138+
| NO_UTF32 | `PCRE2CPP_DISABLE_UTF32` | pcre2cpp::NO_UTF32 |
101139

102140
## Example Usage
103141

@@ -293,12 +331,15 @@ int main() {
293331
```
294332

295333
## Offsets Graph
296-
![offsets graph](PCRE2CPPResult.png "Title")
334+
335+
![offsets graph](PCRE2CPPResult.png "Offsets Graph")
297336

298337
## License
299338

300-
This project is licensed under the **BSD 3-Clause License with Attribution Requirement**. For more details, check the [LICENSE](./LICENSE) file.
339+
This project is licensed under the **BSD 3-Clause License with Attribution Requirement**. For more details, check
340+
the [LICENSE](./LICENSE "License") file.
301341

302342
## Acknowledgments
303343

304-
This project includes code from the [PCRE2 library](https://github.com/PhilipHazel/pcre2), distributed under the BSD License.
344+
This project includes code from the [PCRE2 library](https://github.com/PhilipHazel/pcre2 "PCRE2 github repo"), distributed under the BSD
345+
License.

benchmark/CMakeLists.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
1-
project(pcre2cpp-benchmark VERSION 1.2.4 LANGUAGES CXX)
1+
project(pcre2cpp-benchmark VERSION 1.2.5 LANGUAGES CXX)
22

33
# source files
44
set(PROJECT_TEST_SOURCES ${PROJECT_NAME}_TEST_SOURCES)
55
file(GLOB_RECURSE ${PROJECT_TEST_SOURCES} CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
66

7+
# region INSTALL_TESTING
8+
if (PCRE2CPP_INSTALL_TEST)
9+
message(STATUS TESTING_INSTALL)
10+
11+
find_package(pcre2cpp REQUIRED
12+
HINTS "${CMAKE_SOURCE_DIR}/dist"
13+
COMPONENTS CXX20
14+
)
15+
16+
add_library(pcre2cpp::all INTERFACE IMPORTED)
17+
target_link_libraries(pcre2cpp::all INTERFACE pcre2cpp::pcre2cpp pcre2cpp::CXX20)
18+
endif()
19+
# endregion
20+
721
# make exec
822
add_executable(${PROJECT_NAME} ${${PROJECT_TEST_SOURCES}})
923

10-
target_link_libraries(${PROJECT_NAME} PRIVATE pcre2cpp)
24+
target_link_libraries(${PROJECT_NAME} PRIVATE $<IF:$<BOOL:${PCRE2CPP_INSTALL_TEST}>, pcre2cpp::all, pcre2cpp::pcre2cpp>)
1125

1226
# Konfiguracja PCH
1327
target_precompile_headers(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/pch.hpp")

cmake/coverage_report.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ function(setup_coverage_report)
8181
foreach(TARGET_NAME ${EXE_TARGETS})
8282
# GET BINARY_DIR OF TARGET
8383
get_target_property(TARGET_BINARY_DIR ${TARGET_NAME} BINARY_DIR)
84+
8485
# GET EXE FILE
8586
set(EXE_FILE "$<TARGET_FILE:${TARGET_NAME}>")
8687

@@ -118,7 +119,7 @@ function(setup_coverage_report)
118119
set(TEST_FILES_REGEX ".*[\\\\\\\/]${TEST_TARGET_SOURCE_DIR}[\\\\\\\/].*")
119120

120121
add_custom_command(TARGET ${COVERAGE_TARGET_NAME} POST_BUILD
121-
COMMAND ${LLVM_COV} show ${TEST_EXE}
122+
COMMAND ${LLVM_COV} show ${TARGETS_EXECS}
122123
-instr-profile=${PROFDATA_FILE}
123124
-format=${COVERAGE_FORMAT}
124125
-output-dir=${COVERAGE_OUTPUT_DIR}

cmake/get_cpm.cmake

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
set(CPM_USE_LOCAL_PACKAGES OFF)
2+
# Storage location
3+
if(NOT CPM_SOURCE_CACHE)
4+
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/third_party)
5+
endif()
6+
7+
# Set download location
8+
if(NOT CPM_DOWNLOAD_LOCATION)
9+
set(CPM_DOWNLOAD_LOCATION "${CMAKE_SOURCE_DIR}/third_party/cpm/CPM.cmake")
10+
endif()
11+
12+
# download CPM.cmake
13+
# Expand relative path. This is important if the provided path contains a tilde (~)
14+
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
15+
if(NOT EXISTS ${CPM_DOWNLOAD_LOCATION})
16+
message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}")
17+
file(DOWNLOAD
18+
https://github.com/cpm-cmake/CPM.cmake/releases/latest/download/CPM.cmake
19+
${CPM_DOWNLOAD_LOCATION}
20+
)
21+
endif()
22+
message(STATUS "Include CPM.cmake from ${CPM_DOWNLOAD_LOCATION}")
23+
include(${CPM_DOWNLOAD_LOCATION})

cmake/pcre2cppConfig.cmake.in

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
@PACKAGE_INIT@
2+
3+
include(CMakeFindDependencyMacro)
4+
5+
find_dependency(pcre2 REQUIRED)
6+
if(pcre2_FOUND)
7+
add_library(@PROJECT_NAMESPACE@pcre2-8_imported INTERFACE IMPORTED)
8+
if(TARGET pcre2-8)
9+
target_link_libraries(@PROJECT_NAMESPACE@pcre2-8_imported INTERFACE pcre2-8)
10+
else()
11+
target_compile_definitions(@PROJECT_NAMESPACE@pcre2-8_imported INTERFACE PCRE2CPP_DISABLE_UTF8)
12+
endif()
13+
14+
add_library(@PROJECT_NAMESPACE@pcre2-16_imported INTERFACE IMPORTED)
15+
if(TARGET pcre2-16)
16+
target_link_libraries(@PROJECT_NAMESPACE@pcre2-16_imported INTERFACE pcre2-16)
17+
else()
18+
target_compile_definitions(@PROJECT_NAMESPACE@pcre2-16_imported INTERFACE PCRE2CPP_DISABLE_UTF16)
19+
endif()
20+
21+
add_library(@PROJECT_NAMESPACE@pcre2-32_imported INTERFACE IMPORTED)
22+
if(TARGET pcre2-32)
23+
target_link_libraries(@PROJECT_NAMESPACE@pcre2-32_imported INTERFACE pcre2-32)
24+
else()
25+
target_compile_definitions(@PROJECT_NAMESPACE@pcre2-32_imported INTERFACE PCRE2CPP_DISABLE_UTF32)
26+
endif()
27+
endif()
28+
29+
find_dependency(mstd REQUIRED)
30+
if(mstd_FOUND AND NOT TARGET @PROJECT_NAMESPACE@mstd_imported)
31+
add_library(@PROJECT_NAMESPACE@mstd_imported INTERFACE IMPORTED)
32+
target_link_libraries(@PROJECT_NAMESPACE@mstd_imported INTERFACE mstd::mstd)
33+
endif()
34+
35+
set_and_check(@PROJECT_NAME@_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
36+
set(@PROJECT_NAME@_PCH_PATH "${@PROJECT_NAME@_INCLUDE_DIR}/@PROJECT_NAME@/pch.hpp")
37+
38+
if(NOT TARGET @PROJECT_NAMESPACE@@PROJECT_NAME@)
39+
include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake)
40+
endif()
41+
42+
set(@PROJECT_NAME@_components NO_UTF8 NO_UTF16 NO_UTF32 CXX20 NO_ASSERT_ON_RELEASE EXCEPTIONS)
43+
44+
foreach(comp ${@PROJECT_NAME@_FIND_COMPONENTS})
45+
if (NOT comp IN_LIST @PROJECT_NAME@_components)
46+
set(@PROJECT_NAME@_NOT_FOUND_MESSAGE "Unsupported components: ${comp}")
47+
set(@PROJECT_NAME@_FOUND FALSE)
48+
break()
49+
endif()
50+
51+
set(comp_target "@PROJECT_NAMESPACE@${comp}")
52+
53+
if(NOT TARGET ${comp_target})
54+
add_library(${comp_target} INTERFACE IMPORTED)
55+
56+
if (comp STREQUAL "NO_UTF8")
57+
target_compile_definitions(${comp_target} INTERFACE PCRE2CPP_DISABLE_UTF8)
58+
elseif(comp STREQUAL "NO_UTF16")
59+
target_compile_definitions(${comp_target} INTERFACE PCRE2CPP_DISABLE_UTF16)
60+
elseif(comp STREQUAL "UTF32")
61+
target_compile_definitions(${comp_target} INTERFACE PCRE2CPP_DISABLE_UTF32)
62+
elseif(comp STREQUAL "CXX20")
63+
target_compile_definitions(${comp_target} INTERFACE PCRE2CPP_ENABLE_CXX20 MSTD_ENABLE_CXX20)
64+
set_target_properties(${comp_target} PROPERTIES
65+
INTERFACE_COMPILE_FEATURES cxx_std_20
66+
)
67+
elseif(comp STREQUAL "NO_ASSERT_ON_RELEASE")
68+
target_compile_definitions(${comp_target} INTERFACE PCRE2CPP_DISABLE_ASSERT_ON_RELEASE MSTD_DISABLE_ASSERT_ON_RELEASE)
69+
elseif(comp STREQUAL "EXCEPTIONS")
70+
set_target_properties(${comp_target} PROPERTIES
71+
INTERFACE_COMPILE_DEFINITIONS PCRE2CPP_CHANGE_ASSERTS_TO_EXCEPTIONS
72+
)
73+
endif()
74+
endif()
75+
endforeach()

0 commit comments

Comments
 (0)