Commit 9d9582ff authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: fix problem where rc language recursively included itself because...

ENH: fix problem where rc language recursively included itself because CMAKE_BASE_NAME was used from c compiler, do the same fix for other uses of CMAKE_BASE_NAME
parent ec9f2a18
...@@ -7,7 +7,7 @@ ELSE(UNIX) ...@@ -7,7 +7,7 @@ ELSE(UNIX)
ENDIF(UNIX) ENDIF(UNIX)
SET(CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} "-I") # -I 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) GET_FILENAME_COMPONENT(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE)
IF("${CMAKE_BASE_NAME}" STREQUAL "as") IF("${CMAKE_BASE_NAME}" STREQUAL "as")
......
...@@ -12,7 +12,7 @@ IF(UNIX) ...@@ -12,7 +12,7 @@ IF(UNIX)
ELSE(UNIX) ELSE(UNIX)
SET(CMAKE_C_OUTPUT_EXTENSION .obj) SET(CMAKE_C_OUTPUT_EXTENSION .obj)
ENDIF(UNIX) ENDIF(UNIX)
SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE) GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
IF(CMAKE_COMPILER_IS_GNUCC) IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_BASE_NAME gcc) SET(CMAKE_BASE_NAME gcc)
......
...@@ -13,7 +13,7 @@ ELSE(UNIX) ...@@ -13,7 +13,7 @@ ELSE(UNIX)
SET(CMAKE_CXX_OUTPUT_EXTENSION .obj) SET(CMAKE_CXX_OUTPUT_EXTENSION .obj)
ENDIF(UNIX) ENDIF(UNIX)
SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE) GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++ # since the gnu compiler has several names force g++
IF(CMAKE_COMPILER_IS_GNUCXX) IF(CMAKE_COMPILER_IS_GNUCXX)
......
...@@ -46,3 +46,4 @@ MARK_AS_ADVANCED(CMAKE_RC_COMPILER) ...@@ -46,3 +46,4 @@ MARK_AS_ADVANCED(CMAKE_RC_COMPILER)
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeRCCompiler.cmake IMMEDIATE) ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeRCCompiler.cmake IMMEDIATE)
SET(CMAKE_RC_COMPILER_ENV_VAR "RC") SET(CMAKE_RC_COMPILER_ENV_VAR "RC")
SET(ENABLE_LANGUAGE_RC_CALLED TRUE)
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# It also loads the available platform file for the system-compiler # It also loads the available platform file for the system-compiler
# if it exists. # if it exists.
SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE) GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++ # since the gnu compiler has several names force g++
IF(CMAKE_COMPILER_IS_GNUG77) IF(CMAKE_COMPILER_IS_GNUG77)
......
...@@ -3,12 +3,15 @@ ...@@ -3,12 +3,15 @@
# It also loads the available platform file for the system-compiler # It also loads the available platform file for the system-compiler
# if it exists. # 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) GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
SET (CMAKE_RC_FLAGS "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CACHE STRING SET (CMAKE_RC_FLAGS "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CACHE STRING
"Flags for Fortran compiler.") "Flags for Fortran compiler.")
......
...@@ -29,10 +29,7 @@ ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 9") ...@@ -29,10 +29,7 @@ ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 9")
# make sure to enable languages after setting configuration types # make sure to enable languages after setting configuration types
IF(NOT ENABLE_LANGUAGE_RC_CALLED AND NOT CMAKE_DO_TRY_COMPILE) ENABLE_LANGUAGE(RC)
ENABLE_LANGUAGE(RC)
ENDIF(NOT ENABLE_LANGUAGE_RC_CALLED AND NOT CMAKE_DO_TRY_COMPILE)
SET(ENABLE_LANGUAGE_RC_CALLED TRUE)
SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>") SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
# for nmake we need to compute some information about the compiler # for nmake we need to compute some information about the compiler
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment