summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCheckCompilerFlagCommonPatterns.cmake1
-rw-r--r--Modules/CMakeSystemSpecificInformation.cmake10
-rw-r--r--Modules/Internal/CheckLinkerFlag.cmake9
-rw-r--r--Modules/Platform/CrayLinuxEnvironment.cmake1
-rw-r--r--Modules/Platform/UnixPaths.cmake1
-rw-r--r--Modules/Platform/Windows-Clang-ASM.cmake5
-rw-r--r--Modules/Platform/WindowsPaths.cmake1
7 files changed, 27 insertions, 1 deletions
diff --git a/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake b/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake
index 8f59acd..bda1d71 100644
--- a/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake
+++ b/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake
@@ -13,7 +13,6 @@ macro (CHECK_COMPILER_FLAG_COMMON_PATTERNS _VAR)
FAIL_REGEX "unknown .*option" # Clang
FAIL_REGEX "optimization flag .* not supported" # Clang
FAIL_REGEX "unknown argument ignored" # Clang (cl)
- FAIL_REGEX "warning: .* ignored" # Clang (linker)
FAIL_REGEX "ignoring unknown option" # MSVC, Intel
FAIL_REGEX "warning D9002" # MSVC, any lang
FAIL_REGEX "option.*not supported" # Intel
diff --git a/Modules/CMakeSystemSpecificInformation.cmake b/Modules/CMakeSystemSpecificInformation.cmake
index 0ded568..59f552a 100644
--- a/Modules/CMakeSystemSpecificInformation.cmake
+++ b/Modules/CMakeSystemSpecificInformation.cmake
@@ -17,6 +17,16 @@ set(CYGWIN )
set(MSYS )
set(WIN32 )
+function(_cmake_record_install_prefix )
+ set(_CMAKE_SYSTEM_PREFIX_PATH_INSTALL_PREFIX_VALUE "${CMAKE_INSTALL_PREFIX}" PARENT_SCOPE)
+ set(count 0)
+ foreach(value IN LISTS CMAKE_SYSTEM_PREFIX_PATH)
+ if(value STREQUAL CMAKE_INSTALL_PREFIX)
+ math(EXPR count "${count}+1")
+ endif()
+ endforeach()
+ set(_CMAKE_SYSTEM_PREFIX_PATH_INSTALL_PREFIX_COUNT "${count}" PARENT_SCOPE)
+endfunction()
# include Generic system information
include(CMakeGenericSystem)
diff --git a/Modules/Internal/CheckLinkerFlag.cmake b/Modules/Internal/CheckLinkerFlag.cmake
index 51d4225..7613105 100644
--- a/Modules/Internal/CheckLinkerFlag.cmake
+++ b/Modules/Internal/CheckLinkerFlag.cmake
@@ -25,6 +25,15 @@ function(CMAKE_CHECK_LINKER_FLAG _lang _flag _var)
set(CMAKE_REQUIRED_LINK_OPTIONS "${_flag}")
check_compiler_flag_common_patterns(_common_patterns)
+
+ # Match linker warnings if the exact flag is ignored.
+ foreach(flag IN LISTS _flag)
+ string(REGEX REPLACE "([][+.*?()^$])" [[\\\1]] _flag_regex "${flag}")
+ list(APPEND _common_patterns
+ FAIL_REGEX "warning: .*${_flag_regex}.* ignored"
+ )
+ endforeach()
+
cmake_check_source_compiles(${_lang}
"${_lang_src}"
${_var}
diff --git a/Modules/Platform/CrayLinuxEnvironment.cmake b/Modules/Platform/CrayLinuxEnvironment.cmake
index f2aaf3f..b982b3f 100644
--- a/Modules/Platform/CrayLinuxEnvironment.cmake
+++ b/Modules/Platform/CrayLinuxEnvironment.cmake
@@ -68,6 +68,7 @@ if (NOT CMAKE_FIND_NO_INSTALL_PREFIX)
)
endif()
endif()
+_cmake_record_install_prefix()
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
$ENV{SYSROOT_DIR}/usr/include/X11
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
index b9381c3..8a0ad23 100644
--- a/Modules/Platform/UnixPaths.cmake
+++ b/Modules/Platform/UnixPaths.cmake
@@ -44,6 +44,7 @@ if (NOT CMAKE_FIND_NO_INSTALL_PREFIX)
)
endif()
endif()
+_cmake_record_install_prefix()
# Non "standard" but common install prefixes
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
diff --git a/Modules/Platform/Windows-Clang-ASM.cmake b/Modules/Platform/Windows-Clang-ASM.cmake
index 345d77d..c22e3b0 100644
--- a/Modules/Platform/Windows-Clang-ASM.cmake
+++ b/Modules/Platform/Windows-Clang-ASM.cmake
@@ -1,2 +1,7 @@
include(Platform/Windows-Clang)
__windows_compiler_clang(ASM)
+
+set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded "")
+set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL "")
+set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug "")
+set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL "")
diff --git a/Modules/Platform/WindowsPaths.cmake b/Modules/Platform/WindowsPaths.cmake
index b9e2f17..de93338 100644
--- a/Modules/Platform/WindowsPaths.cmake
+++ b/Modules/Platform/WindowsPaths.cmake
@@ -67,6 +67,7 @@ if (NOT CMAKE_FIND_NO_INSTALL_PREFIX)
)
endif()
endif()
+_cmake_record_install_prefix()
if(CMAKE_CROSSCOMPILING AND NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
# MinGW (useful when cross compiling from linux with CMAKE_FIND_ROOT_PATH set)