summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCXXCompiler.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CMakeDetermineCXXCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 43b44ac..0116d34 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -32,6 +32,12 @@
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
+# Load system-specific compiler preferences for this language.
+INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-CXX OPTIONAL)
+IF(NOT CMAKE_CXX_COMPILER_NAMES)
+ SET(CMAKE_CXX_COMPILER_NAMES CC)
+ENDIF()
+
IF(NOT CMAKE_CXX_COMPILER)
SET(CMAKE_CXX_COMPILER_INIT NOTFOUND)
@@ -55,7 +61,7 @@ IF(NOT CMAKE_CXX_COMPILER)
# finally list compilers to try
IF(NOT CMAKE_CXX_COMPILER_INIT)
- SET(CMAKE_CXX_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ CC aCC cl bcc xlC clang++)
+ SET(CMAKE_CXX_COMPILER_LIST CC ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ aCC cl bcc xlC clang++)
ENDIF()
_cmake_find_compiler(CXX)