diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 8 | ||||
-rw-r--r-- | Modules/CMakeParseImplicitLinkInfo.cmake | 10 | ||||
-rw-r--r-- | Modules/CPackRPM.cmake | 8 | ||||
-rw-r--r-- | Modules/Compiler/Intel-CXX-FeatureTests.cmake | 4 | ||||
-rw-r--r-- | Modules/Compiler/SDCC-C-DetermineCompiler.cmake | 10 | ||||
-rw-r--r-- | Modules/ExternalProject.cmake | 5 | ||||
-rw-r--r-- | Modules/FindBoost.cmake | 1 | ||||
-rw-r--r-- | Modules/FindwxWidgets.cmake | 2 | ||||
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 26 |
9 files changed, 52 insertions, 22 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index bb34de5..c41a986 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -269,7 +269,13 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} set(id_toolset "") endif() if("${lang}" STREQUAL "Swift") - set(id_lang_version "SWIFT_VERSION = 2.3;") + if(CMAKE_Swift_LANGUAGE_VERSION) + set(id_lang_version "SWIFT_VERSION = ${CMAKE_Swift_LANGUAGE_VERSION};") + elseif(XCODE_VERSION VERSION_GREATER_EQUAL 8.3) + set(id_lang_version "SWIFT_VERSION = 3.0;") + else() + set(id_lang_version "SWIFT_VERSION = 2.3;") + endif() else() set(id_lang_version "") endif() diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index 3469d34..3273443 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -49,8 +49,12 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj if("${cmd}" MATCHES "${linker_regex}") string(APPEND log " link line: [${line}]\n") string(REGEX REPLACE ";-([LYz]);" ";-\\1" args "${args}") + set(skip_value_of "") foreach(arg IN LISTS args) - if("${arg}" MATCHES "^-L(.:)?[/\\]") + if(skip_value_of) + string(APPEND log " arg [${arg}] ==> skip value of ${skip_value_of}\n") + set(skip_value_of "") + elseif("${arg}" MATCHES "^-L(.:)?[/\\]") # Unix search path. string(REGEX REPLACE "^-L" "" dir "${arg}") list(APPEND implicit_dirs_tmp ${dir}) @@ -66,6 +70,10 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj set(lib "${CMAKE_MATCH_1}") list(APPEND implicit_libs_tmp ${lib}) string(APPEND log " arg [${arg}] ==> lib [${lib}]\n") + elseif("${arg}" STREQUAL "-lto_library") + # ld argument "-lto_library <path>" + set(skip_value_of "${arg}") + string(APPEND log " arg [${arg}] ==> ignore, skip following value\n") elseif("${arg}" MATCHES "^-l([^:].*)$") # Unix library. set(lib "${CMAKE_MATCH_1}") diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 87fa9dd..e905bc6 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -721,14 +721,6 @@ # Debuginfo packages contain debug symbols and sources for debugging packaged # binaries. # -# .. note:: -# -# Currently multiple debuginfo packages are generated if component based -# packaging is used - one debuginfo package per component. This duplicates -# sources if multiple binaries are using them. This is a side effect of -# how CPackRPM currently generates component packages and will be addressed -# in later versions of the generator. -# # Debuginfo RPM packaging has it's own set of variables: # # .. variable:: CPACK_RPM_DEBUGINFO_PACKAGE diff --git a/Modules/Compiler/Intel-CXX-FeatureTests.cmake b/Modules/Compiler/Intel-CXX-FeatureTests.cmake index e370647..929a7c6 100644 --- a/Modules/Compiler/Intel-CXX-FeatureTests.cmake +++ b/Modules/Compiler/Intel-CXX-FeatureTests.cmake @@ -13,7 +13,6 @@ # - __cpp_variadic_templates 200704 set(_cmake_feature_test_cxx_variable_templates "__cpp_variable_templates >= 201304") -set(_cmake_feature_test_cxx_relaxed_constexpr "__cpp_constexpr >= 201304") set(_cmake_oldestSupported "__INTEL_COMPILER >= 1210") set(DETECT_CXX11 "((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__))") @@ -24,6 +23,9 @@ set(DETECT_BUGGY_ICC15 "((__INTEL_COMPILER == 1500) && (__INTEL_COMPILER_UPDATE set(DETECT_CXX14 "((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !defined(__INTEL_CXX11_MODE__)) || ((${DETECT_BUGGY_ICC15}) && defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(__INTEL_CXX11_MODE__) ) || (defined(__INTEL_CXX11_MODE__) && defined(__cpp_aggregate_nsdmi)) )") unset(DETECT_BUGGY_ICC15) +set(Intel17_CXX14 "__INTEL_COMPILER >= 1700 && ${DETECT_CXX14}") +set(_cmake_feature_test_cxx_relaxed_constexpr "__cpp_constexpr >= 201304 || (${Intel17_CXX14} && !defined(_MSC_VER))") + set(Intel16_CXX14 "__INTEL_COMPILER >= 1600 && ${DETECT_CXX14}") set(_cmake_feature_test_cxx_aggregate_default_initializers "${Intel16_CXX14}") set(_cmake_feature_test_cxx_contextual_conversions "${Intel16_CXX14}") diff --git a/Modules/Compiler/SDCC-C-DetermineCompiler.cmake b/Modules/Compiler/SDCC-C-DetermineCompiler.cmake index 1d7dd78..4c70c5e 100644 --- a/Modules/Compiler/SDCC-C-DetermineCompiler.cmake +++ b/Modules/Compiler/SDCC-C-DetermineCompiler.cmake @@ -1,10 +1,16 @@ # sdcc, the small devices C compiler for embedded systems, # http://sdcc.sourceforge.net */ -set(_compiler_id_pp_test "defined(SDCC)") +set(_compiler_id_pp_test "defined(__SDCC_VERSION_MAJOR) || defined(SDCC)") set(_compiler_id_version_compute " +# if defined(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MAJOR @MACRO_DEC@(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR @MACRO_DEC@(__SDCC_VERSION_MINOR) +# define COMPILER_VERSION_PATCH @MACRO_DEC@(__SDCC_VERSION_PATCH) +# else /* SDCC = VRP */ # define COMPILER_VERSION_MAJOR @MACRO_DEC@(SDCC/100) # define COMPILER_VERSION_MINOR @MACRO_DEC@(SDCC/10 % 10) -# define COMPILER_VERSION_PATCH @MACRO_DEC@(SDCC % 10)") +# define COMPILER_VERSION_PATCH @MACRO_DEC@(SDCC % 10) +# endif") diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 00781d6..b42d2dd 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -600,8 +600,11 @@ if(error_code) message(FATAL_ERROR \"Failed to clone repository: '${git_repository}'\") endif() +# Use `git checkout <branch>` even though this risks ambiguity with a +# local path. Unfortunately we cannot use `git checkout <tree-ish> --` +# because that will not search for remote branch names, a common use case. execute_process( - COMMAND \"${git_EXECUTABLE}\" \${git_options} checkout ${git_tag} -- + COMMAND \"${git_EXECUTABLE}\" \${git_options} checkout ${git_tag} WORKING_DIRECTORY \"${work_dir}/${src_name}\" RESULT_VARIABLE error_code ) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index a6f63f5..2dd08e1 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -746,6 +746,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret) set(_Boost_CHRONO_DEPENDENCIES system) set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time) set(_Boost_COROUTINE_DEPENDENCIES context system) + set(_Boost_COROUTINE2_DEPENDENCIES context fiber thread chrono system date_time) set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time) set(_Boost_FILESYSTEM_DEPENDENCIES system) set(_Boost_IOSTREAMS_DEPENDENCIES regex) diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index d30d35f..bc906e5 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -423,7 +423,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") list(APPEND wxWidgets_LIBRARIES opengl32 glu32) endif() - list(APPEND wxWidgets_LIBRARIES winmm comctl32 rpcrt4 wsock32) + list(APPEND wxWidgets_LIBRARIES winmm comctl32 oleacc rpcrt4 shlwapi version wsock32) endmacro() #------------------------------------------------------------------- diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 1061da0..a3478a3 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -191,19 +191,31 @@ if(MSVC) set(vs "${_MSVCRT_IDE_VERSION}") # Find the runtime library redistribution directory. - get_filename_component(msvc_install_dir - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${vs}.0;InstallDir]" ABSOLUTE) - set(programfilesx86 "ProgramFiles(x86)") if(vs VERSION_LESS 15 AND DEFINED MSVC${vs}_REDIST_DIR AND EXISTS "${MSVC${vs}_REDIST_DIR}") set(MSVC_REDIST_DIR "${MSVC${vs}_REDIST_DIR}") # use old cache entry endif() - find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.CRT - PATHS - "${msvc_install_dir}/../../VC/redist" + if(NOT vs VERSION_LESS 15) + set(_vs_redist_paths "") + cmake_host_system_information(RESULT _vs_dir QUERY VS_${vs}_DIR) # undocumented query + if(IS_DIRECTORY "${_vs_dir}") + file(GLOB _vs_redist_paths "${_vs_dir}/VC/Redist/MSVC/*") + endif() + unset(_vs_dir) + else() + get_filename_component(_vs_dir + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${vs}.0;InstallDir]" ABSOLUTE) + set(programfilesx86 "ProgramFiles(x86)") + set(_vs_redist_paths + "${_vs_dir}/../../VC/redist" "${base_dir}/VC/redist" "$ENV{ProgramFiles}/Microsoft Visual Studio ${vs}.0/VC/redist" "$ENV{${programfilesx86}}/Microsoft Visual Studio ${vs}.0/VC/redist" - ) + ) + unset(_vs_dir) + unset(programfilesx86) + endif() + find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.CRT PATHS ${_vs_redist_paths}) + unset(_vs_redist_paths) mark_as_advanced(MSVC_REDIST_DIR) set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vs}0.CRT") |