diff options
author | Brad King <brad.king@kitware.com> | 2009-10-06 15:06:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-10-06 15:06:38 (GMT) |
commit | d0c03f804f9a379e6265bab2b9d57a8ea331c2d5 (patch) | |
tree | 69464cf3d492c516f3eccab0bc4cfbc2fbe43d0b /Modules/CMakeCInformation.cmake | |
parent | d8f6d3a274eacb158a4e6bca80cb05a04e0c36e4 (diff) | |
download | CMake-d0c03f804f9a379e6265bab2b9d57a8ea331c2d5.zip CMake-d0c03f804f9a379e6265bab2b9d57a8ea331c2d5.tar.gz CMake-d0c03f804f9a379e6265bab2b9d57a8ea331c2d5.tar.bz2 |
Use work-around from bug 4772 for C++ and Fortran
The commit "fix for bug 4772" added a work-around to CMakeCInformation
for platform config files that put compiler information in the system
file (like SunOS flags for GCC). This commit adds the same work-around
for CXX and Fortran. It is necessary to support enabling these
languages separately from C in other subdirectories.
The commit "Avoid (Unix|Windows)Paths.cmake multiple include" added
include blockers that prevent the files from multiple inclusion, so it
is safe to include the system information files from every language.
See issue #4772 and issue #9656.
Diffstat (limited to 'Modules/CMakeCInformation.cmake')
-rw-r--r-- | Modules/CMakeCInformation.cmake | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index aa8fdc7..fb4f0e8 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -58,13 +58,12 @@ IF (NOT _INCLUDED_FILE) 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 +# We specify the compiler information in the system file for some +# platforms, but this language may not have been enabled when the file +# was first included. Include it again to get the language info. +# Remove this when all compiler info is removed from system files. IF (NOT _INCLUDED_FILE) - INCLUDE(Platform/${CMAKE_SYSTEM_NAME} - OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL) ENDIF (NOT _INCLUDED_FILE) |