summaryrefslogtreecommitdiff
path: root/Modules/CMakeCInformation.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-10-01 13:24:51 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2008-10-01 13:24:51 -0400
commit6a1a1b632d56d212226fc17e6aced259add362de (patch)
treefeb79f5d62add92ea380696a3936fb76a81965aa /Modules/CMakeCInformation.cmake
parent4c17c9b87b24cc2239486a55c1d552a484c65a22 (diff)
downloadcmake-6a1a1b632d56d212226fc17e6aced259add362de.tar.gz
BUG: fix for bug 4772, enable_language should now work on linux with correct flags
Diffstat (limited to 'Modules/CMakeCInformation.cmake')
-rw-r--r--Modules/CMakeCInformation.cmake14
1 files changed, 12 insertions, 2 deletions
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index a2ad460f9a..c0f49e6c1e 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -32,10 +32,20 @@ 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)
+ 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)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}
+ OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+ENDIF (NOT _INCLUDED_FILE)
+# some systems include the compiler information in the system file
+# and if this is the enable_language command then it may not have been
+# included at this point, or needs to be included again so that the
+# language_INIT variables are set correctly
+IF (NOT _INCLUDED_FILE)
+ INCLUDE(Platform/${CMAKE_SYSTEM_NAME}
+ OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF (NOT _INCLUDED_FILE)