1. 13 Aug, 2012 1 commit
    • Kitware Robot's avatar
      Convert CMake-language commands to lower case · 77543bde
      Kitware Robot authored and Brad King's avatar Brad King committed
      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
  2. 12 Jun, 2012 2 commits
    • Stephen Kelly's avatar
      Add platform variable for flags specific to shared libraries · 55d7aa4c
      Stephen Kelly authored and Brad King's avatar Brad King committed
      Store in CMAKE_${lang}_COMPILE_OPTIONS_DLL flags from
      CMAKE_SHARED_LIBRARY_${lang}_FLAGS that are truly exclusive to shared
    • Stephen Kelly's avatar
      Add platform variables for position independent code flags · 31d7a0f2
      Stephen Kelly authored and Brad King's avatar Brad King committed
      Store in new platform variables
      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.
  3. 30 Apr, 2012 1 commit
    • Modestas Vainius's avatar
      Support building shared libraries or modules without soname (#13155) · e1409ac5
      Modestas Vainius authored and Brad King's avatar Brad King committed
      Add a boolean target property NO_SONAME which may be used to disable
      soname for the specified shared library or module even if the platform
      supports it.  This property should be useful for private shared
      libraries or various plugins which live in private directories and have
      not been designed to be found or loaded globally.
      Replace references to <CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG> and
      hard-coded -install_name flags with a conditional <SONAME_FLAG> which is
      expanded to the value of the CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG
      definition as long as soname supports is enabled for the target in
      question.  Keep expanding CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG in
      rules in case third party projects still use it.  Such projects would
      not yet use NO_SONAME so the adjacent <TARGET_SONAME> will always be
      expanded.  Make <TARGET_INSTALLNAME_DIR> NO_SONAME aware as well.  Since
      -install_name is soname on OS X, this should not be a problem if this
      variable is expanded only if soname is enabled.
      The Ninja generator performs rule variable substitution only once
      globally per rule to put its own placeholders.  Final substitution is
      performed by ninja at build time.  Therefore we cannot conditionally
      replace the soname placeholders on a per-target basis.  Rather than
      omitting $SONAME from rules.ninja, simply do not write its contents for
      targets which have NO_SONAME.  Since 3 variables are affected by
      soname is enabled.
  4. 25 Mar, 2012 1 commit
  5. 02 Feb, 2012 1 commit
  6. 05 Dec, 2011 1 commit
  7. 02 Dec, 2011 1 commit
  8. 31 Aug, 2011 1 commit
    • Brad King's avatar
      Fortran: Add support for free- and fixed-form flags · 5c0c635a
      Brad King authored
      Define a "Fortran_FORMAT" target and source file property.  Initialize
      the target property from a "CMAKE_Fortran_FORMAT" variable.  Interpret
      values "FIXED" and "FREE" to indicate the source file format.  Append
      corresponding flags to the compiler command line.
  9. 29 Aug, 2011 1 commit
    • Todd Gamblin's avatar
      Fix XL compilers on non-AIX machines. · d1697625
      Todd Gamblin authored
      Linking broken on non-AIX machines when using XL compilers due to those
      machines not using the CreateExportList tool.  Made use of this tool
      conditional on finding it.
  10. 13 Jun, 2011 1 commit
  11. 01 Jun, 2011 1 commit
  12. 20 May, 2011 1 commit
  13. 08 Apr, 2011 1 commit
    • Brad King's avatar
      XL: Avoid copying archives into shared libraries that link them · d468a2c2
      Brad King authored
      The XL toolchain supports shared object files stored in archives.  Since
      CMake lists libraries on link lines by full path it is common for a
      shared library link line to contain the path to an archive file.
      When linking a shared library the compiler front-end by default runs
      CreateExportList to construct the list of symbols to be exported.
      Unfortunately it passes all files found on the command line to the tool
      so archive and library files get processed along with the object files.
      The tool returns a list of all symbols in all objects, archives, and
      libraries on the command line.  This causes the linker to copy every
      object file out of every archive into the shared library whether they
      are dependencies of the original object files or not.
      Work around this problem by running CreateExportList ourselves with just
      the original object files intended for inclusion in the shared library.
      Then pass the list it produces on the link line to prevent the compiler
      front-end from constructing its own.  This tells the linker to export
      only the symbols provided by the original source files of the shared
  14. 07 Apr, 2011 2 commits
    • Brad King's avatar
      XL: Consolidate compiler flag information · 2f3eee74
      Brad King authored
      Factor duplicate information out of Compiler/XL-<lang>.cmake modules
      into a macro in a new Compiler/XL.cmake module.  Invoke it from the
      per-language files to produce the original settings.
    • Brad King's avatar
      XL: Set C++ and Fortran flags consistently with C · 3a40c7fa
      Brad King authored
      Since commit e1729238 (Add initial XL C compiler flags for safer builds,
      2009-09-30) CMake sets the initial XL C flags to include "-qthreaded"
      and "-qhalt=e".  Do the same for C++ and Fortran with this toolchain.
  15. 02 Mar, 2011 1 commit
  16. 23 Feb, 2011 9 commits
  17. 30 Jan, 2011 1 commit
    • Alexander Neundorf's avatar
      Rework the way assembler is handled, use the C/CXX compiler by default · 4b40d429
      Alexander Neundorf authored
      This commit changes the way how the assembler support works in cmake.
      The language "ASM" now always uses the C/Cxx compiler instead
      of the assembler directly. This fixes #8392, assembler files are
      not preprocessed.
      If one wants to use the assembler directly, the specific
      assembler "dialect" has to be enabled. I.e. to get as/gas,
      you have to use now ASM-ATT, the same way for ASM_MASM and ASM_NASM.
      Implemented this now for gcc.
      SunStudio, IBM, HP and Intel still todo.
  18. 17 Jan, 2011 1 commit
  19. 09 Dec, 2010 1 commit
    • Brad King's avatar
      Add NAG Fortran compiler information files · af2ad909
      Brad King authored
      On Linux the NAG Fortran compiler uses gcc under the hood to link.  Use
      "-Wl,-v" to pass "-v" to the underlying gcc compiler to get verbose link
      output.  Detect the NAG Fortran directory (using -dryrun) and then honor
      object files in the directory referenced in the implicit link line.
      Pass real linker options with "-Wl,-Xlinker,".  The -Wl, gets through
      the NAG front-end and the -Xlinker gets through the gcc front-end.
  20. 12 Nov, 2010 1 commit
  21. 09 Aug, 2010 1 commit
  22. 17 May, 2010 1 commit
    • Brad King's avatar
      Recognize Clang C and C++ compilers (see #10693) · 571dc748
      Brad King authored
      Map to the platform and compiler information for GNU because the
      compilers are command-line compatible for common operations.  Later we
      can add Clang-specific features as necessary.  We honor the preferred
      capitalization is "Clang", not the common mis-spelling "CLang".
  23. 17 Apr, 2010 1 commit
  24. 28 Jan, 2010 1 commit
  25. 13 Jan, 2010 1 commit
    • Brad King's avatar
      PathScale C/C++/Fortran Compiler Information · da36cde0
      Brad King authored
      We add compiler information files
      to specify PathScale compiler information for C, C++, and Fortran
      languages.  We use a macro in Compiler/PathScale.cmake to consolidate
      the information common to all languages.
  26. 04 Dec, 2009 1 commit
    • Brad King's avatar
      Generalize support for Portland Group Compiler · c106cb2e
      Brad King authored
      We factor flags from Platform/Linux-PGI-Fortran.cmake into language
      independent helper modules
      and invoke the macros from
      This enables general support for the PGI compilers.
  27. 02 Dec, 2009 1 commit
    • Brad King's avatar
      Split GNU compiler information files · e28c16b4
      Brad King authored
      This moves GNU compiler flags into new-style modules
      We use language-independent helper modules
      to define macros consolidating the information.
  28. 01 Dec, 2009 1 commit
    • Brad King's avatar
      Drop -rdynamic from Linux build rules · 1f06c33f
      Brad King authored
      This is a GNU-specific option that should not be specified for all
      compilers on Linux.  It tells the GNU compiler to pass -export-dynamic
      to the linker to export symbols from executables for use by plugins.
      Since we provide the ENABLE_EXPORTS target property to do the same thing
      in a cross-platform way, there is no need to pass -rdynamic always.
      Since the option is not useful for GNU tools and breaks other tools on
      Linux we simply remove it from CMAKE_SHARED_LIBRARY_LINK_<lang>_FLAGS.
      This also allows us to stop setting the variable in other Linux compiler
      files just to erase the bad flag.
      See issue #9985.
  29. 28 Oct, 2009 1 commit
  30. 23 Oct, 2009 1 commit