diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake index 998962f97..95a0645c7 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 c0f49e6c1..bb3142ccc 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 c5608e0ad..a5923a399 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 1bea04ae1..3a3c4d96a 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 461573784..25ebe21e3 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 382edbbe5..0efba7c32 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 06169b094..562b2b02d 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 /fo ") # for nmake we need to compute some information about the compiler