summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeASMInformation.cmake2
-rw-r--r--Modules/CMakeCInformation.cmake2
-rw-r--r--Modules/CMakeCXXInformation.cmake2
-rw-r--r--Modules/CMakeDetermineRCCompiler.cmake1
-rw-r--r--Modules/CMakeFortranInformation.cmake1
-rw-r--r--Modules/CMakeRCInformation.cmake3
-rw-r--r--Modules/Platform/Windows-cl.cmake5
7 files changed, 9 insertions, 7 deletions
diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake
index 998962f..95a0645 100644
--- a/Modules/CMakeASMInformation.cmake
+++ b/Modules/CMakeASMInformation.cmake
@@ -7,7 +7,7 @@ ELSE(UNIX)
ENDIF(UNIX)
SET(CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} "-I") # -I
-
+SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE)
IF("${CMAKE_BASE_NAME}" STREQUAL "as")
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index c0f49e6..bb3142c 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -12,7 +12,7 @@ IF(UNIX)
ELSE(UNIX)
SET(CMAKE_C_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
-
+SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_BASE_NAME gcc)
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index c5608e0..a5923a3 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -13,7 +13,7 @@ ELSE(UNIX)
SET(CMAKE_CXX_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
-
+SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++
IF(CMAKE_COMPILER_IS_GNUCXX)
diff --git a/Modules/CMakeDetermineRCCompiler.cmake b/Modules/CMakeDetermineRCCompiler.cmake
index 1bea04a..3a3c4d9 100644
--- a/Modules/CMakeDetermineRCCompiler.cmake
+++ b/Modules/CMakeDetermineRCCompiler.cmake
@@ -46,3 +46,4 @@ MARK_AS_ADVANCED(CMAKE_RC_COMPILER)
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeRCCompiler.cmake IMMEDIATE)
SET(CMAKE_RC_COMPILER_ENV_VAR "RC")
+SET(ENABLE_LANGUAGE_RC_CALLED TRUE)
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index 4615737..25ebe21 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -3,6 +3,7 @@
# It also loads the available platform file for the system-compiler
# if it exists.
+SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++
IF(CMAKE_COMPILER_IS_GNUG77)
diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake
index 382edbb..0efba7c 100644
--- a/Modules/CMakeRCInformation.cmake
+++ b/Modules/CMakeRCInformation.cmake
@@ -3,12 +3,15 @@
# It also loads the available platform file for the system-compiler
# if it exists.
+# make sure we don't use CMAKE_BASE_NAME from somewhere else
+SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
+
SET (CMAKE_RC_FLAGS "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CACHE STRING
"Flags for Fortran compiler.")
diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake
index 06169b0..562b2b0 100644
--- a/Modules/Platform/Windows-cl.cmake
+++ b/Modules/Platform/Windows-cl.cmake
@@ -29,10 +29,7 @@ ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 9")
# make sure to enable languages after setting configuration types
-IF(NOT ENABLE_LANGUAGE_RC_CALLED AND NOT CMAKE_DO_TRY_COMPILE)
- ENABLE_LANGUAGE(RC)
-ENDIF(NOT ENABLE_LANGUAGE_RC_CALLED AND NOT CMAKE_DO_TRY_COMPILE)
-SET(ENABLE_LANGUAGE_RC_CALLED TRUE)
+ENABLE_LANGUAGE(RC)
SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
# for nmake we need to compute some information about the compiler