CMake: Set wxBUILD_CXX_STANDARD globally instead of only on targets
This way the tests in setup.cmake will use the correct c++ version.
This commit is contained in:
@@ -78,8 +78,6 @@ function(wx_set_common_target_properties target_name)
|
|||||||
cmake_parse_arguments(wxCOMMON_TARGET_PROPS "DEFAULT_WARNINGS" "" "" ${ARGN})
|
cmake_parse_arguments(wxCOMMON_TARGET_PROPS "DEFAULT_WARNINGS" "" "" ${ARGN})
|
||||||
|
|
||||||
if(DEFINED wxBUILD_CXX_STANDARD AND NOT wxBUILD_CXX_STANDARD STREQUAL COMPILER_DEFAULT)
|
if(DEFINED wxBUILD_CXX_STANDARD AND NOT wxBUILD_CXX_STANDARD STREQUAL COMPILER_DEFAULT)
|
||||||
# TODO: implement for older CMake versions ?
|
|
||||||
set_target_properties(${target_name} PROPERTIES CXX_STANDARD ${wxBUILD_CXX_STANDARD})
|
|
||||||
if(
|
if(
|
||||||
APPLE AND
|
APPLE AND
|
||||||
CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9 AND
|
CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9 AND
|
||||||
|
@@ -8,6 +8,10 @@
|
|||||||
# Licence: wxWindows licence
|
# Licence: wxWindows licence
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
|
if(DEFINED wxBUILD_CXX_STANDARD AND NOT wxBUILD_CXX_STANDARD STREQUAL COMPILER_DEFAULT)
|
||||||
|
set(CMAKE_CXX_STANDARD ${wxBUILD_CXX_STANDARD})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
# Determine MSVC runtime library flag
|
# Determine MSVC runtime library flag
|
||||||
set(MSVC_LIB_USE "/MD")
|
set(MSVC_LIB_USE "/MD")
|
||||||
|
Reference in New Issue
Block a user