Don't set C++ standard in CMakeLists for tests

This commit is contained in:
Martin Hořeňovský 2022-10-28 16:01:51 +02:00
parent b56c474260
commit 82cec69e93
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
2 changed files with 0 additions and 15 deletions

View File

@ -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()

View File

@ -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(