cxx_std_14 and co aren't available until cmake v3.8

This commit is contained in:
Crzyrndm 2018-07-16 18:52:21 +12:00
parent 5671167d1d
commit b9b47672ea
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.1)
project(xlnt VERSION 1.2)
set(CMAKE_CXX_STANDARD ${XLNT_CXX_LANG})
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CXX_EXTENSIONS OFF)
# Project metadata
@ -152,7 +154,7 @@ else()
target_compile_definitions(xlnt PUBLIC XLNT_STATIC=1)
endif()
target_compile_features(xlnt PUBLIC cxx_std_${XLNT_CXX_LANG})
#target_compile_features(xlnt PUBLIC cxx_std_${XLNT_CXX_LANG})
# Includes
target_include_directories(xlnt PUBLIC ${XLNT_INCLUDE_DIR})

View File

@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.1)
project(xlnt.test)
set(CMAKE_CXX_STANDARD ${XLNT_CXX_LANG})
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CXX_EXTENSIONS OFF)
if(NOT COMBINED_PROJECT)
@ -46,7 +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})
target_compile_features(xlnt.test PRIVATE cxx_std_${XLNT_CXX_LANG})
#target_compile_features(xlnt.test PRIVATE cxx_std_${XLNT_CXX_LANG})
if(MSVC)
# bigobj because there are so many headers in one source file