summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCInformation.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-02 17:29:36 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-07-02 17:29:36 (GMT)
commit930bb0cd37ca9d4e522411e06defbc3c52ba8724 (patch)
tree390aca924bea0092032182595a8be268da7a5fa6 /Modules/CMakeCInformation.cmake
parent3c1c3358005ebfb1afc8b97a3356d99a9f5cf7fd (diff)
downloadCMake-930bb0cd37ca9d4e522411e06defbc3c52ba8724.zip
CMake-930bb0cd37ca9d4e522411e06defbc3c52ba8724.tar.gz
CMake-930bb0cd37ca9d4e522411e06defbc3c52ba8724.tar.bz2
ENH: remove support for presetting CMAKE_SYSTEM_INFO_FILE,
CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE, CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE, CMAKE_SYSTEM_AND_C_COMPILER_AND_PROCESSOR_INFO_FILE and CMAKE_SYSTEM_AND_CXX_COMPILER_AND_PROCESSOR_INFO_FILE Instead of presetting these variables to arbitrary filenames, users should set up CMAKE_SYSTEM_NAME and the compilers correctly and also create a Platform/ directory so these files will all follow the official cmake style, which should make it easier to understand and debug project which have their own platform/toolchain support files. -remove support for a suffix to MS crosscompilers, since this is not (yet) supported by cmake and might confuse users Alex
Diffstat (limited to 'Modules/CMakeCInformation.cmake')
-rw-r--r--Modules/CMakeCInformation.cmake34
1 files changed, 14 insertions, 20 deletions
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index 4d4e52a..fec8389 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -19,30 +19,24 @@ IF(CMAKE_COMPILER_IS_GNUCC)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
-IF(CMAKE_SYSTEM_AND_C_COMPILER_AND_PROCESSOR_INFO_FILE)
- INCLUDE(${CMAKE_SYSTEM_AND_C_COMPILER_AND_PROCESSOR_INFO_FILE} OPTIONAL)
-ELSE(CMAKE_SYSTEM_AND_C_COMPILER_AND_PROCESSOR_INFO_FILE)
- IF(CMAKE_SYSTEM_PROCESSOR)
- IF(CMAKE_C_COMPILER_ID)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
- ENDIF(CMAKE_C_COMPILER_ID)
- IF (NOT _INCLUDED_FILE)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
- ENDIF (NOT _INCLUDED_FILE)
- ENDIF(CMAKE_SYSTEM_PROCESSOR)
-ENDIF(CMAKE_SYSTEM_AND_C_COMPILER_AND_PROCESSOR_INFO_FILE)
-
-
-IF(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE)
- INCLUDE(${CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE} OPTIONAL)
-ELSE(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE)
+# load a hardware specific file, mostly useful for embedded compilers
+IF(CMAKE_SYSTEM_PROCESSOR)
IF(CMAKE_C_COMPILER_ID)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_C_COMPILER_ID)
IF (NOT _INCLUDED_FILE)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE)
-ENDIF(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE)
+ENDIF(CMAKE_SYSTEM_PROCESSOR)
+
+
+# load the system- and compiler specific files
+IF(CMAKE_C_COMPILER_ID)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+ENDIF(CMAKE_C_COMPILER_ID)
+IF (NOT _INCLUDED_FILE)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
+ENDIF (NOT _INCLUDED_FILE)
# This should be included before the _INIT variables are