Initialize CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT from the value
of CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT rather than the one for
the DEBUG configuration. This typo has been present since the logic was
first added in commit 36db45082e (ENH: fix up several problems with new
stuff, 2002-11-11).
Reported-by: Gunnar Roth <gunnar.roth@gmx.de>
Initialize the CMAKE_CONFIGURATION_TYPES cache entry early during
EnableLanguage like the Xcode generator does. Avoid depending on
the MSVC compiler information module to do it. Otherwise code like
project(MyProj NONE)
sets CMAKE_CONFIGURATION_TYPES late (in GenerateConfigurations), and
to only "Debug" and "Release" instead of the standard set of 4.
Reported-by: Paul Smith <paul@mad-scientist.net>
In the response file also linker options could be passed,
and because <OBJECTS> is replaced by a response file, it
is necessary that no compiler option follows <OBJECTS>.
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block. This is no longer the preferred style.
Run the following shell code:
for c in else endif endforeach endfunction endmacro endwhile; do
echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed