Commit Graph

53126 Commits

Author SHA1 Message Date
Brad King 1879f1bcbc cmLocalCommonGenerator: Factor out relative path conversion helper 2021-05-13 12:47:25 -04:00
Brad King 1d1d88d3c8 cmMakefileTargetGenerator: Clarify name of relative path conversion helper 2021-05-13 12:47:25 -04:00
Brad King ec1ea13066 cmDependsFortran: Simplify relative path conversion helper
Revert commit 8377d9e00b (Fortran: Inline conversion to relative path,
2016-10-04, v3.8.0-rc1~494^2~4).  The inline implementation is still
identical to what was previously called.  Restore the call again.
2021-05-13 12:46:26 -04:00
Dario Passet c7aa3bdefc Tests/include_external_msproject: Check C# project reference 2021-05-13 18:38:01 +02:00
Rolf Eike Beer caea48eec9 CMakeParseImplicitIncludeInfo: remove needless variable expansions
They seem to actually cause trouble, like an error reported on IRC where some
but not all CMake invocations may end up with an error like this:

   CMake Warning (dev) at /usr/share/cmake/Modules/CMakeParseImplicitIncludeInfo.cmake:74 (if):
     Policy CMP0054 is not set: Only interpret if() arguments as variables or
     keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
     details.  Use the cmake_policy command to set the policy and suppress this
     warning.

     Quoted keywords like ")" will no longer be interpreted as keywords when the
     policy is set to NEW.  Since the policy is not set the OLD behavior will be
     used.
   Call Stack (most recent call first):
     /usr/share/cmake/Modules/CMakeParseImplicitIncludeInfo.cmake:179 (cmake_parse_implicit_include_line)
     /usr/share/cmake/Modules/CMakeDetermineCompilerABI.cmake:119 (cmake_parse_implicit_include_info)
     /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
     CMakeLists.txt:24 (project)
   This warning is for project developers.  Use -Wno-dev to suppress it.

   CMake Error at /usr/share/cmake/Modules/CMakeParseImplicitIncludeInfo.cmake:74 (if):
     if given arguments:

       "GNU" "STREQUAL" "SunPro" "AND" "(" ")" "MATCHES" "-D__SUNPRO_C" "OR" ")" "MATCHES" "-D__SUNPRO_F" ")"

I suspect that the line ends up being just ")", which then causes this error.
2021-05-13 17:52:13 +02:00
Robert Maynard f78b167a23 cmCommandLineArgument: Provide more information syntax error messages 2021-05-13 09:33:30 -04:00
Robert Maynard 5aa0dec6b0 cmake: --build and --install error out when encountering bad flags
Fixes #22186
2021-05-13 09:28:42 -04:00
Arcturus Arcturus 5d32ce320b FetchContent: Use private local variables in FetchContent_MakeAvailable 2021-05-13 13:52:16 +01:00
Brad King db8e0beeac cmGlobalNinjaGenerator: Clarify semantics of Fortran scanning info
Use `optional<>` instead of `unique_ptr<>` to hold optional value.
2021-05-13 08:33:04 -04:00
Brad King bd12b97d05 cmScanDepFormat: Drop unused "outputs", "inputs", and "depends" fields
These fields are specified by our `P1689r3` paper, but are not actually
needed.  The dependencies of the scanning results themselves can be
captured via normal depfile logic.  Avoid saving this possibly-large
information in the scanning results.  It is not needed by later steps.
2021-05-13 08:33:00 -04:00
Brad King 96011ab06d Merge topic 'find_item-consistent-behavior-cache-variables'
08db1341a6 find_*: ensure consistent behavior for cache variables
f5fa6d53b0 class cmake: Store working directory at cmake launch
b1729200c3 find_*: refactor cache variable handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6110
2021-05-13 08:12:36 -04:00
Brad King 414704e895 Merge topic 'ninja-fortran-symlink' into release-3.20
3a71534402 Ninja: Restore support for Fortran in a symlinked build tree

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6120
2021-05-13 08:11:25 -04:00
Brad King 3a254019ca Merge branch 'release-3.20' 2021-05-13 08:11:25 -04:00
Brad King da6fd5842d Merge topic 'ninja-fortran-symlink'
3a71534402 Ninja: Restore support for Fortran in a symlinked build tree

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6120
2021-05-13 08:11:25 -04:00
Dario Passet 65b58b0316 VS Generator: Properly reference included external C# projects 2021-05-13 09:48:31 +02:00
Kitware Robot 049d388cfa CMake Nightly Date Stamp 2021-05-13 00:01:10 -04:00
Brad King ba7b939831 cmStateDirectory: Rename ConvertToRelPathIf{Not => }Contained
The "Not" in the method name is backward from its logic.
2021-05-12 15:53:37 -04:00
Brad King 09bee3bee1 cmGlobalGhsMultiGenerator: Simplify relative path conversion logic
Our call to `MaybeConvertToRelativePath` uses paths that always pass the
"maybe" checks.  Use `ForceToRelativePath` directly.
2021-05-12 15:53:26 -04:00
Brad King f69079577a cmGlobalXCodeGenerator: Simplify relative path conversion under project root 2021-05-12 15:43:58 -04:00
Brad King 3a71534402 Ninja: Restore support for Fortran in a symlinked build tree
Since commit f3eed2c49d (cmGlobalNinjaGenerator: use P1689 dependency
file format for Fortran, 2019-03-12, v3.20.0-rc1~454^2), Fortran stopped
working in a build tree whose path contains a symlink.  The reason is
that the P1689r3 format's `work-directory` field gets populated with the
realpath (via `getcwd`) of the build tree instead of the logical path to
the build tree used for generating relative paths in `build.ninja`.
This causes the `Fortran.dd` file to get absolute (real)paths to `.o`
files, and Ninja does not match them with the relative `.o` file paths
in `build.ninja`.

Fix this by dropping use of the `work-directory` field.  This restores
our prior approach of generating paths in the dyndep file using the same
forms of paths received from the buildsystem generator.  The P1689r3
paper's format may need to be revised to account for this.

Fixes: #21683
2021-05-12 10:15:43 -04:00
Robert Maynard 928cdb17c5 cmCommandLineArgument: Correctly record parsing failures 2021-05-12 09:43:33 -04:00
Brad King 169d998bb8 Merge topic 'ci-codespell'
bca69d4272 gitlab-ci: add codespell lint job
bf35f3848a gitlab-ci: rename lint builds to start in lint:
f89c1a559d UseJava: Avoid non-word "compilability" in documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6118
2021-05-12 09:19:53 -04:00
Brad King bca69d4272 gitlab-ci: add codespell lint job 2021-05-12 07:35:16 -04:00
Brad King bf35f3848a gitlab-ci: rename lint builds to start in lint: 2021-05-12 07:35:16 -04:00
Brad King f89c1a559d UseJava: Avoid non-word "compilability" in documentation
Also fix spelling in the release note from commit 3e03f359a7 (UseJava:
Add RESOURCES with NAMESPACE to add_jar(), 2021-04-27).
2021-05-12 07:35:16 -04:00
Brad King ce19e38151 Merge topic 'xcode-inherited-params'
dfaf55fbfd Xcode: add extra '$(inherited)' entries using InheritBuildSettingAttribute.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6077
2021-05-12 07:27:00 -04:00
Brad King 228764d69e Merge topic 'misc-improve'
5e8fa0b7bc Source: Minor code improvements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6116
2021-05-12 07:25:33 -04:00
Brad King bfb6873042 Merge topic 'ci-fedora34'
18bd63af41 ci: enable FindProtobuf gRPC test on Linux builds
27adb6c78e gitlab-ci: update Debian base images
89478e643f gitlab-ci: update to Fedora 34 base images
6ff48b862c ci: add gRPC to Debian and Fedora base images
4ad8bfcd9b ci: add codespell to Fedora base image
fa261d1b7d ci: add Qt 6 to Fedora base image
82fc490f93 ci: update to Fedora 34 for Linux base images
a69e6dba92 gitlab-ci: update to Fedora 34 for upload jobs
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6117
2021-05-12 07:23:51 -04:00
Brad King 18bd63af41 ci: enable FindProtobuf gRPC test on Linux builds 2021-05-12 07:17:54 -04:00
Brad King 27adb6c78e gitlab-ci: update Debian base images 2021-05-12 07:17:54 -04:00
Brad King 89478e643f gitlab-ci: update to Fedora 34 base images 2021-05-12 07:17:54 -04:00
Brad King 6ff48b862c ci: add gRPC to Debian and Fedora base images 2021-05-12 07:17:54 -04:00
Brad King 4ad8bfcd9b ci: add codespell to Fedora base image 2021-05-12 07:17:54 -04:00
Brad King fa261d1b7d ci: add Qt 6 to Fedora base image 2021-05-12 07:17:54 -04:00
Brad King 82fc490f93 ci: update to Fedora 34 for Linux base images 2021-05-12 07:17:54 -04:00
Brad King a69e6dba92 gitlab-ci: update to Fedora 34 for upload jobs
Also add 'cmake' tag to match the rest of our jobs.
2021-05-12 07:17:35 -04:00
Marc Chevrier 08db1341a6 find_*: ensure consistent behavior for cache variables
Fixes: #22121
2021-05-12 11:11:56 +02:00
Kitware Robot 1c7c155366 CMake Nightly Date Stamp 2021-05-12 00:01:11 -04:00
Brad King 40c672aaeb clang-tidy: ignore readability-function-cognitive-complexity 2021-05-11 15:08:08 -04:00
Brad King 4281cd15db clang-tidy: fix bugprone-redundant-branch-condition 2021-05-11 15:08:08 -04:00
Marc Chevrier f5fa6d53b0 class cmake: Store working directory at cmake launch 2021-05-11 18:16:08 +02:00
Marc Chevrier b1729200c3 find_*: refactor cache variable handling 2021-05-11 18:16:08 +02:00
Vitaly Stakhovsky 5e8fa0b7bc Source: Minor code improvements 2021-05-11 11:20:04 -04:00
Brad King ee87e53d37 Merge topic 'windows-artifact-symlinks'
d0c31cbff9 Windows: Use real artifact versioning symlinks if possible

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6093
2021-05-11 09:28:49 -04:00
Brad King 553cd4db44 Merge topic 'fixAppleResourceWarning'
169da7cd81 Do not show RESOURCE DESTINATION warning for MACOSX_BUNDLE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6104
2021-05-11 09:27:45 -04:00
Brad King a94332ed37 Merge topic 'cmprop-nullptr'
ce97b7909b Source: Remove unnecessary comparisons to nullptr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6112
2021-05-11 09:26:39 -04:00
Brad King 6c5a2b2171 Merge topic 'helpctestscript'
140fe8c3c6 Help: Document CTEST_SCRIPT_DIRECTORY variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6111
2021-05-11 09:25:53 -04:00
Brad King 9b2b91abe7 Merge topic 'UseJava-add_jar-resource-namespace'
3e03f359a7 UseJava: Add RESOURCES with NAMESPACE to add_jar()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Smit-tay <damnedyankee@gmail.com>
Merge-request: !6071
2021-05-11 09:24:20 -04:00
Brad King d0b6eb8ec7 Merge topic 'capabilties-generator-platforms'
66be34853c cmake: add supported platforms to cmake -E capabilties report

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6102
2021-05-11 09:22:47 -04:00
Brad King ad961fd42a Merge topic 'findlapack_support_nvhpc'
2c9e623e31 Find{BLAS,LAPACK}: Add support for the NVHPC LAPACK library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6089
2021-05-11 09:21:50 -04:00