summaryrefslogtreecommitdiff
path: root/Modules/CMakeCXXInformation.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-02 13:29:36 -0400
committerAlexander Neundorf <neundorf@kde.org>2007-07-02 13:29:36 -0400
commit930bb0cd37ca9d4e522411e06defbc3c52ba8724 (patch)
tree390aca924bea0092032182595a8be268da7a5fa6 /Modules/CMakeCXXInformation.cmake
parent3c1c3358005ebfb1afc8b97a3356d99a9f5cf7fd (diff)
downloadcmake-930bb0cd37ca9d4e522411e06defbc3c52ba8724.tar.gz
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/CMakeCXXInformation.cmake')
-rw-r--r--Modules/CMakeCXXInformation.cmake33
1 files changed, 13 insertions, 20 deletions
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index ba76e34f7a..d4d1a8c3fd 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -21,30 +21,23 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-IF(CMAKE_SYSTEM_AND_CXX_COMPILER_AND_PROCESSOR_INFO_FILE)
- INCLUDE(${CMAKE_SYSTEM_AND_CXX_COMPILER_AND_PROCESSOR_INFO_FILE} OPTIONAL)
-ELSE(CMAKE_SYSTEM_AND_CXX_COMPILER_AND_PROCESSOR_INFO_FILE)
- IF(CMAKE_SYSTEM_PROCESSOR)
- IF(CMAKE_CXX_COMPILER_ID)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
- ENDIF(CMAKE_CXX_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_CXX_COMPILER_AND_PROCESSOR_INFO_FILE)
-
-
-IF(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE)
- INCLUDE(${CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE} OPTIONAL)
-ELSE(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE)
+# load a hardware specific file, mostly useful for embedded compilers
+IF(CMAKE_SYSTEM_PROCESSOR)
IF(CMAKE_CXX_COMPILER_ID)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_CXX_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_CXX_COMPILER_INFO_FILE)
+ENDIF(CMAKE_SYSTEM_PROCESSOR)
+
+# load the system- and compiler specific files
+IF(CMAKE_CXX_COMPILER_ID)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+ENDIF(CMAKE_CXX_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