1. 13 Aug, 2012 3 commits
    • 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
    • Kitware Robot's avatar
      Remove trailing whitespace from most CMake and C/C++ code · 7bbaa428
      Kitware Robot authored and Brad King's avatar Brad King committed
      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/ \+$//'
    • Brad King's avatar
      Watcom: Simplify compiler version detection (#11866) · af42ae4f
      Brad King authored
      Since commit c198730b (Detect Watcom compiler version with its id,
      2011-12-07) the CMAKE_(C|CXX)_COMPILER_VERSION variables are set for the
      Watcom compiler.  Use these in Windows-wcl386.cmake to set the old
      WATCOM1* version variables.  This avoids using the old EXECUTE_PROCESS
      command which failed due to extra quotes anyway.
  2. 07 Aug, 2012 1 commit
  3. 04 Aug, 2012 1 commit
  4. 03 Aug, 2012 1 commit
  5. 02 Aug, 2012 2 commits
    • Brad King's avatar
      Prefer generic system compilers by default for C, C++, and Fortran · 7e58e5bb
      Brad King authored
      Teach CMake to prefer the system default compiler automatically when no
      compiler is specified.  By default use "cc" for C, "CC" for C++, and
      "f95" for Fortran.  Load a new Platform/<os>-<lang>.cmake module to
      allow each platform to specify for each language its system compiler
      name(s) and/or exclude certain names.
      Create Platform/(CYGWIN|Darwin|Linux|Windows)-CXX.cmake modules to
      specify "c++" as the system C++ compiler name for these platforms.  On
      systems that use case-insensitive filesystems exclude C++ compiler names
      that are distinguished from C compiler names only by case.
      This will change the default compiler selection for existing build
      scripts that do not specify a compiler when run on machines with
      separate system and GNU compilers both installed in the PATH.  We do not
      make this change in default behavior lightly.  However:
      (1) If a given build really needs specific compilers one should specify
          them explicitly e.g. by setting CC, CXX, and FC in the environment.
      (2) The motivating case is to prefer the system Clang on newer OS X
          systems over the older GNU compilers typically also installed.  On
          such systems the names "cc" and "c++" link to Clang.  This is the
          first platform known to CMake on which "c++" is not a GNU compiler.
          The old behavior selected "gcc" for C and "c++" C++ and therefore
          chooses GNU for C and Clang for C++ by default.  The new behavior
          selects GNU or Clang consistently for both languages on older or
          newer OS X systems, respectively.
      (3) Other than the motivating OS X case the conditions under which the
          behavior changes do not tend to exist in default OS installations.
          They typically occur only on non-GNU systems with manually-installed
          GNU compilers.
      (4) The consequences of the new behavior are not dire.  At worst the
          project fails to compile with the system compiler when it previously
          worked with the non-system GNU compiler.  Such failure is easy to
          work around (see #1).
      In short this change creates a more sensible default behavior everywhere
      and fixes poor default behavior on a widely-used platform at the cost of
      a modest change in behavior in less-common conditions.
    • Brad King's avatar
      Factor common code out of CMakeDetermine(ASM|C|CXX|Fortran)Compiler · 796e3373
      Brad King authored
      The compiler candidate list selection and search code for C, C++, ASM,
      and Fortran languages was duplicated across four modules.  To look for
      compilers adjacent to already-enabled languages the C and CXX modules
      each used _CMAKE_USER_(C|CXX)_COMPILER_PATH and the ASM module used
      _CMAKE_TOOLCHAIN_LOCATION.  Since commit 4debb7ac (Bias Fortran compiler
      search with C/C++ compilers, 2009-09-09) CMake prefers Fortran compilers
      matching the vendor and directory of an enabled C or C++ compiler.
      Factor out the common functionality among the four languages into a new
      CMakeDetermineCompiler module.  Generalize the Fortran implementation so
      that all languages may each use the vendor and directory of the other
      languages that have already been enabled.  For now do not list any
      vendor-specific names for C, C++, or ASM so that only the directory
      preference is used for these languages (existing behavior).
  6. 31 Jul, 2012 1 commit
  7. 30 Jul, 2012 1 commit
  8. 29 Jul, 2012 6 commits
  9. 28 Jul, 2012 2 commits
  10. 21 Jul, 2012 1 commit
  11. 18 Jul, 2012 1 commit
  12. 11 Jul, 2012 1 commit
  13. 10 Jul, 2012 1 commit
    • Brad King's avatar
      Add ASM platform information for GNU compiler on AIX (#13390) · 7755283e
      Brad King authored
      Among other flags this sets RPATH flags correctly so that CMake knows
      how to treat CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH for the ASM language.
      This is the GNU compiler equivalent to commit a0bab7ae (Add ASM platform
      information for XL compiler on AIX, 2011-03-02), made for XL.
  14. 09 Jul, 2012 2 commits
  15. 05 Jul, 2012 1 commit
  16. 04 Jul, 2012 1 commit
  17. 30 Jun, 2012 2 commits
  18. 25 Jun, 2012 2 commits
  19. 20 Jun, 2012 4 commits
  20. 19 Jun, 2012 5 commits
  21. 18 Jun, 2012 1 commit