mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Cleanup some cmake modifications
This commit is contained in:
parent
ad759ae4f7
commit
0aee6fd9b1
|
@ -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()
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user