Commit Graph

15 Commits

Author SHA1 Message Date
Daniel Pfeifer 5d0d980d99 Use string(APPEND) in Modules
Automate with:

find Modules -type f -print0 | xargs -0 perl -i -0pe \
's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
2016-07-28 00:41:13 +02:00
Brad King aec3c79acb Strip CMAKE_*_LINKER_FLAGS[_<CONFIG>] initializer whitespace 2016-07-13 14:41:21 -04:00
Jiri Malak 1b18f442f4 Avoid trailing space in CMAKE_*_LINKER_FLAGS when LDFLAGS is empty 2014-03-24 09:11:48 -04:00
Brad King 4ac75fdfe6 Prefer CMAKE_MAKE_PROGRAM over CMAKE_BUILD_TOOL (#14548)
Historically these were both added for the Makefile and Visual Studio
generators, respectively.  Later the VS generators started using the
CMAKE_MAKE_PROGRAM cache entry to find the IDE build tool, and the
CMAKE_BUILD_TOOL was simply set as an alias.

Fix the documentation to explain that CMAKE_MAKE_PROGRAM is the modern
variable and that CMAKE_BUILD_TOOL is the compatibility alias, not the
other way around.  Replace uses of CMAKE_BUILD_TOOL with
CMAKE_MAKE_PROGRAM in CMake-provided modules.  Nothing needs to lookup
CMAKE_BUILD_TOOL in the cache, so simply set it as a normal variable.
2013-11-18 08:26:23 -05:00
Patrick Gansterer 54f7019fd0 Add CMAKE_STATIC_LINKER_FLAGS to CMakeCommonLanguageInclude
Add support for CMAKE_STATIC_LINKER_FLAGS_* to
CMakeCommonLanguageInclude.cmake to set the defaults similar
to the other CMAKE_*_LINKER_FLAGS_*.
2013-07-31 08:41:07 -04:00
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
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
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
Brad King 3b77516862 Fix linker flag initialization from LDFLAGS (#11840)
When initializing CMAKE_(EXE|SHARED|MODULE)_LINKER_FLAGS from LDFLAGS
and CMAKE_(EXE|SHARED|MODULE)_LINKER_FLAGS_INIT quote the whole string
in case both are set.

Reported-by: Daniel R. Gomez <gomez@teragram.com>
2011-02-11 08:54:38 -05:00
Todd Gamblin 2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Brad King 3a666595c9 Convert CMake non-find modules to BSD License
This adds copyright/license notification blocks CMake's non-find
modules.  Most of the modules had no notices at all.  Some had notices
referring to the BSD license already.  This commit normalizes existing
notices and adds missing notices.
2009-09-28 11:46:51 -04:00
Bill Hoffman 45d85c2e34 BUG: fix for 3550 again 2006-07-26 13:19:34 -04:00
Bill Hoffman b7fa820118 ENH: add documentation support for modules 2005-12-14 13:51:08 -05:00
Bill Hoffman 692ba48c4e ENH: major changes to support addition of languages from cmake modules directory. 2004-09-22 14:42:05 -04:00
Bill Hoffman 66a08c10e5 ENH: more uniform approach to enable language, one step closer to being able to enable a language without modifing cmake source code 2004-08-26 14:55:55 -04:00