Commit Graph

8 Commits

Author SHA1 Message Date
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
Stephen Kelly 31d7a0f2e3 Add platform variables for position independent code flags
Store in new platform variables

  CMAKE_${lang}_COMPILE_OPTIONS_PIC
  CMAKE_${lang}_COMPILE_OPTIONS_PIE

flags for position independent code generation.

In almost all cases, this means duplication of the
CMAKE_SHARED_LIBRARY_${lang}_FLAGS for the _PIC case and using the
assumed pie equivalent for the _PIE case.  Note that the GNU compiler
has supported -fPIE since 3.4 and that there is no -fPIC on GNU for
Windows or Cygwin.

There is a possibility that the _PIE variables are not correct.
However, as there is no backwards compatibility to be concerned about
(as the POSITION_INDEPENDENT_CODE property is not used anywhere yet),
the current state suffices.
2012-06-12 15:37:53 -04:00
Alexander Neundorf f9cb0f3cb4 BUG: also include UnixPaths.cmake on these platforms, this also sets UNIX to 1
Alex
2007-08-10 08:54:42 -04: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
Bill Hoffman c3530dd01f BUG: fix for bug 383 gcc flags are now always set if the compiler is gnu 2003-11-14 10:44:12 -05:00
Bill Hoffman f5d95fb078 Complete rework of makefile generators expect trouble 2002-11-08 15:46:08 -05:00