summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-02-03 22:24:50 (GMT)
committerBrad King <brad.king@kitware.com>2008-02-03 22:24:50 (GMT)
commitbbbb2be765856a8c40e71e5bf6fd703cc3d603aa (patch)
tree882f0a8a5105bd37ae5fd596242e3c192937b1b1 /Modules
parentdc06ac58817672ca9931a4a4c177e18d679b6573 (diff)
downloadCMake-bbbb2be765856a8c40e71e5bf6fd703cc3d603aa.zip
CMake-bbbb2be765856a8c40e71e5bf6fd703cc3d603aa.tar.gz
CMake-bbbb2be765856a8c40e71e5bf6fd703cc3d603aa.tar.bz2
BUG: When forcing the C and CXX compilers do not try to detect the ABI information. Cleanup configured language compiler info files by always using @ONLY. This addresses bug#6297.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake5
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake5
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake5
-rw-r--r--Modules/CMakeForceCompiler.cmake5
-rw-r--r--Modules/CMakeTestCCompiler.cmake21
-rw-r--r--Modules/CMakeTestCXXCompiler.cmake21
6 files changed, 38 insertions, 24 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 6fdcf00..0f88f89 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -131,7 +131,8 @@ ENDIF(NOT CMAKE_C_COMPILER_ID_RUN)
INCLUDE(CMakeFindBinUtils)
# configure variables set in this file for fast reload later on
-CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
- "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake" IMMEDIATE)
+CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
+ "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake"
+ @ONLY)
SET(CMAKE_C_COMPILER_ENV_VAR "CC")
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index d5eb95a..bb5ff74 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -141,7 +141,8 @@ ENDIF(NOT CMAKE_CXX_COMPILER_ID_RUN)
INCLUDE(CMakeFindBinUtils)
# configure all variables set in this file
-CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake IMMEDIATE)
+CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
+ @ONLY)
SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 52d041f..9623b61 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -134,6 +134,7 @@ ENDIF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
INCLUDE(CMakeFindBinUtils)
# configure variables set in this file for fast reload later on
-CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake IMMEDIATE)
+CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake
+ @ONLY)
SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC")
diff --git a/Modules/CMakeForceCompiler.cmake b/Modules/CMakeForceCompiler.cmake
index 79ac054..f525ff9 100644
--- a/Modules/CMakeForceCompiler.cmake
+++ b/Modules/CMakeForceCompiler.cmake
@@ -38,14 +38,14 @@ MACRO(CMAKE_FORCE_C_COMPILER compiler id sizeof_void)
SET(CMAKE_C_COMPILER_ID_RUN TRUE)
SET(CMAKE_C_COMPILER_ID ${id})
SET(CMAKE_C_COMPILER_WORKS TRUE)
+ SET(CMAKE_C_COMPILER_FORCED TRUE)
# Set old compiler and platform id variables.
IF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
SET(CMAKE_COMPILER_IS_GNUCC 1)
ENDIF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
- SET(CMAKE_SIZEOF_VOID_P ${sizeof_void} CACHE STRING "sizeof void")
- SET(HAVE_CMAKE_SIZEOF_VOID_P TRUE CACHE INTERNAL "have sizeof void")
+ SET(CMAKE_C_SIZEOF_DATA_PTR ${sizeof_void})
ENDMACRO(CMAKE_FORCE_C_COMPILER)
MACRO(CMAKE_FORCE_CXX_COMPILER compiler id)
@@ -53,6 +53,7 @@ MACRO(CMAKE_FORCE_CXX_COMPILER compiler id)
SET(CMAKE_CXX_COMPILER_ID_RUN TRUE)
SET(CMAKE_CXX_COMPILER_ID ${id})
SET(CMAKE_CXX_COMPILER_WORKS TRUE)
+ SET(CMAKE_CXX_COMPILER_FORCED TRUE)
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
SET(CMAKE_COMPILER_IS_GNUCXX 1)
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake
index 2a64f7c..b3a4b0d 100644
--- a/Modules/CMakeTestCCompiler.cmake
+++ b/Modules/CMakeTestCCompiler.cmake
@@ -42,13 +42,18 @@ ELSE(NOT CMAKE_C_COMPILER_WORKS)
ENDIF(C_TEST_WAS_RUN)
SET(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "")
- # Try to identify the ABI and configure it into CMakeCCompiler.cmake
- INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
- CMAKE_DETERMINE_COMPILER_ABI(C ${CMAKE_ROOT}/Modules/CMakeCCompilerABI.c)
- CONFIGURE_FILE(
- ${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake
- @ONLY
- )
+ IF(CMAKE_C_COMPILER_FORCED)
+ # The compiler was forced by the CMAKE_FORCE_C_COMPILER macro.
+ # Assume the user has configured all compiler information.
+ ELSE(CMAKE_C_COMPILER_FORCED)
+ # Try to identify the ABI and configure it into CMakeCCompiler.cmake
+ INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
+ CMAKE_DETERMINE_COMPILER_ABI(C ${CMAKE_ROOT}/Modules/CMakeCCompilerABI.c)
+ CONFIGURE_FILE(
+ ${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake
+ @ONLY
+ )
+ ENDIF(CMAKE_C_COMPILER_FORCED)
ENDIF(NOT CMAKE_C_COMPILER_WORKS)
diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake
index 44a67ad..043186b 100644
--- a/Modules/CMakeTestCXXCompiler.cmake
+++ b/Modules/CMakeTestCXXCompiler.cmake
@@ -35,12 +35,17 @@ ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
ENDIF(CXX_TEST_WAS_RUN)
SET(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "")
- # Try to identify the ABI and configure it into CMakeCXXCompiler.cmake
- INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
- CMAKE_DETERMINE_COMPILER_ABI(CXX ${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp)
- CONFIGURE_FILE(
- ${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
- @ONLY
- )
+ IF(CMAKE_CXX_COMPILER_FORCED)
+ # The compiler was forced by the CMAKE_FORCE_CXX_COMPILER macro.
+ # Assume the user has configured all compiler information.
+ ELSE(CMAKE_CXX_COMPILER_FORCED)
+ # Try to identify the ABI and configure it into CMakeCXXCompiler.cmake
+ INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
+ CMAKE_DETERMINE_COMPILER_ABI(CXX ${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp)
+ CONFIGURE_FILE(
+ ${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
+ @ONLY
+ )
+ ENDIF(CMAKE_CXX_COMPILER_FORCED)
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)