summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineASMCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineCUDACompiler.cmake3
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineSwiftCompiler.cmake2
-rw-r--r--Modules/CMakeFindBinUtils.cmake13
7 files changed, 12 insertions, 14 deletions
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index f7cf54a..ed8f598 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -163,8 +163,8 @@ if (NOT _CMAKE_TOOLCHAIN_PREFIX)
endif ()
-include(CMakeFindBinUtils)
set(_CMAKE_PROCESSING_LANGUAGE "ASM")
+include(CMakeFindBinUtils)
include(Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-FindBinUtils OPTIONAL)
unset(_CMAKE_PROCESSING_LANGUAGE)
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 4e56ce1..7e6ca1e 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -166,8 +166,8 @@ if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
endif ()
-include(CMakeFindBinUtils)
set(_CMAKE_PROCESSING_LANGUAGE "C")
+include(CMakeFindBinUtils)
include(Compiler/${CMAKE_C_COMPILER_ID}-FindBinUtils OPTIONAL)
unset(_CMAKE_PROCESSING_LANGUAGE)
diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake
index c9cd7e2..f5a3ebd 100644
--- a/Modules/CMakeDetermineCUDACompiler.cmake
+++ b/Modules/CMakeDetermineCUDACompiler.cmake
@@ -73,7 +73,10 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN)
CMAKE_DETERMINE_COMPILER_ID(CUDA CUDAFLAGS CMakeCUDACompilerId.cu)
endif()
+set(_CMAKE_PROCESSING_LANGUAGE "CUDA")
include(CMakeFindBinUtils)
+unset(_CMAKE_PROCESSING_LANGUAGE)
+
if(MSVC_CUDA_ARCHITECTURE_ID)
set(SET_MSVC_CUDA_ARCHITECTURE_ID
"set(MSVC_CUDA_ARCHITECTURE_ID ${MSVC_CUDA_ARCHITECTURE_ID})")
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 4541844..c0fb3b6 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -164,8 +164,8 @@ if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
endif ()
-include(CMakeFindBinUtils)
set(_CMAKE_PROCESSING_LANGUAGE "CXX")
+include(CMakeFindBinUtils)
include(Compiler/${CMAKE_CXX_COMPILER_ID}-FindBinUtils OPTIONAL)
unset(_CMAKE_PROCESSING_LANGUAGE)
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 2549c22..cf502f6 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -258,8 +258,8 @@ if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
endif ()
-include(CMakeFindBinUtils)
set(_CMAKE_PROCESSING_LANGUAGE "Fortran")
+include(CMakeFindBinUtils)
include(Compiler/${CMAKE_Fortran_COMPILER_ID}-FindBinUtils OPTIONAL)
unset(_CMAKE_PROCESSING_LANGUAGE)
diff --git a/Modules/CMakeDetermineSwiftCompiler.cmake b/Modules/CMakeDetermineSwiftCompiler.cmake
index 2604906..dd02d54 100644
--- a/Modules/CMakeDetermineSwiftCompiler.cmake
+++ b/Modules/CMakeDetermineSwiftCompiler.cmake
@@ -34,7 +34,9 @@ if (NOT _CMAKE_TOOLCHAIN_LOCATION)
get_filename_component(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_Swift_COMPILER}" PATH)
endif ()
+set(_CMAKE_PROCESSING_LANGUAGE "Swift")
include(CMakeFindBinUtils)
+unset(_CMAKE_PROCESSING_LANGUAGE)
# configure variables set in this file for fast reload later on
configure_file(${CMAKE_ROOT}/Modules/CMakeSwiftCompiler.cmake.in
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index e4103d0..ece0547 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -20,16 +20,9 @@
# on UNIX, cygwin and mingw
# if it's the MS C/CXX compiler, search for link
-if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
- OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC"
- OR "x${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "xMSVC"
- OR "x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC"
- OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC"
- OR "x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC"
- OR (CMAKE_HOST_WIN32 AND (
- "x${CMAKE_C_COMPILER_ID}" STREQUAL "xPGI"
- OR "x${CMAKE_Fortran_COMPILER_ID}" STREQUAL "xPGI"
- ))
+if("x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_SIMULATE_ID}" STREQUAL "xMSVC"
+ OR "x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ID}" STREQUAL "xMSVC"
+ OR (CMAKE_HOST_WIN32 AND "x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ID}" STREQUAL "xPGI")
OR (CMAKE_GENERATOR MATCHES "Visual Studio"
AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android"))