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:
authorDaan De Meyer <DaanDeMeyer@users.noreply.github.com>2019-05-04 10:12:44 +0300
committeronqtam <vik.kirilov@gmail.com>2019-05-06 11:44:36 +0300
commit3b324ceb752999e8c606dc8ddec8982659350d84 (patch)
treedf983e0d62b0cf6c4b5e1da283b96726c5833809 /CMakeLists.txt
parentaeccac95691689128ea8ca7e7b6acf11770d5dad (diff)
Explicitly specify the doctest_with_main C++ standard in CMake. (#231)
This fixes compilation issues on older compilers that don't default to C++11 yet.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 89b9b86e..bd5ca4ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,6 +49,9 @@ if(${DOCTEST_WITH_MAIN_IN_STATIC_LIB})
add_library(${PROJECT_NAME}_with_main STATIC EXCLUDE_FROM_ALL ${doctest_parts_folder}/doctest.cpp)
target_compile_definitions(${PROJECT_NAME}_with_main PRIVATE
DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN)
+ set_target_properties(${PROJECT_NAME}_with_main PROPERTIES
+ CXX_STANDARD 11
+ CXX_STANDARD_REQUIRED ON)
target_link_libraries(${PROJECT_NAME}_with_main PUBLIC ${PROJECT_NAME})
endif()