summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-06-11 19:31:42 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-06-11 19:31:42 (GMT)
commit422dc631b62edd22be89dfd665ecaede39c4e283 (patch)
tree078369e37d271cb224272895f914de230839116f /Modules
parent1a71290836bc3f962e66d9b9c55281e0fd118b8b (diff)
downloadCMake-422dc631b62edd22be89dfd665ecaede39c4e283.zip
CMake-422dc631b62edd22be89dfd665ecaede39c4e283.tar.gz
CMake-422dc631b62edd22be89dfd665ecaede39c4e283.tar.bz2
ENH: split cmGlobalGenerator::SetLanguageEnabled() in two parts, where the
second part copies the values from the cmake variables into internal maps. So this can now be done after the compiler-specific information has been loaded, which can now overwrite more settings. Alex
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCCompiler.cmake.in1
-rw-r--r--Modules/CMakeCInformation.cmake8
-rw-r--r--Modules/CMakeCXXCompiler.cmake.in1
-rw-r--r--Modules/CMakeCXXInformation.cmake9
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake11
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake11
6 files changed, 17 insertions, 24 deletions
diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in
index abd5067..b746aba 100644
--- a/Modules/CMakeCCompiler.cmake.in
+++ b/Modules/CMakeCCompiler.cmake.in
@@ -22,7 +22,6 @@ SET(CMAKE_C_COMPILER_ID_RUN 1)
SET(CMAKE_C_SOURCE_FILE_EXTENSIONS c)
SET(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_C_LINKER_PREFERENCE None)
-SET(CMAKE_C_OUTPUT_EXTENSION @CMAKE_C_OUTPUT_EXTENSION@)
# save the size of void* in case where cache is removed
# and the this file is still around
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index 9e0dda2..1908b40 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -5,6 +5,14 @@
# It also loads a system - compiler - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
+# some compilers use different extensions (e.g. sdcc uses .rel)
+# so set the extension here first so it can be overridden by the compiler specific file
+IF(UNIX)
+ SET(CMAKE_C_OUTPUT_EXTENSION .o)
+ELSE(UNIX)
+ SET(CMAKE_C_OUTPUT_EXTENSION .obj)
+ENDIF(UNIX)
+
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/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in
index c6f4740..f2c53d5 100644
--- a/Modules/CMakeCXXCompiler.cmake.in
+++ b/Modules/CMakeCXXCompiler.cmake.in
@@ -22,7 +22,6 @@ SET(CMAKE_CXX_COMPILER_ID_RUN 1)
SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm)
SET(CMAKE_CXX_LINKER_PREFERENCE Prefered)
-SET(CMAKE_CXX_OUTPUT_EXTENSION @CMAKE_CXX_OUTPUT_EXTENSION@)
# save the size of void* in case where cache is removed
# and the this file is still around
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index 8557d9d..6f286e5 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -5,6 +5,15 @@
# It also loads a system - compiler - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
+# some compilers use different extensions (e.g. sdcc uses .rel)
+# so set the extension here first so it can be overridden by the compiler specific file
+IF(UNIX)
+ SET(CMAKE_CXX_OUTPUT_EXTENSION .o)
+ELSE(UNIX)
+ SET(CMAKE_CXX_OUTPUT_EXTENSION .obj)
+ENDIF(UNIX)
+
+
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/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 9e68b80..720853b 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -105,17 +105,6 @@ IF (NOT _CMAKE_TOOLCHAIN_SUFFIX)
ENDIF (COMPILER_BASENAME MATCHES "^cl(.+)\\.exe$")
ENDIF (NOT _CMAKE_TOOLCHAIN_SUFFIX)
-# some exotic compilers have different extensions (e.g. sdcc uses .rel)
-# so don't overwrite it if it has been already defined by the user
-IF(NOT CMAKE_C_OUTPUT_EXTENSION)
- IF(UNIX)
- SET(CMAKE_C_OUTPUT_EXTENSION .o)
- ELSE(UNIX)
- SET(CMAKE_C_OUTPUT_EXTENSION .obj)
- ENDIF(UNIX)
-ENDIF(NOT CMAKE_C_OUTPUT_EXTENSION)
-
-
# Build a small source file to identify the compiler.
IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
SET(CMAKE_C_COMPILER_ID_RUN 1)
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index d278c45..127367c 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -103,17 +103,6 @@ IF (NOT _CMAKE_TOOLCHAIN_SUFFIX)
ENDIF (NOT _CMAKE_TOOLCHAIN_SUFFIX)
-# some exotic compilers have different extensions (e.g. sdcc uses .rel)
-# so don't overwrite it if it has been already defined by the user
-IF(NOT CMAKE_CXX_OUTPUT_EXTENSION)
- IF(UNIX)
- SET(CMAKE_CXX_OUTPUT_EXTENSION .o)
- ELSE(UNIX)
- SET(CMAKE_CXX_OUTPUT_EXTENSION .obj)
- ENDIF(UNIX)
-ENDIF(NOT CMAKE_CXX_OUTPUT_EXTENSION)
-
-
# This block was used before the compiler was identified by building a
# source file. Unless g++ crashes when building a small C++
# executable this should no longer be needed.