build_system: make ENTT_CXX_STD a cached string variable (not used yet, see #751)

This commit is contained in:
Michele Caini
2021-08-01 10:47:14 +02:00
parent 461865bf3b
commit d63f9e1eff
2 changed files with 2 additions and 0 deletions

View File

@@ -175,6 +175,7 @@ if(ENTT_BUILD_TESTING)
option(ENTT_BUILD_SNAPSHOT "Build snapshot test with Cereal." OFF)
set(ENTT_ID_TYPE std::uint32_t CACHE STRING "Type of identifiers to use for the tests")
set(ENTT_CXX_STD cxx_std_17 CACHE STRING "C++ standard revision to use for the tests")
include(CTest)
enable_testing()

View File

@@ -38,6 +38,7 @@ add_compile_options($<TARGET_PROPERTY:EnTT,INTERFACE_COMPILE_OPTIONS>)
function(SETUP_TARGET TARGET_NAME)
set_target_properties(${TARGET_NAME} PROPERTIES CXX_EXTENSIONS OFF)
target_compile_features(${TARGET_NAME} PRIVATE ${ENTT_CXX_STD})
target_link_libraries(${TARGET_NAME} PRIVATE EnTT)
if(MSVC)