diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c4a8d65..d2a50996 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,14 +8,14 @@ set(COMBINED_PROJECT TRUE) option(STATIC "Set to ON to build xlnt as a static library instead of a shared library" OFF) # c++ language standard to use -set(XLNT_LANGS 11 14 17) +set(XLNT_VALID_LANGS 11 14 17) set(XLNT_CXX_LANG "14" CACHE STRING "c++ language features to compile with") # enumerate allowed values for cmake gui -set_property(CACHE XLNT_CXX_LANG PROPERTY STRINGS ${XLNT_LANGS}) -# validate value is in XLNT_LANGS -list(FIND XLNT_LANGS ${XLNT_CXX_LANG} index) +set_property(CACHE XLNT_CXX_LANG PROPERTY STRINGS ${XLNT_VALID_LANGS}) +# validate value is in XLNT_VALID_LANGS +list(FIND XLNT_VALID_LANGS ${XLNT_CXX_LANG} index) if(index EQUAL -1) - message(FATAL_ERROR "XLNT_CXX_LANG must be one of ${XLNT_LANGS}") + message(FATAL_ERROR "XLNT_CXX_LANG must be one of ${XLNT_VALID_LANGS}") endif() diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 90568121..2ea048d3 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -154,6 +154,7 @@ else() target_compile_definitions(xlnt PUBLIC XLNT_STATIC=1) endif() +# requires cmake 3.8+ #target_compile_features(xlnt PUBLIC cxx_std_${XLNT_CXX_LANG}) # Includes diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d6b9361b..74c24352 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -48,6 +48,7 @@ target_include_directories(xlnt.test set(XLNT_TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data) target_compile_definitions(xlnt.test PRIVATE XLNT_TEST_DATA_DIR=${XLNT_TEST_DATA_DIR}) +# requires cmake 3.8+ #target_compile_features(xlnt.test PRIVATE cxx_std_${XLNT_CXX_LANG}) if(MSVC)