summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFindBinUtils.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-02 16:46:55 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-07-02 16:46:55 (GMT)
commit3c1c3358005ebfb1afc8b97a3356d99a9f5cf7fd (patch)
tree5a51dd6439b27d4ae696715aed0333547e7c80cd /Modules/CMakeFindBinUtils.cmake
parent39d1343896847d2e5dbd94ceaaa3033dd53bdd17 (diff)
downloadCMake-3c1c3358005ebfb1afc8b97a3356d99a9f5cf7fd.zip
CMake-3c1c3358005ebfb1afc8b97a3356d99a9f5cf7fd.tar.gz
CMake-3c1c3358005ebfb1afc8b97a3356d99a9f5cf7fd.tar.bz2
BUG: with MS Visual Studio currently there is no compiler id, so check the
generator too Alex
Diffstat (limited to 'Modules/CMakeFindBinUtils.cmake')
-rw-r--r--Modules/CMakeFindBinUtils.cmake13
1 files changed, 10 insertions, 3 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index 0527397..47ac5c3 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -18,7 +18,10 @@
# if it's the MS C/CXX compiler, search for link
-IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC")
+IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
+ OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
+ OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
+
FIND_PROGRAM(CMAKE_LINKER NAMES link PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_LINKER NAMES link)
@@ -29,7 +32,9 @@ IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_C_COMPILER_ID}" MATCHES
MARK_AS_ADVANCED(CMAKE_LINKER)
# in all other cases search for ar, ranlib, etc.
-ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC")
+ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
+ OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
+ OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH)
FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar)
@@ -47,7 +52,9 @@ ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_C_COMPILER_ID}" MATCH
FIND_PROGRAM(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld)
MARK_AS_ADVANCED(CMAKE_AR CMAKE_RANLIB CMAKE_STRIP CMAKE_LINKER)
-ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC")
+ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
+ OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
+ OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
# on Apple there really should be install_name_tool