1. 01 Feb, 2019 1 commit
  2. 30 Jan, 2019 4 commits
  3. 29 Jan, 2019 2 commits
    • Brad King's avatar
      macOS: Restore compatibility for setting FRAMEWORK after install() · d9dd68cb
      Brad King authored
      The `FRAMEWORK` target property affects the way the `install()` command
      treats the target and so should be set first.  Our implementation
      assumed that this was always the case and led to an assertion failure.
      Prior to CMake 3.12 this was visible only when using an explicit
      `LIBRARY ... NAMELINK_ONLY` option, but commit 0212d7c7 (install: add
      NAMELINK_COMPONENT argument, 2018-04-18, v3.12.0-rc1~139^2~3) made
      it possible with a simple `LIBRARY DESTINATION`.
      
      Fully supporting out-of-order specification will require non-trivial
      refactoring to defer install generator creation to generate time.
      For now simply restore the old behavior of installing the framework
      to the library destination.
      
      Fixes: #18848
      d9dd68cb
    • 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
  4. 28 Jan, 2019 5 commits
  5. 27 Jan, 2019 3 commits
  6. 26 Jan, 2019 1 commit
  7. 25 Jan, 2019 3 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 and Brad King's avatar Brad King committed
      Use FileOptimizer 13.50.2431 (x86) and ZopfliPNG 1.0.2.
      
      Update expected file hashes in tests.
      b9e6d045
  8. 24 Jan, 2019 2 commits
  9. 23 Jan, 2019 3 commits
  10. 22 Jan, 2019 4 commits
  11. 21 Jan, 2019 4 commits
    • Zack Galbreath's avatar
      Pass EXCLUDE_FROM_ALL from directory to targets · dc688857
      Zack Galbreath authored
      When a target is created it now inherits the EXCLUDE_FROM_ALL property
      from its directory. This change makes it possible to include a target
      in "all", even if its directory has been marked as EXCLUDE_FROM_ALL.
      dc688857
    • chuck cranor's avatar
      Compute implicit include directories from compiler output · 5990ecb7
      chuck cranor authored and Brad King's avatar Brad King committed
       - 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
    • Kyle Edwards's avatar
      FindGit: Add imported target · 97700e9f
      Kyle Edwards authored
      97700e9f
    • Kyle Edwards's avatar
      CROSSCOMPILING_EMULATOR: Fix test generation for empty value · ab3b549e
      Kyle Edwards authored
      If CROSSCOMPILING_EMULATOR was set to an empty string, and a test
      was generated with the executable as the command, CMake would segfault
      upon trying to generate the test file. Fix this.
      
      Fixes: #18819
      ab3b549e
  12. 18 Jan, 2019 3 commits
    • Artur Ryt's avatar
      Help: Mark default CMake generator with asterisk · dfd5ae7d
      Artur Ryt authored and Brad King's avatar Brad King committed
      Required extracting default generator evaluation
      to explicit function, as Visual Studio generators
      get validated during their construction.
      
      Fixes: #18544
      dfd5ae7d
    • Kyle Edwards's avatar
      CMAKE_ROLE: Fix value for ctest --build-and-test · 264bdac1
      Kyle Edwards authored
      --build-and-test builds a CMake project, so CMAKE_ROLE should be
      PROJECT. Fix this and add a test case.
      264bdac1
    • Andrew Paprocki's avatar
      Fortran: Add compiler ID/Version generator expressions · a0809142
      Andrew Paprocki authored and Brad King's avatar Brad King committed
      Adds `Fortran_COMPILER_ID` and `Fortran_COMPILER_VERSION` generator
      expression support to match equivalent `C_COMPILER_ID`,
      `CXX_COMPILER_ID`, `C_COMPILER_VERSION`, and `CXX_COMPILER_VERSION`
      support.
      
      This is very helpful in the case where the C/C++ compiler suite is a
      different type of compiler from the platform Fortran compiler and
      projects use generator expressions to assign compiler flags and
      definitions.  (e.g. `GNU` C/C++ and `SunPro` Fortran on Linux)
      a0809142
  13. 17 Jan, 2019 5 commits