Commit f41ecd1d authored by Stephen Kelly's avatar Stephen Kelly Committed by Brad King

CMakeDetermineCompilerId: Look for internal file only on host

The find_file this module uses to locate the compiler id source file
must always look on the host and never in CMAKE_FIND_ROOT_PATH, even
when a toolchain file has

 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

Add NO_CMAKE_FIND_ROOT_PATH to the find_file call to avoid rerooting.
parent 2596fae8
......@@ -85,7 +85,7 @@ endfunction()
#-----------------------------------------------------------------------------
# Function to write the compiler id source file.
function(CMAKE_DETERMINE_COMPILER_ID_WRITE lang src)
find_file(src_in ${src}.in PATHS ${CMAKE_ROOT}/Modules ${CMAKE_MODULE_PATH} NO_DEFAULT_PATH)
find_file(src_in ${src}.in PATHS ${CMAKE_ROOT}/Modules ${CMAKE_MODULE_PATH} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
file(READ ${src_in} ID_CONTENT_IN)
unset(src_in CACHE)
string(CONFIGURE "${ID_CONTENT_IN}" ID_CONTENT_OUT @ONLY)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment