Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/onqtam/doctest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoravostrik <avostrik@users.noreply.github.com>2020-09-04 17:49:49 +0300
committerGitHub <noreply@github.com>2020-09-04 17:49:49 +0300
commit51e4a0dcaff8fca65c0907c551d73c5f5c880c94 (patch)
treef39916ef18ed77d7a801240bd9af3b2d551c4930 /CMakeLists.txt
parentdc6a18918b2dbfef9c765c26f289708cde3cf2aa (diff)
Add option to build with std headers. (#416)
If doctest forward declaration differs from standard library implementation in cross-compilation SDK build of doctest for the target fails. Signed-off-by: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1c31daa2..c26ed7d3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,7 @@ project(doctest VERSION ${ver} LANGUAGES CXX)
option(DOCTEST_WITH_TESTS "Build tests/examples" ON)
option(DOCTEST_WITH_MAIN_IN_STATIC_LIB "Build a static lib (cmake target) with a default main entry point" ON)
option(DOCTEST_NO_INSTALL "Skip the installation process" OFF)
+option(DOCTEST_USE_STD_HEADERS "Use std headers" OFF)
add_library(${PROJECT_NAME} INTERFACE)
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
@@ -50,6 +51,10 @@ if(DEFINED DOCTEST_THREAD_LOCAL)
DOCTEST_THREAD_LOCAL=${DOCTEST_THREAD_LOCAL})
endif()
+if(DOCTEST_USE_STD_HEADERS)
+ target_compile_definitions(${PROJECT_NAME} INTERFACE DOCTEST_CONFIG_USE_STD_HEADERS)
+endif()
+
################################################################################
## TESTS/EXAMPLES/HELPERS
################################################################################