1. 15 Feb, 2019 1 commit
    • Brad King's avatar
      try_compile: Restore expansion of ;-list in COMPILE_DEFINITIONS · cde2596a
      Brad King authored
      The quoting added by commit 8c5221fb (try_compile: Preserve special
      characters in COMPILE_DEFINITIONS, 2019-01-21, v3.14.0-rc1~108^2~3)
      broke the case that the `COMPILE_DEFINITIONS` value contains a `;`.
      Without the quoting the `;` would be generated literally in an unquoted
      argument in the test `CMakeLists.txt` file and would then be expanded.
      With quoting the `;` is preserved, which is not the old behavior.
      
      Fix this by expanding the `;`-list ahead of time.  Add test cases for
      behavior with both `#` and `;`.
      
      This was noticed with the PGI compiler where we set
      `CMAKE_CXX*_STANDARD_COMPILE_OPTION` to values like `--c++17;-A`.  The
      symptom had also been observed while preparing commit ef8f2376
      (ParseImplicitIncludeInfo: add SunPro Fortran and PGI compiler, Cray
      fix, 2019-01-29, v3.14.0-rc1~26^2~2) but was not recognized at the time
      as a regression.  Revert the workaround added by that commit.
      
      Fixes: #18919
      cde2596a
  2. 14 Feb, 2019 1 commit
    • Brad King's avatar
      Fortran: Fix submodule file names across compilers · d80ecba5
      Brad King authored
      The naming convention for submodule files varies across compilers.  Add
      a table to the compiler information modules and thread the information
      through to the Fortran module dependency parser.  Fill out the table for
      compiler ids known to support Fortran submodules.
      
      Fixes: #18746
      d80ecba5
  3. 13 Feb, 2019 2 commits
    • Brad King's avatar
      Fix regression in -I/usr/include exclusion logic · 557b2d6e
      Brad King authored
      The change in commit 15ad8300 (Refactor exclusion of -I/usr/include to
      avoid per-language values, 2019-01-21, v3.14.0-rc1~108^2~4) caused the
      exclusion to apply to Fortran, but it was only meant for C, CXX, and
      CUDA.  The purpose of the change was to prepare for the value of
      `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` to be computed from the
      actual compiler instead of hard-coded.  We need to preserve exclusion of
      `-I/usr/include` if the compiler has any implicit include directory that
      looks intended to replace it, e.g. `<sdk>/usr/include` on macOS.
      
      Fixes: #18914
      557b2d6e
    • Brad King's avatar
      macOS: Fix addition of <sdk>/usr/include to default implicit include dirs · 017598a4
      Brad King authored
      In commit 1293ed85 (ParseImplicitIncludeInfo: keep implicit incl.
      consistent when rerunning cmake, 2019-01-30, v3.14.0-rc1~26^2) the
      `Platform/UnixPaths` module was updated to add `/usr/include` to
      `CMAKE_{C,CXX,CUDA}_IMPLICIT_INCLUDE_DIRECTORIES` through an
      initialization variable used by `CMakeDetermineCompilerABI` instead of
      directly.  This approach makes it only a default that can be overridden
      by detection of the implicit include directories really used by the
      compiler.
      
      The addition of `<sdk>/usr/include` to default implicit include
      directories by the `Platform/Darwin` module needs the same update but
      was accidentally left out of the original commit.
      017598a4
  4. 11 Feb, 2019 1 commit
  5. 08 Feb, 2019 1 commit
  6. 07 Feb, 2019 4 commits
  7. 06 Feb, 2019 2 commits
  8. 04 Feb, 2019 3 commits
  9. 31 Jan, 2019 2 commits
    • Brad King's avatar
      FindLAPACK: Distinguish check result variable name from FindBLAS · 6f5e4a53
      Brad King authored
      Since commit 192a9182 (FindLAPACK: MKL clean up and fix for windows,
      2013-10-08, v3.0.0-rc1~538^2), FindLAPACK accidentally used FindBLAS's
      `BLAS_` prefix for some of its check results.
      
      Since commit 5b8f69eb (FindBLAS: Detect implicitly linked BLAS
      library, 2018-08-28, v3.13.0-rc1~150^2~2), FindBLAS stores a check
      result in a plain `BLAS_WORKS` variable.  The typo in FindLAPACK happens
      to cause a collision with that name.
      
      The typo was already fixed in post-3.13 development as part of other
      work in commit 8b63265e (FindLAPACK: Unify internal variables related
      to MKL, 2018-11-18).  Fix the typo in the 3.13 version of FindLAPACK to
      avoid the collision.  Otherwise it could cause FindLAPACK to incorrectly
      determine that a certain library combination does not work (or
      incrrectly that it works).
      
      Fixes: #18860
      6f5e4a53
    • Brad King's avatar
      Find{BLAS,LAPACK}: Drop unnecessary mark_as_advanced calls · bb735025
      Brad King authored
      Cache entries created by `try_compile` are already `INTERNAL`.
      bb735025
  10. 30 Jan, 2019 6 commits
    • Brad King's avatar
      Ninja: Use deps=gcc for Intel Compiler on Windows · a624a3e1
      Brad King authored
      Ninja 1.9 supports the depfile format generated by this compiler.
      Use `deps = gcc` when the version of Ninja is new enough.
      
      Unfortunately the Intel Compiler for Windows does not properly
      escape spaces in paths written to a depfile so if there is a
      space in the path we must still fall back to `deps = msvc`.
      
      Fixes: #18855
      a624a3e1
    • chuck cranor's avatar
      ParseImplicitIncludeInfo: keep implicit incl. consistent when rerunning cmake · 1293ed85
      chuck cranor authored
      The first time you run cmake, it sets the implicit include path
      to the value reported by the parser (and this value gets saved
      in CMake${lang}Compiler.cmake).  But if you re-run cmake,
      UnixPaths.cmake blindly appends an extra /usr/include to the
      value saved in CMake${lang}Compiler.cmake.  That should not be
      harmful in most cases, but we want later runs of cmake to be
      consistent with the initial one.  Resolve using a solution
      suggested by Brad King:
      
        - UnixPaths now sets the default implicit include path in a new
          variable named _CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES_INIT
          This value is only used the first time cmake is run (by
          CMakeDetermineCompilerABI.cmake when it calls the implicit
          include parser).
      
        - if CMakeDetermineCompilerABI.cmake successfully calls the
          implicit include parser, it overwrites the value in
          _CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES_INIT with the
          value returned by the parser
      
        - CMakeDetermineCompilerABI.cmake always sets
          CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES to the above value
          of _CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES_INIT
      
        - the final value of CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES gets
          saved to CMake${lang}Compiler.cmake when it is regenerated after
          the compiler tests are done.
      
        - CMakeDetermineCompilerABI.cmake is only executed the first time cmake
          is run.  Additional runs of cmake directly load the implicit include
          path from the value saved in CMake${lang}Compiler.cmake (the parser
          and _INIT variable are not used).
      
      The above depends on UnixPaths.cmake being loaded to set the _INIT value
      before CMakeDetermineCompilerABI.cmake runs the implicit include parser.
      1293ed85
    • Michael Hirsch, Ph.D's avatar
    • Michael Hirsch, Ph.D's avatar
    • Roger Leigh's avatar
    • Michael Hirsch, Ph.D's avatar
      ba30b944
  11. 29 Jan, 2019 2 commits
    • chuck cranor's avatar
      CrayPrgEnv/ParseImplicitIncludes: simplify for new implict include parser · eaf53158
      chuck cranor authored
      Remove now redundant implicit parser code from CrayPrgEnv.cmake, as
      this function is now supported in the general cmake code
      (e.g. Modules/CMakeParseImplicit{Include,Link}Info.cmake).
      
      This simplifies __CrayPrgEnv_setup() to take only one arg (${lang})
      and allows us to remove a level of inclusion as
      CrayPrgEnv-${lang}.cmake is now compiler independent we
      do not need the CrayPrgEnv-${compiler}-${lang} files any more.
      eaf53158
    • chuck cranor's avatar
      ParseImplicitIncludeInfo: add SunPro Fortran and PGI compiler, Cray fix · ef8f2376
      chuck cranor authored
      Add implicit include parser for PGI compiler ID.  PGI verbose output
      for CXX differs from C and Fortran, so CXX is broken out into its own
      case.  The C and Fortran compilers take "-YI,path" and "-Mnostdinc" to
      change or disable the builtin include path.  The last arg on the command
      line appears to override previous args (e.g. "-YI,path1 -YI,path2" will
      set the path to "path2" ... the previous "-YI,path1" gets undone).
      The CXX compiler verbose output reports with "-I" rather than "-stdinc"
      for the built in path.  In addition with CXX "-Mnostdinc" does not
      completely zero the include path (e.g. "#include <stdio.h>" still works
      with "-Mnostdinc"... "-I/usr/include" still shows up in the verbose output).
      
      Minor adjustments to get the SunPro parser to handle Fortran as well.
      
      Fixes for Cray compiler support (Modules/Compiler/Cray-{C,CXX}.cmake):
      The *_COMPILE_OPTION flags contain options like "-h c99,gnu" ...
      these options need to be in double quotes (they are currently not).
      Otherwise, cmake treats them as lists and tries to run the compiler
      with "-h;c99,gnu" and fails when it is "Detecting C compile features"...
      Also, the Cray-CXX.cmake contains "__compiler_cray(C)" instead of
      "__compiler_cray(CXX)" -- this error prevents the correct VERBOSE
      flags for CXX from being defined which prevents the implicit include
      parser from running.
      
      Add additional test cases for PGI and SunPro Fortran to the
      Tests/RunCMake/ParseImplicitIncludeInfo area.
      ef8f2376
  12. 28 Jan, 2019 1 commit
  13. 26 Jan, 2019 2 commits
  14. 25 Jan, 2019 5 commits
    • chuck cranor's avatar
      ParseImplicitIncludeInfo: add Fortran implicit include handling · 2e91627d
      chuck cranor authored
      Currently cmake is only setting CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES
      the first time it runs (the implicit includes parser is only run when
      the cache variables are initially populated).  It is left unset
      during additional runs.  This behavior is both confusing and
      inconsistent.
      
      Modify CMakeFortranCompiler.cmake.in to preserve the value of
      CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES so that cmake's Fortran
      behavior matches C and CXX (i.e. CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES
      retains its value across runs).  The implicit includes variable may
      not be as useful for Fortran as it is for C and CXX, but we do want
      cmake to be consistent in how it is handled.
      
      Adjust CMakeParseImplicitIncludeInfo to parse verbose Fortran output
      for Cray and XL compiler IDs (GNU and clang were already ok since
      they use the same verbose output format as they do with C/CXX).
      
      Allow Tests/RunCMake/ParseImplicitIncludeInfo/data/CMakeLists.txt
      to generate test inputs for Fortran too, and add some sample Fortran
      input files for the Tests/RunCMake/ParseImplicitIncludeInfo test.
      2e91627d
    • chuck cranor's avatar
      ParseImplicitIncludeInfo: handle/add SunPro, XL, and -nostdinc test cases · 56834376
      chuck cranor authored
      Add parser code for compiler IDs SunPro and XL.  For SunPro, /usr/include
      appears to be hardwired in and it does not have a -nostdinc-type flag.
      
      For XL, the "xlc" and "xlC" commands determine if you are C or C++
      based on input filename.  So compiling x.c with "xlC" reverts to C
      and compiling x.cc with "xlc" upgrades to CXX.  System include paths
      are specified by:
        -qc_stdinc=[path] and -qgcc_c_stdinc=[path] (for C)
        -qcpp_stdinc=[path] and -qgcc_cpp_stdinc=[path] (for CXX)
      If you specify "-qnostdinc" then the above flags are ignored.
      Specifying an empty path reverts the value to the default
      path (e.g. "-qgcc_c_stdinc=" reverts that to the default).
      
      Adjust the code to handle parsing the case where the user specifies
      additional compiler include flags via CMAKE_C_FLAGS/CMAKE_CXX_FLAGS.
      For example: "-DCMAKE_C_FLAGS=-nostdinc" ... note that gcc and clang
      output slightly differ when -nostdinc is specified (clang skips
      printing 'search starts here:' with the angle brackets, gcc always
      prints it).
      
      Enable sunos-{C,CXX}-SunPro test cases and add XL test cases.
      Also add a few -nostdinc style tests.
      56834376
    • lucy phipps's avatar
      Reduce size of PNG images · b9e6d045
      lucy phipps authored
      Use FileOptimizer 13.50.2431 (x86) and ZopfliPNG 1.0.2.
      
      Update expected file hashes in tests.
      b9e6d045
    • lucy phipps's avatar
      CPack: Replace corrupted background png with original · 880e3805
      lucy phipps authored
      The `Modules/CPack.background.png.in` file was originally added by
      commit f2c0dbd1 (ENH: More work on the packaging. Add Applicaitons,
      add icons, etc, 2007-02-13, v2.6.0~2217).  Then it was removed
      accidentally by commit 5308afa3 (ENH: remove unused file, 2009-03-03,
      v2.8.0~963) and restored by commit f9dd6a38 (ENH: add file back bug
      use cmake image, 2009-03-04, v2.8.0~958) but with corruption.
      
      Restore the original image file and add a Git attribute to prevent
      newline conversion as we do for other `.png` files.
      880e3805
    • Brad King's avatar
      Intel: Record support for relaxed constexpr by version 18.0.5 · fc40bca5
      Brad King authored
      Update the special case added by commit f719a13c (Features: Add
      special case to disable relaxed constexpr for Intel 18, 2018-06-04,
      v3.12.0-rc1~11^2) to record that 18.0.5 fixed the regression.
      fc40bca5
  15. 24 Jan, 2019 2 commits
  16. 23 Jan, 2019 3 commits
  17. 22 Jan, 2019 1 commit
  18. 21 Jan, 2019 1 commit
    • chuck cranor's avatar
      Compute implicit include directories from compiler output · 5990ecb7
      chuck cranor authored
       - CMakeParseImplicitIncludeInfo.cmake: new parser that extracts the
         compiler's include path from verbose output.  If the parser cannot
         parse the output, we fall back to the old behavior.  On osx we skip
         over framework directories (handled elsewhere).
      
       - CMakeDetermineCompilerABI.cmake:
           - use verbose flag in try_compile for ${src}
           - use new cmake_parse_implicit_include_info() to attempt extract
             implicit include directory path and if successful set
              CMAKE_${LANG}_IMPLICIT_INCLUDE_DIRECTORIES
      
       - CMakeCCompiler.cmake.in and CMakeCXXCompiler.cmake.in - preserve
         CMAKE_${LANG}_IMPLICIT_INCLUDE_DIRECTORIES value between runs in
         the same way CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES is preserved
      
       - Tests/RunCMake/ParseImplicitIncludeInfo: tests for parse
         based on the older Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in.
         The test runs a set of verbose compiler outputs collected from
         various machines through the parser and checks the results.  New
         compiler files can be added by dropping input/output files in the
         ParseImplicitIncludeInfo/data subdirectory and then adding the new set
         of files to the ${targets} list in ParseImplicitIncludeInfo.cmake.
         There is a helper CMakeLists.txt in ParseImplicitIncludeInfo/data
         that can help with the generation of test input files.
         NOTE: the standard cmake pre-commit hook rejects verbose compiler
         output with trailing spaces... you have to manually edit them out.
         This shouldn't impact the test.
      
      Note that both the parser and the test code can use CMAKE_${LANG}_COMPILER_*
      variables such as ${CMAKE_CXX_COMPILER_ID} to decide how to parse
      verbose compiler output.  For the test code, this requires us to
      save the variables values in the test input files.
      
      Fixes: #16291
      5990ecb7