mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-22 11:23:29 +01:00
Don't set C++ standard in CMakeLists for tests
This commit is contained in:
parent
b56c474260
commit
82cec69e93
@ -54,8 +54,6 @@ set(ALL_EXAMPLE_TARGETS
|
||||
|
||||
foreach( name ${ALL_EXAMPLE_TARGETS} )
|
||||
target_link_libraries( ${name} Catch2 Catch2WithMain )
|
||||
set_property(TARGET ${name} PROPERTY CXX_STANDARD 14)
|
||||
set_property(TARGET ${name} PROPERTY CXX_EXTENSIONS OFF)
|
||||
endforeach()
|
||||
|
||||
|
||||
|
@ -242,9 +242,6 @@ set_tests_properties(
|
||||
if (MSVC)
|
||||
# This test fails if it does not compile and succeeds otherwise
|
||||
add_executable(WindowsHeader ${TESTS_DIR}/X90-WindowsHeaderInclusion.cpp)
|
||||
set_property( TARGET WindowsHeader PROPERTY CXX_STANDARD 14 )
|
||||
set_property( TARGET WindowsHeader PROPERTY CXX_STANDARD_REQUIRED ON )
|
||||
set_property( TARGET WindowsHeader PROPERTY CXX_EXTENSIONS OFF )
|
||||
target_link_libraries( WindowsHeader Catch2WithMain )
|
||||
add_test(NAME WindowsHeader COMMAND WindowsHeader -r compact)
|
||||
list(APPEND CATCH_WARNING_TARGETS ${EXTRA_TEST_BINARIES} WindowsHeader)
|
||||
@ -514,13 +511,6 @@ set( EXTRA_TEST_BINARIES
|
||||
# DebugBreakMacros
|
||||
)
|
||||
|
||||
# Shared config
|
||||
foreach( test ${EXTRA_TEST_BINARIES} )
|
||||
set_property( TARGET ${test} PROPERTY CXX_STANDARD 14 )
|
||||
set_property( TARGET ${test} PROPERTY CXX_STANDARD_REQUIRED ON )
|
||||
set_property( TARGET ${test} PROPERTY CXX_EXTENSIONS OFF )
|
||||
endforeach()
|
||||
|
||||
# Notice that we are modifying EXTRA_TEST_BINARIES destructively, do not
|
||||
# use it after this point!
|
||||
list(FILTER EXTRA_TEST_BINARIES EXCLUDE REGEX "DisabledExceptions.*")
|
||||
@ -537,9 +527,6 @@ add_executable(AmalgamatedTestCompilation
|
||||
${CATCH_DIR}/extras/catch_amalgamated.cpp
|
||||
)
|
||||
target_include_directories(AmalgamatedTestCompilation PRIVATE ${CATCH_DIR}/extras)
|
||||
set_property( TARGET AmalgamatedTestCompilation PROPERTY CXX_STANDARD 14 )
|
||||
set_property( TARGET AmalgamatedTestCompilation PROPERTY CXX_STANDARD_REQUIRED ON )
|
||||
set_property( TARGET AmalgamatedTestCompilation PROPERTY CXX_EXTENSIONS OFF )
|
||||
|
||||
add_test(NAME AmalgamatedFileTest COMMAND AmalgamatedTestCompilation)
|
||||
set_tests_properties(
|
||||
|
Loading…
Reference in New Issue
Block a user