Skip to content
Snippets Groups Projects
  1. Jan 23, 2019
  2. Jan 22, 2019
  3. Jan 21, 2019
    • Vitaly Stakhovsky's avatar
    • 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
    • chuck cranor's avatar
      CMakeDetermineCompilerABI: set locale to C for try_compile() · d751d2d2
      chuck cranor authored and Brad King's avatar Brad King committed
      Have CMakeDetermineCompilerABI set the locale to C before calling
      try_compile().  This is for the implicit include path parser to
      keep all the verbose compiler messages in English so we can parse
      it.   See #18784 for discussion.
      d751d2d2
    • Brad King's avatar
      CMakeDetermineCompilerABI: pass verbose flag during compilation · c765ae49
      Brad King authored
      Default to the same flag that is used for verbose link information, but
      provide another internal platform information variable to use a
      compilation-specific variant.  Populate it for CUDA where we use a
      different compiler for compilation and linking and therefore need
      different flags.
      
      Co-Author: Chuck Cranor <chuck@ece.cmu.edu>
      c765ae49
    • Brad King's avatar
      try_compile: Preserve special characters in COMPILE_DEFINITIONS · 8c5221fb
      Brad King authored
      When generating the `CMakeLists.txt` file, we pass the values given
      to our `COMPILE_DEFINITIONS` option in an `add_definitions` call.
      Pass them as bracket arguments to preserve special characters
      like `#`.
      8c5221fb
    • Brad King's avatar
      Refactor exclusion of -I/usr/include to avoid per-language values · 15ad8300
      Brad King authored
      Add a `CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES` to contain the
      hard-coded list of paths to be excluded from `-I` arguments so that the
      values remain excluded even if the per-language
      `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` variants change.
      
      This is needed to preserve our historical exclusion of `-I/usr/include`
      even when it is not a real implicit include directory.  A policy may be
      needed to remove it later.
      15ad8300
    • 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
    • Brad King's avatar
      Merge topic 'ExternalProject-non-cmake-source-subdir' · 02f7e997
      Brad King authored and Kitware Robot's avatar Kitware Robot committed
      
      c09ec799 ExternalProject: support SOURCE_SUBDIR for BUILD_IN_SOURCE
      
      Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
      Merge-request: !2823
      02f7e997
    • Brad King's avatar
      Merge topic 'read-list-file' · c7428e17
      Brad King authored and Kitware Robot's avatar Kitware Robot committed
      
      25caf7ba cmMakefile::ReadListFile() accepts std::string argument
      
      Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
      Merge-request: !2821
      c7428e17
    • Brad King's avatar
      Merge topic 'fortran-compiler-id' · 177b5fb6
      Brad King authored and Kitware Robot's avatar Kitware Robot committed
      
      a0809142 Fortran: Add compiler ID/Version generator expressions
      
      Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
      Merge-request: !2804
      177b5fb6
    • Brad King's avatar
      Merge topic 'update-libuv' · 55a2dc30
      Brad King authored and Kitware Robot's avatar Kitware Robot committed
      
      5b3af28e libuv: Update CMake-internal buildsystem
      1136275a libuv: Include uv/ headers from each other without any path
      1e120972 Merge branch 'upstream-libuv' into update-libuv
      4fcb0d02 libuv 2019-01-15 (f84c5e69)
      
      Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
      Merge-request: !2822
      55a2dc30
    • Brad King's avatar
      Merge topic 'cmake-role-fix' · eadaf0c8
      Brad King authored and Kitware Robot's avatar Kitware Robot committed
      
      264bdac1 CMAKE_ROLE: Fix value for ctest --build-and-test
      
      Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
      Merge-request: !2820
      eadaf0c8
Loading