diff options
author | Brad King <brad.king@kitware.com> | 2014-07-24 16:44:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-07-24 17:31:14 (GMT) |
commit | 731427a646cd0ca81aa392872d18d125e917bf47 (patch) | |
tree | 0c0e26da647d04bc26f70d3a871640d6fc60f1c0 /Source/cmELF.cxx | |
parent | fe4e6ed991b936e147536832bbf7190f05887814 (diff) | |
download | CMake-731427a646cd0ca81aa392872d18d125e917bf47.zip CMake-731427a646cd0ca81aa392872d18d125e917bf47.tar.gz CMake-731427a646cd0ca81aa392872d18d125e917bf47.tar.bz2 |
cmGlobalGenerator: Do not re-add CMAKE_<LANG>_COMPILER
The cmGlobalGenerator::ResolveLanguageCompiler method, invoked only by
Makefile generators, contains code originally added by commit v2.4.0~796
(..., add new generators for msys and mingw, 2005-12-22) to compute the
full path to the compiler and save the result back into the cache value.
Since then the CMakeDetermine*Compiler modules have learned to resolve
the full path to the compiler and save it in CMake*Compiler.cmake files
configured in the build tree. The value of CMAKE_<LANG>_COMPILER in the
cache is now only for reference of what the user originally specified.
The full path is now available in a normal variable of the same name,
and this is used by project code and the generators.
When the user specifies -DCMAKE_<LANG>_COMPILER=name on the command-line
of an existing build tree that uses a Makefile generator, it is first
stored in the cache with an uninitialized type. Then later when
ResolveLanguageCompiler updates the cache entry and sets the type to
FILEPATH, cmMakefile::AddCacheDefinition does CollapseFullPath on the
"name" and ends up with something like "$PWD/name" which is unlikely to
be correct. Furthermore, cmMakefile::AddCacheDefinition proceeds to
remove the normal variable of the same name, so the value originally
saved in CMake<LANG>Compiler.cmake is ignored and the generators use the
wrong path to the compiler.
Resolve this by dropping the code from ResolveLanguageCompiler that
touches the cache value of CMAKE_<LANG>_COMPILER. As explained above it
is no longer needed anyway.
Diffstat (limited to 'Source/cmELF.cxx')
0 files changed, 0 insertions, 0 deletions