From 2e4264e0d1999dd67227c2737fbdc6083112e89e Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Wed, 15 Sep 2004 10:32:28 -0400 Subject: ENH: do not check for gnu for visual studio --- Modules/CMakeDetermineCCompiler.cmake | 6 ++++++ Modules/CMakeDetermineCXXCompiler.cmake | 5 +++++ Modules/CMakeDetermineFortranCompiler.cmake | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index a14dd04..30d0d47 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -45,6 +45,12 @@ IF(NOT CMAKE_RANLIB) ENDIF(NOT CMAKE_RANLIB) MARK_AS_ADVANCED(CMAKE_RANLIB) +# do not test for GNU if the generator is visual studio +IF(${CMAKE_GENERATOR} MATCHES "Visual Studio") + SET(CMAKE_COMPILER_IS_GNUCC_RUN 1) +ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio") + + IF(NOT CMAKE_COMPILER_IS_GNUCC_RUN) # test to see if the c compiler is gnu diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 3718f5f..4658229 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -38,6 +38,11 @@ IF(NOT CMAKE_CXX_COMPILER) ENDIF(NOT CMAKE_CXX_COMPILER) MARK_AS_ADVANCED(CMAKE_CXX_COMPILER) +# do not test for GNU if the generator is visual studio +IF(${CMAKE_GENERATOR} MATCHES "Visual Studio") + SET(CMAKE_COMPILER_IS_GNUCXX_RUN 1) +ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio") + IF(NOT CMAKE_COMPILER_IS_GNUCXX_RUN) # test to see if the cxx compiler is gnu SET(CMAKE_COMPILER_IS_GNUCXX_RUN 1) diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index c86066b..cff5ba4 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -69,6 +69,11 @@ IF(NOT CMAKE_RANLIB) ENDIF(NOT CMAKE_RANLIB) MARK_AS_ADVANCED(CMAKE_RANLIB) +# do not test for GNU if the generator is visual studio +IF(${CMAKE_GENERATOR} MATCHES "Visual Studio") + SET(CMAKE_COMPILER_IS_GNUG77_RUN 1) +ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio") + IF(NOT CMAKE_COMPILER_IS_GNUG77_RUN) # test to see if the Fortran compiler is gnu -- cgit v0.12