Commit Graph

7 Commits

Author SHA1 Message Date
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
Brad King 4d72006bd6 Reduce duplication in Platform/<os>.cmake files
Several platform-wide linker flag variables are defined in
Modules/Platform/<os>.cmake files for C and then copied by the
Modules/CMake<lang>Information.cmake file for each language.
We now use this approach for the variables

  CMAKE_EXE_EXPORTS_${lang}_FLAG
  CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG
  CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS

to avoid duplication for multiple languages in each platform file.
2009-12-02 15:17:53 -05:00
Brad King e28c16b482 Split GNU compiler information files
This moves GNU compiler flags into new-style modules

  Compiler/GNU-<lang>.cmake
  Platform/<os>-GNU-<lang>.cmake

We use language-independent helper modules

  Compiler/GNU.cmake
  Platform/<os>-GNU.cmake

to define macros consolidating the information.
2009-12-02 09:52:00 -05: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
Alexander Neundorf 176fe63d15 ENH: UNIX, CYGWIN, WIN32, APPLE, QNXNTO and BEOS are not longer set in
cmMakefile.cxx, but now in the platform files and are now valid for the
target platform, not the host platform.
New variables CMAKE_HOST_WIN32, CMAKE_HOST_UNIX, CMAKE_HOST_APPLE and
CMAKE_HOST_CYGWIN have been added in cmMakefile.cxx (...and have now to be
used in all cmake files which are executed before
CMakeSystemSpecificInformation.cmake is loaded). For compatibility the old
set is set to the new one in CMakeDetermineSystem.cmake and reset before the
system platform files are loaded, so custom language or compiler modules
which use these should still work.

Alex
2007-08-09 14:45:23 -04:00
Bill Hoffman a47820ca86 ENH: add beos file 2006-12-07 16:14:09 -05:00