diff options
author | Brad King <brad.king@kitware.com> | 2013-10-29 13:45:40 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-10-29 13:45:40 (GMT) |
commit | afe6adfabaabab8808ff441172319cf357b30886 (patch) | |
tree | 98c61b68a2106814adf8b2406c32ac8ffc1882c1 /Modules | |
parent | 047c1ec4570a630a3ae813abf47422eeee58dc6f (diff) | |
parent | e65c7887676b419bfcc6b89cb64f7e6c66b174f1 (diff) | |
download | CMake-afe6adfabaabab8808ff441172319cf357b30886.zip CMake-afe6adfabaabab8808ff441172319cf357b30886.tar.gz CMake-afe6adfabaabab8808ff441172319cf357b30886.tar.bz2 |
Merge topic 'external-language-compiler-id'
e65c788 CMakeDetermineCompilerId: Load src from CMAKE_MODULE_PATH (#14481)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 762d4ae..4087060 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -85,7 +85,9 @@ endfunction() #----------------------------------------------------------------------------- # Function to write the compiler id source file. function(CMAKE_DETERMINE_COMPILER_ID_WRITE lang src) - file(READ ${CMAKE_ROOT}/Modules/${src}.in ID_CONTENT_IN) + find_file(src_in ${src}.in PATHS ${CMAKE_ROOT}/Modules ${CMAKE_MODULE_PATH} NO_DEFAULT_PATH) + file(READ ${src_in} ID_CONTENT_IN) + unset(src_in CACHE) string(CONFIGURE "${ID_CONTENT_IN}" ID_CONTENT_OUT @ONLY) file(WRITE ${CMAKE_${lang}_COMPILER_ID_DIR}/${src} "${ID_CONTENT_OUT}") endfunction() |