mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Default the SelfTest project to C++11
Unlike the previous approach, this will still obey `-DCMAKE_CXX_STANDARD=X` properly.
This commit is contained in:
parent
c0d3a2e08f
commit
56d4510138
@ -308,6 +308,32 @@ include(CTest)
|
|||||||
add_executable(SelfTest ${TEST_SOURCES} ${IMPL_SOURCES} ${REPORTER_SOURCES} ${SURROGATE_SOURCES} ${HEADERS})
|
add_executable(SelfTest ${TEST_SOURCES} ${IMPL_SOURCES} ${REPORTER_SOURCES} ${SURROGATE_SOURCES} ${HEADERS})
|
||||||
target_include_directories(SelfTest PRIVATE ${HEADER_DIR})
|
target_include_directories(SelfTest PRIVATE ${HEADER_DIR})
|
||||||
|
|
||||||
|
# It took CMake until 3.8 to abandon the doomed approach of enumerating
|
||||||
|
# required features so we just list C++11 features to support older ones.
|
||||||
|
target_compile_features(SelfTest
|
||||||
|
PRIVATE
|
||||||
|
cxx_alignas
|
||||||
|
cxx_alignof
|
||||||
|
cxx_attributes
|
||||||
|
cxx_auto_type
|
||||||
|
cxx_constexpr
|
||||||
|
cxx_defaulted_functions
|
||||||
|
cxx_deleted_functions
|
||||||
|
cxx_final
|
||||||
|
cxx_lambdas
|
||||||
|
cxx_noexcept
|
||||||
|
cxx_override
|
||||||
|
cxx_range_for
|
||||||
|
cxx_rvalue_references
|
||||||
|
cxx_static_assert
|
||||||
|
cxx_strong_enums
|
||||||
|
cxx_trailing_return_types
|
||||||
|
cxx_unicode_literals
|
||||||
|
cxx_user_literals
|
||||||
|
cxx_variadic_macros
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if (CATCH_ENABLE_COVERAGE)
|
if (CATCH_ENABLE_COVERAGE)
|
||||||
set(ENABLE_COVERAGE ON CACHE BOOL "Enable coverage build." FORCE)
|
set(ENABLE_COVERAGE ON CACHE BOOL "Enable coverage build." FORCE)
|
||||||
find_package(codecov)
|
find_package(codecov)
|
||||||
|
Loading…
Reference in New Issue
Block a user