From d0c03f804f9a379e6265bab2b9d57a8ea331c2d5 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 6 Oct 2009 11:06:38 -0400 Subject: 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. --- Modules/CMakeCXXInformation.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Modules/CMakeCXXInformation.cmake') diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index 681e49562e..9929dfa0d1 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -54,7 +54,15 @@ 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) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL + RESULT_VARIABLE _INCLUDED_FILE) +ENDIF (NOT _INCLUDED_FILE) +# 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) ENDIF (NOT _INCLUDED_FILE) -- cgit v1.2.1