summaryrefslogtreecommitdiff
path: root/Modules/CMakeDetermineCXXCompiler.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-02-25 09:23:14 -0500
committerBrad King <brad.king@kitware.com>2008-02-25 09:23:14 -0500
commit9211b0d23482c0fee8dc64171cf3524feb1ae446 (patch)
tree4b65eec4b9abab6658d2f35437d9021f8508c941 /Modules/CMakeDetermineCXXCompiler.cmake
parent88bd02a5d1553d31e0d4d8ee6eef599c27abddf2 (diff)
downloadcmake-9211b0d23482c0fee8dc64171cf3524feb1ae446.tar.gz
ENH: Improvied compiler identification robustness
- Write a single source file into the compiler id directory - This avoid requiring the compiler to behave correctly with respect to include rules and the current working directory - Helps to identify cross-compiling toolchains with unusual default behavior
Diffstat (limited to 'Modules/CMakeDetermineCXXCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index d354165a00..b024034818 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -132,8 +132,10 @@ IF(NOT CMAKE_CXX_COMPILER_ID_RUN)
# Try to identify the compiler.
SET(CMAKE_CXX_COMPILER_ID)
+ FILE(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
+ CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
- CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS ${CMAKE_ROOT}/Modules/CMakeCXXCompilerId.cpp)
+ CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS CMakeCXXCompilerId.cpp)
# Set old compiler and platform id variables.
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")