1. 11 Apr, 2019 3 commits
  2. 08 Apr, 2019 1 commit
  3. 29 Mar, 2019 1 commit
  4. 28 Mar, 2019 1 commit
    • Sebastian Holtermann's avatar
      Autogen: Do not treat hard-coded -I/usr/include exclusion as implicit include · a8b7cbb7
      Sebastian Holtermann authored and Brad King's avatar Brad King committed
      The `cmLocalGenerator::GetIncludeDirectoriesImplicit` method is called
      by `cmQtAutoGenInitializer` to get the compiler's list of implicit
      include directories.  Since commit 557b2d6e (Fix regression in
      -I/usr/include exclusion logic, 2019-02-13, v3.14.0-rc2~6^2~2) the
      method hard-codes exclusion of `/usr/include` for historical reasons.
      However, it should not be reported as a real implicit include directory
      unless the compiler really has it.
      
      Refactor the logic to distinguish the hard-coded exclusion of
      `/usr/include` from the real list of implicit include directories.
      
      Fixes: #19100
      a8b7cbb7
  5. 26 Mar, 2019 2 commits
    • Sylvain Joubert's avatar
      ctest_coverage: fix out-of-bounds index in Jacoco parser · 1d16eae8
      Sylvain Joubert authored and Brad King's avatar Brad King committed
      When the current source file is not found the FilePath variable was left
      with the previous path content. In case the previous file had less lines
      than the current one and there are 'line' entries for the current one
      with higher number we ended up in a buffer overflow while indexing the
      previous file entry with a line number higher.  By clearing the
      FilePath, the empty() guard triggers correctly on an empty path and it
      avoid modifying the wrong data.
      1d16eae8
    • Brad King's avatar
      cmake: Fix '-E copy foo .' to avoid clobbering file · ce180cf8
      Brad King authored
      Backport KWSys commit 92334e7670 (SystemTools: CopyFileAlways: avoid
      copying file over self, 2019-03-25) to the CMake 3.14 release branch.
      
      Fixes: #19075
      ce180cf8
  6. 25 Mar, 2019 1 commit
    • Brad King's avatar
      Restore support for include_directories() in toolchain files · 588fa1bb
      Brad King authored
      Any `include_directories()` calls in toolchain files are used during our
      ABI detection step even though it does not include any system headers.
      Since commit 5990ecb7 (Compute implicit include directories from
      compiler output, 2018-12-07, v3.14.0-rc1~108^2), that check is also used
      to detect implicit include directories.  Any `include_directories()` in
      a toolchain file are detected as implicit and later excluded from
      explicit specification on compiler command lines, thus breaking the
      purpose of the calls in the first place.
      
      Fix the implicit include directory detection step to avoid using paths
      from `include_directories()` calls in the toolchain file.
      
      Fixes: #19079
      588fa1bb
  7. 20 Mar, 2019 1 commit
    • Brad King's avatar
      Eclipse: Fix extra generator to not crash on interface libraries · d3dcf8d7
      Brad King authored
      Do not process interface libraries in ways that expect build information
      to be present internally.  This filtering was left out of the extra
      generator accidentally when interface libraries were introduced, but it
      worked by accident until commit 76ad2ecb (Order SYSTEM include
      directories after non-system directories, 2018-04-13, v3.12.0-rc1~179^2)
      added a code path that was not tolerated.
      
      Fixes: #18363
      d3dcf8d7
  8. 14 Mar, 2019 3 commits
    • Brad King's avatar
      find_program: Restore leading double slash on Windows network path · 00c4ddf7
      Brad King authored
      Since commit c76c1ea2 (find_program: Consider CWD only for paths with
      separator, 2018-05-31, v3.13.0-rc1~413^2) we accidentally convert the
      leading `//` to just `/` on results with Windows network paths.
      
      This was caused by `CollapseCombinedPath` being less robust than
      `CollapseFullPath`.  Restore use of the latter but in a way that
      preserves the requirement of the above commit to support candidates that
      are themselves absolute.
      
      Fixes: #19049
      Issue: #19050
      00c4ddf7
    • Brad King's avatar
      VS: Fix x64 host recognition by x86 cmake process · 5c50eeaf
      Brad King authored
      In commit 57e48f16 (VS: Add Visual Studio 16 2019 generator,
      2019-01-09, v3.14.0-rc1~150^2) and commit 0fd742a6 (VS: Teach VS 2019
      generator to select host tools matching host arch, 2019-01-28,
      v3.14.0-rc1~63^2) we intended to select the `x64` target architecture
      and `x64` host tools by default on x64 host machines.  Fix detection
      of a x64 host when CMake itself is a 32-bit x86 process.
      
      The KWSys SystemInformation `Is64Bits` member is not set correctly,
      which led to this bug.  Pending investigation on the KWSys side,
      simply test ourselves via `IsWow64Process`.
      5c50eeaf
    • Brad King's avatar
      CMake 3.14.0 · bf02d625
      Brad King authored
      bf02d625
  9. 12 Mar, 2019 1 commit
    • Brad King's avatar
      VS: Revert "Use MSBuild matching toolset host architecture" · f3cedf38
      Brad King authored
      Revert commit da402a08 (VS: Use MSBuild matching toolset host
      architecture, 2019-01-28, v3.14.0-rc1~50^2).  Multiple people have
      reported that the 64-bit `amd64/msbuild` tool fails in cases that the
      32-bit `msbuild` works.  Drop our change pending further investigation
      and hopefully a fix to VS.
      
      Fixes: #18904, #19037
      Issue: #18219
      f3cedf38
  10. 08 Mar, 2019 1 commit
  11. 07 Mar, 2019 2 commits
    • Brad King's avatar
      C++ feature checks: Match warnings more strictly · 4ca5a815
      Brad King authored
      Require the word "warning" to appear at the start of a line, after
      whitespace, or after a `:`.  This is the same that CTest launchers use
      to match warnings.  It avoids matching "warning" inside file paths.
      
      Fixes: #19019
      4ca5a815
    • Brad King's avatar
      install: Do not crash on imported global target · 47389c56
      Brad King authored
      Since commit e89ad0f9 (install: Allow installing targets created in
      another directory, 2018-06-18, v3.13.0-rc1~407^2) the `install(TARGETS)`
      command may find a global-scoped target outside the calling directory.
      Ignore an `IMPORTED GLOBAL` target if it is found in this way.  Imported
      targets cannot be installed, and trying to do so violates internal
      invariants.
      
      Fixes: #19022
      47389c56
  12. 06 Mar, 2019 1 commit
    • Luca Cappa's avatar
      VS: Encode newlines in XML attributes · 0bf44180
      Luca Cappa authored and Brad King's avatar Brad King committed
      Encode `\n` as `
` to avoid generating a literal newline inside an
      XML attribute.  This is more readable and also fixes custom commands in
      `.csproj` files with VS 2019 RC.
      
      Fixes: #19001
      0bf44180
  13. 01 Mar, 2019 2 commits
    • Brad King's avatar
      VS: Fix Fortran target type selection with RC sources · 0b82f56a
      Brad King authored
      The Intel Fortran `.vfproj` files do support both Fortran and the
      Windows Resource compiler (`.rc)` files.  Prior to CMake 3.9 we did not
      support that, but commit 2c9f3578 (VS: Decide project type by linker
      lang as fallback, 2017-03-30, v3.9.0-rc1~340^2) accidentally enabled it.
      It was then broken by commit d3d2c3cd (VS: Fix Fortran target type
      selection when linking C++ targets, 2019-02-04, v3.14.0-rc1~13^2).
      
      Restore support for Fortran+RC in VS projects and add a test case.
      
      Fixes: #19002
      0b82f56a
    • Brad King's avatar
      CMake 3.14.0-rc3 · 20a41aa5
      Brad King authored
      20a41aa5
  14. 28 Feb, 2019 2 commits
  15. 27 Feb, 2019 1 commit
  16. 26 Feb, 2019 2 commits
    • Kyle Edwards's avatar
      CMAKE_ROLE: Fix value in --build for Visual Studio generators · 4b95e7fe
      Kyle Edwards authored
      Fixes: #18990
      4b95e7fe
    • Brad King's avatar
      include_external_msproject: Restore support for EXCLUDE_FROM_ALL · 3106cf4e
      Brad King authored
      In commit dc688857 (Pass EXCLUDE_FROM_ALL from directory to targets,
      2019-01-15, v3.14.0-rc1~83^2) all `AddNewTarget` call sites were updated
      to copy the directory-level `EXCLUDE_FROM_ALL` into the target property
      of the same name, except that the one for `include_external_msproject`
      was incorrectly missed.  Add it now.
      
      Furthermore, refactoring in commit b99129d2 (ENH: some code cleanup,
      2007-03-12, v2.6.0~2020) accidentally set the `EXCLUDE_FROM_ALL` target
      property of `include_external_msproject`-generated targets to `FALSE`
      instead of simply leaving it unset.  This was not necessary but had no
      effect until the above commit gave it a meaning.  Drop that.
      
      Fixes: #18986
      3106cf4e
  17. 21 Feb, 2019 1 commit
    • Craig Scott's avatar
      EXCLUDE_FROM_ALL: Don't warn if installing target excluded from all · d3b765d4
      Craig Scott authored
      The original warning pre-dates support for install components.
      There are now legitimate scenarios where an install(TARGETS)
      command may list a target that is excluded from all, e.g.
      hierarchical projects that will never install the component such a
      target belongs to.
      
      Fixes: #18938
      d3b765d4
  18. 20 Feb, 2019 2 commits
    • Marc Chevrier's avatar
      PIE link options: No warning when policy CMP0083 is not set. · 98a2d423
      Marc Chevrier authored and Brad King's avatar Brad King committed
      Fixes: #18955
      98a2d423
    • Brad King's avatar
      Fortran: Do not suppress explicit use of implicit include directories · 3dc81a48
      Brad King authored
      Since commit 2e91627d (ParseImplicitIncludeInfo: add Fortran implicit
      include handling, 2019-01-25, v3.14.0-rc1~73^2) we actually populate
      `CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES` for the first time.  This
      value may be useful to project code to pass to other tooling that wants
      to preprocess the way Fortran does, so we should compute the value.
      However, compilers like `gfortran` do not actually search their own
      implicit include directories for `.mod` files.  The directories must be
      passed via `-I` in order for `.mod` files in them to be found.
      
      Since Fortran has no standard library header files that we need to avoid
      overriding, it is safe to *not* filter out implicit include directories
      from those passed explicitly via `-I` options.  Skip this filtering so
      that include directories specified by project code to find `.mod` files
      will be searched by the compiler even if they happen to be implicitly
      searched by the preprocessor.
      
      Fixes: #18914
      3dc81a48
  19. 19 Feb, 2019 4 commits
  20. 18 Feb, 2019 3 commits
    • Brad King's avatar
      Do not explicitly report "standard" include directories as implicit · 890bae52
      Brad King authored
      In commit 1293ed85 (ParseImplicitIncludeInfo: keep implicit incl.
      consistent when rerunning cmake, 2019-01-30, v3.14.0-rc1~26^2) we did
      not account for `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES`.  This
      variable lets platform modules or toolchain files specify directories
      that are to be explicitly passed as standard include directories.  These
      include directories are used by the test project from which we extract
      implicit include directories so they appear in the parsed results
      whether or not the compiler really considers them implicit.  Exclude
      these entries from the computed implicit include directories since they
      are not actually implied by the compiler when we invoke it with
      "standard" include directories passed explicitly.
      
      Instead teach the build system generators to treat the "standard"
      directories as implicit for purposes of excluding them from appearing
      earlier in the compiler command line due to `include_directories` and
      `target_include_directories` calls.
      
      Issue: #18936, #18944
      890bae52
    • Brad King's avatar
      Restore unconditional use of "standard" include directories · 5c171ca8
      Brad King authored
      `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` is meant to unconditionally
      add explicitly specified include directories to compile lines.  In
      commit 5f34bdc7 (cmLocalGenerator: Refactor
      `GetIncludeDirectoriesImplicit` method, 2019-01-25, v3.14.0-rc1~65^2~1)
      a condition was accidentally added to exclude implicit include
      directories.  Drop that condition.
      
      Fixes: #18936
      5c171ca8
    • Brad King's avatar
      Prefix implicit include directories with sysroot on construction · 9502276f
      Brad King authored
      Since commit 7cd65c97 (Add CMAKE_SYSROOT variable to set --sysroot
      when cross compiling., 2013-04-13, v3.0.0-rc1~342^2) we have prefixed
      the value of `CMAKE_SYSROOT` to implicit include directories.  This was
      done because we hard-coded `/usr/include` as an implicit include
      directory without accounting for the sysroot.  Instead we should prefix
      the hard-coded paths when they are constructed.  Update the
      `Platform/UnixPaths` module to do this as `Platform/Darwin` already
      does.
      
      Since commit 5990ecb7 (Compute implicit include directories from
      compiler output, 2018-12-07, v3.14.0-rc1~108^2) the values of the
      `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` variables are computed from
      a real compiler invocation so they already account for the sysroot
      prefix.  In commit 6fc33829 (Update logic for sysroot in detected
      implicit include directories, 2019-02-13, v3.14.0-rc2~6^2) we attempted
      to apply the prefix conditionally, but that is incorrect because the
      compiler's real implicit include directories are not all under the
      sysroot.  Instead assume that all implicit include directories in
      `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` already have the sysroot
      prefix if needed.  Code that constructs the value must be responsible
      for that because it is the only place that knows.
      9502276f
  21. 15 Feb, 2019 2 commits
    • Brad King's avatar
      CMake 3.14.0-rc2 · e6897c72
      Brad King authored
      e6897c72
    • 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
  22. 14 Feb, 2019 3 commits