summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-28 12:39:29 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-10-28 12:39:29 (GMT)
commit16df2456a440d87fb3e8e53fb59a2817b288b9af (patch)
treea44c27696661e6edd6222dc01e4d783f3821010c /Modules
parentecc6d7f9190a660c0f442c4d03854b06e3fc7856 (diff)
parent3e04946f7b69418f6b222875ad18fed3438e0fa1 (diff)
downloadCMake-16df2456a440d87fb3e8e53fb59a2817b288b9af.zip
CMake-16df2456a440d87fb3e8e53fb59a2817b288b9af.tar.gz
CMake-16df2456a440d87fb3e8e53fb59a2817b288b9af.tar.bz2
Merge topic 'enable-language-require-compiler'
3e04946 Require CMAKE_<LANG>_COMPILER to be found as a full path 6007f7c CMakeDetermineCompilerId: Always use compiler detected from IDE 332771c CMakeDetermine*Compiler: Remove temporary cache entry
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCCompilerId.c.in1
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in1
-rw-r--r--Modules/CMakeDetermineASMCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake10
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake2
7 files changed, 10 insertions, 10 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 871cccd..d53247a 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -228,6 +228,7 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
#endif
@CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
+@CMAKE_C_COMPILER_ID_ERROR_FOR_TEST@
/*--------------------------------------------------------------------------*/
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index f32fee0..b5d498d 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -221,6 +221,7 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
#endif
@CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@
+@CMAKE_CXX_COMPILER_ID_ERROR_FOR_TEST@
/*--------------------------------------------------------------------------*/
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index 0fecb5d..1adfadb 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -59,10 +59,10 @@ else()
get_filename_component(_CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
if(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
find_program(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER})
- mark_as_advanced(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
if(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
set(CMAKE_ASM${ASM_DIALECT}_COMPILER ${CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH} CACHE FILEPATH "Assembler" FORCE)
endif()
+ unset(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH CACHE)
endif()
endif()
mark_as_advanced(CMAKE_ASM${ASM_DIALECT}_COMPILER)
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 9126988..1ae84ee 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -92,10 +92,10 @@ else()
get_filename_component(_CMAKE_USER_C_COMPILER_PATH "${CMAKE_C_COMPILER}" PATH)
if(NOT _CMAKE_USER_C_COMPILER_PATH)
find_program(CMAKE_C_COMPILER_WITH_PATH NAMES ${CMAKE_C_COMPILER})
- mark_as_advanced(CMAKE_C_COMPILER_WITH_PATH)
if(CMAKE_C_COMPILER_WITH_PATH)
set(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_WITH_PATH} CACHE STRING "C compiler" FORCE)
endif()
+ unset(CMAKE_C_COMPILER_WITH_PATH CACHE)
endif()
endif()
mark_as_advanced(CMAKE_C_COMPILER)
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 37de40d..ffb8504 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -91,10 +91,10 @@ else()
get_filename_component(_CMAKE_USER_CXX_COMPILER_PATH "${CMAKE_CXX_COMPILER}" PATH)
if(NOT _CMAKE_USER_CXX_COMPILER_PATH)
find_program(CMAKE_CXX_COMPILER_WITH_PATH NAMES ${CMAKE_CXX_COMPILER})
- mark_as_advanced(CMAKE_CXX_COMPILER_WITH_PATH)
if(CMAKE_CXX_COMPILER_WITH_PATH)
set(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_WITH_PATH} CACHE STRING "CXX compiler" FORCE)
endif()
+ unset(CMAKE_CXX_COMPILER_WITH_PATH CACHE)
endif()
endif()
mark_as_advanced(CMAKE_CXX_COMPILER)
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 6fccb16..762d4ae 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -67,12 +67,10 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
endif()
# Check if compiler id detection gave us the compiler tool.
- if(NOT CMAKE_${lang}_COMPILER)
- if(CMAKE_${lang}_COMPILER_ID_TOOL)
- set(CMAKE_${lang}_COMPILER "${CMAKE_${lang}_COMPILER_ID_TOOL}" PARENT_SCOPE)
- else()
- set(CMAKE_${lang}_COMPILER "CMAKE_${lang}_COMPILER-NOTFOUND" PARENT_SCOPE)
- endif()
+ if(CMAKE_${lang}_COMPILER_ID_TOOL)
+ set(CMAKE_${lang}_COMPILER "${CMAKE_${lang}_COMPILER_ID_TOOL}" PARENT_SCOPE)
+ elseif(NOT CMAKE_${lang}_COMPILER)
+ set(CMAKE_${lang}_COMPILER "CMAKE_${lang}_COMPILER-NOTFOUND" PARENT_SCOPE)
endif()
set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 13cfb00..10574b1 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -109,11 +109,11 @@ else()
get_filename_component(_CMAKE_USER_Fortran_COMPILER_PATH "${CMAKE_Fortran_COMPILER}" PATH)
if(NOT _CMAKE_USER_Fortran_COMPILER_PATH)
find_program(CMAKE_Fortran_COMPILER_WITH_PATH NAMES ${CMAKE_Fortran_COMPILER})
- mark_as_advanced(CMAKE_Fortran_COMPILER_WITH_PATH)
if(CMAKE_Fortran_COMPILER_WITH_PATH)
set(CMAKE_Fortran_COMPILER ${CMAKE_Fortran_COMPILER_WITH_PATH}
CACHE STRING "Fortran compiler" FORCE)
endif()
+ unset(CMAKE_Fortran_COMPILER_WITH_PATH CACHE)
endif()
endif()
mark_as_advanced(CMAKE_Fortran_COMPILER)