1. 14 Jun, 2017 1 commit
    • Brad King's avatar
      IPO: Consider support for each language separately · ba247cca
      Brad King authored
      We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and
      Fortran languages.  Do not try to enable support for other languages.
      Furthermore, each language builds with a different compiler, so check
      for support by CMake and the compiler for each language independently.
      
      Fixes: #16944
      ba247cca
  2. 02 May, 2017 1 commit
  3. 03 Apr, 2017 1 commit
  4. 30 Mar, 2017 1 commit
  5. 27 Sep, 2016 1 commit
    • Brad King's avatar
      Simplify CMake per-source license notices · 86578ecc
      Brad King authored
      Per-source copyright/license notice headers that spell out copyright holder
      names and years are hard to maintain and often out-of-date or plain wrong.
      Precise contributor information is already maintained automatically by the
      version control tool.  Ultimately it is the receiver of a file who is
      responsible for determining its licensing status, and per-source notices are
      merely a convenience.  Therefore it is simpler and more accurate for
      each source to have a generic notice of the license name and references to
      more detailed information on copyright holders and full license terms.
      
      Our `Copyright.txt` file now contains a list of Contributors whose names
      appeared source-level copyright notices.  It also references version control
      history for more precise information.  Therefore we no longer need to spell
      out the list of Contributors in each source file notice.
      
      Replace CMake per-source copyright/license notice headers with a short
      description of the license and lin...
      86578ecc
  6. 02 Aug, 2016 1 commit
  7. 06 Jul, 2016 1 commit
    • Brad King's avatar
      Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain files · a66004be
      Brad King authored
      Document these variables.
      
      Change our convention for setting these variables from:
      
          set(CMAKE_C_FLAGS_INIT "...")
      
      to
      
          string(APPEND CMAKE_C_FLAGS_INIT " ...")
      
      so that any value previously set by a toolchain file will be used.
      
      Automate the conversion with:
      
          sed -i 's/set *(\(CMAKE_\(C\|CXX\|Fortran\|RC\|ASM\|${[^}]\+}\)_FLAGS\(_[^_]\+\)\?_INIT \+"\)/string(APPEND \1 /' \
            Modules/Compiler/*.cmake Modules/Platform/*.cmake
      
      and follow up with some manual fixes (e.g. to cases that already
      meant to append).  Also revert the automated changes to contexts
      that are not protected from running multiple times.
      a66004be
  8. 15 Mar, 2016 1 commit
  9. 07 Feb, 2016 1 commit
    • Gregor Jasny's avatar
      Apple: Enable -isystem for GNU Compiler >= 4 (#15953) · 2cae5128
      Gregor Jasny authored
      Due to #4662 -isystem support was disabled for all GNU Compilers
      on Apple platforms. But the change was probably a just work around
      for a broken compiler on Tiger (see 10837#c27206). So we tighten
      the condition to only kick in for GCC versions earlier than 4.
      That should ensure sane behavior for Xcode 3.2 and later.
      2cae5128
  10. 13 Jul, 2015 1 commit
    • Brad King's avatar
      Factor an <INCLUDES> placeholder out of <FLAGS> in rule variables · c736de7b
      Brad King authored
      Teach the Makefile and Ninja generators to substitute for an <INCLUDES>
      placeholder instead of putting -I in <FLAGS>.  Update our values for
      
        CMAKE_<LANG>_COMPILE_OBJECT,
        CMAKE_<LANG>_CREATE_ASSEMBLY_SOURCE, and
        CMAKE_<LANG>_CREATE_PREPROCESSED_SOURCE
      
      to place <INCLUDES> just before <FLAGS>.
      c736de7b
  11. 19 Nov, 2013 1 commit
    • Stephen Kelly's avatar
      Add CMAKE_SYSROOT variable to set --sysroot when cross compiling. · 7cd65c97
      Stephen Kelly authored and Brad King's avatar Brad King committed
      As CMAKE_ROOT_FIND_PATH can be a list, a new CMAKE_SYSROOT is
      introduced, which is never a list.
      
      The contents of this variable is passed to supporting compilers
      as --sysroot. It is also accounted for when processing implicit
      link directories reported by the compiler, and when generating
      RPATH information.
      7cd65c97
  12. 12 Jul, 2013 1 commit
  13. 07 Jun, 2013 1 commit
    • Stephen Kelly's avatar
      Use --sysroot when cross compiling. · de4da665
      Stephen Kelly authored
      As CMAKE_ROOT_FIND_PATH can be a list, a new CMAKE_SYSROOT is
      introduced, which is never a list.
      
      The contents of this variable is passed to supporting compilers
      as --sysroot. It is also accounted for when processing implicit
      link directories reported by the compiler, and when generating
      RPATH information.
      de4da665
  14. 02 Jun, 2013 1 commit
  15. 15 Aug, 2012 1 commit
  16. 13 Aug, 2012 2 commits
    • Kitware Robot's avatar
      Remove CMake-language block-end command arguments · 9db31162
      Kitware Robot authored and Brad King's avatar Brad King committed
      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
      9db31162
    • 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
      77543bde
  17. 12 Jun, 2012 1 commit
    • 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
      
        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.
      31d7a0f2
  18. 25 Mar, 2012 1 commit
  19. 02 Feb, 2012 1 commit
  20. 13 Jun, 2011 1 commit
  21. 09 Aug, 2010 1 commit
  22. 28 Jan, 2010 1 commit
  23. 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
      
        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.
      e28c16b4