Commit Graph

29842 Commits

Author SHA1 Message Date
Oliver Schneider
378c047ae3 Makefiles: Explicitly tell 'make' tool what Makefile name to use
CMake did not specify the filename of the Makefile generated by it.
Due to GNU make precedence rules this means that the presence of a
GNUmakefile or makefile would take precedence over the generated
Makefile.

This is only relevant for in-source builds and only whenever an
alternative makefile by the above mentioned names exists.

This patch adds the (seemingly universal) `-f` switch and the
(hardcoded) filename (it is now hardcoded separately in these two
files):

- cmLocalUnixMakefileGenerator3.cxx
- cmGlobalUnixMakefileGenerator3.cxx

Fixes: #21418
2020-11-16 11:34:53 -05:00
Brad King
01b473b810 Merge topic 'msvc-no-GR'
c00a6d3967 MSVC: Do not add /GR to CMAKE_CXX_FLAGS by default
6114c8e994 MSVC: Factor out initialization of /GR flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5508
2020-11-16 11:19:28 -05:00
Kitware Robot
3ae680841c CMake Nightly Date Stamp 2020-11-16 00:01:17 -05:00
Kitware Robot
75ced70154 CMake Nightly Date Stamp 2020-11-15 00:01:07 -05:00
Craig Scott
eb04e25ba6 Merge topic 'cmake_path-enhancements'
ed21ad181e cmake_path: various enhancements to subcommands/keywords

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5457
2020-11-14 06:39:42 -05:00
Kitware Robot
5501958d16 CMake Nightly Date Stamp 2020-11-14 00:01:08 -05:00
Brad King
c00a6d3967 MSVC: Do not add /GR to CMAKE_CXX_FLAGS by default
The `/GR` flag has been on by default since MSVC cl 14.0 from VS 2005.
Remove it from the default flags to make it easier for projects to pass
`/GR-` themselves to turn it off.

Projects may be using string processing to replace `/GR` with another
flag, so we cannot simply drop it.  Add a policy to drop it in a
compatible way.

Fixes: #21428
2020-11-13 11:46:23 -05:00
Kitware Robot
8b8f0197eb CMake Nightly Date Stamp 2020-11-13 00:01:08 -05:00
Brad King
7ac092bd39 Merge topic 'suppress-link-messages'
8e2eba6b4c MSVC: Suppress rc/mt/link output unless verbose is requested

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5492
2020-11-12 09:13:50 -05:00
Kitware Robot
8705f9116e CMake Nightly Date Stamp 2020-11-12 00:01:09 -05:00
Marc Chevrier
ed21ad181e cmake_path: various enhancements to subcommands/keywords
This change address partly the remarks done in issue #21385
2020-11-11 23:43:51 +01:00
Brad King
5e3b0aa9b2 Merge topic 'ninja-cleandead-no-dyndep'
c5011399c5 Ninja: Avoid cleandead with dyndep bindings for Fortran module dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5490
2020-11-11 09:34:17 -05:00
Orgad Shaneh
8e2eba6b4c MSVC: Suppress rc/mt/link output unless verbose is requested
Output like the following is typically not interesting at all:
LINK : program database F:\Project\Project.pdb missing; performing full link
   Creating library Project.lib and object Project.exp

Fixes #21422
2020-11-11 14:46:58 +02:00
Kitware Robot
e31ccdd4c4 CMake Nightly Date Stamp 2020-11-11 00:01:36 -05:00
Brad King
c5011399c5 Ninja: Avoid cleandead with dyndep bindings for Fortran module dependencies
The Ninja `cleandead` tool does not account for implicit outputs
discovered by `dyndep` bindings and can remove Fortran `.mod` files that
are still needed.  Disable the `cleandead` step when using `dyndep`
bindings.

Fixes: #21406
2020-11-10 15:16:28 -05:00
Kitware Robot
cb5cf3f04d CMake Nightly Date Stamp 2020-11-10 00:01:10 -05:00
Brad King
2b0a1180b0 Merge topic 'ninja-dyndep-refactor'
941be1d356 cmNinjaTargetGenerator: Clarify variable names for preprocessing conditions
33a8e0bb09 cmNinjaTargetGenerator: Simplify scan rule depfile selection
bff1871c39 cmNinjaTargetGenerator: Generalize GetScanRule helper
9f60e8aa52 cmNinjaTargetGenerator: Remove redundant conditions for dyndep blocks
43fe7e0c97 cmNinjaTargetGenerator: Revise conditions to clarify dyndep code paths
1416012f2c cmNinjaTargetGenerator: Clarify scan rule code grouping
f2eec04728 cmNinjaTargetGenerator: Clarify scan rule helper functions
170cfc764d cmNinjaTargetGenerator: Drop unnecessary mutation
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5478
2020-11-09 08:02:33 -05:00
Kitware Robot
eb48859594 CMake Nightly Date Stamp 2020-11-09 00:01:10 -05:00
Kitware Robot
94be747920 CMake Nightly Date Stamp 2020-11-08 00:01:06 -05:00
Kitware Robot
ae488d025f CMake Nightly Date Stamp 2020-11-07 00:01:08 -05:00
Brad King
941be1d356 cmNinjaTargetGenerator: Clarify variable names for preprocessing conditions
What is important about code paths for Fortran's explicit preprocessing
is that the compilation step following it does not do preprocessing.
2020-11-06 11:51:02 -05:00
Brad King
33a8e0bb09 cmNinjaTargetGenerator: Simplify scan rule depfile selection
The depfile can always be the first output of the build statement
with a `.d` suffix added.  This approach easily avoids conflicts.
2020-11-06 11:50:38 -05:00
Brad King
bff1871c39 cmNinjaTargetGenerator: Generalize GetScanRule helper
Allow the caller to provide any number of commands, and to choose which
ones get a launcher.
2020-11-06 11:43:52 -05:00
Brad King
9f60e8aa52 cmNinjaTargetGenerator: Remove redundant conditions for dyndep blocks
The GetScanCommand and GetScanBuildStatement helpers are called only in
code paths for dyndep.  Drop their checks for this condition.
2020-11-06 11:43:52 -05:00
Brad King
43fe7e0c97 cmNinjaTargetGenerator: Revise conditions to clarify dyndep code paths
All the scan-related code paths are actually about dyndep rather than
explicit preprocessing.  It just happens that the implementation for
Fortran requires explicit preprocessing.
2020-11-06 11:43:52 -05:00
Brad King
1416012f2c cmNinjaTargetGenerator: Clarify scan rule code grouping 2020-11-06 11:43:52 -05:00
Brad King
f2eec04728 cmNinjaTargetGenerator: Clarify scan rule helper functions
Revise names to clarify that these helpers are for the dependency
scanning commands, which may happen to preprocess.
2020-11-06 11:43:52 -05:00
Brad King
170cfc764d cmNinjaTargetGenerator: Drop unnecessary mutation
GetPreprocessScanRule's caller always has `vars.Source` set to `$in`.
2020-11-06 11:43:52 -05:00
Brad King
fcf3fc4447 cmNinjaTargetGenerator: Clarify method names 2020-11-06 11:43:52 -05:00
Brad King
fe5d0849db cmNinjaTargetGenerator: Consolidate redundant methods 2020-11-06 11:43:51 -05:00
Brad King
7a04f45722 CMake 3.19.0-rc3 2020-11-06 09:19:57 -05:00
Brad King
ffda92d4bf Merge topic 'clang-tidy-for-objc'
1134064e22 clang-tidy: allow OBJC and OBJCXX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5467
2020-11-06 08:05:00 -05:00
Brad King
cc2d849e69 Merge topic 'cmprop-improve'
f6e7d5f3a0 Reduce the scope of temporary cmProp variables and other improvements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5471
2020-11-06 08:04:26 -05:00
Brad King
dd8c91a4f3 Merge topic 'cmake-gui-file-dialog-crash' into release-3.19
5f782119c8 cmake-gui: Restore workaround for crash in file dialog

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5472
2020-11-06 07:57:51 -05:00
Brad King
a0453a7f0c Merge topic 'cmake-gui-file-dialog-crash'
5f782119c8 cmake-gui: Restore workaround for crash in file dialog

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5472
2020-11-06 07:57:51 -05:00
Brad King
b2552d50da Merge topic 'xcode-inherit-paths'
bffb17be3d Xcode: Inherit target library and framework search paths from project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5463
2020-11-06 07:43:03 -05:00
Kitware Robot
35594cd434 CMake Nightly Date Stamp 2020-11-06 00:01:08 -05:00
Brad King
5f782119c8 cmake-gui: Restore workaround for crash in file dialog
In commit ce9dbceb42 (QtDialog: remove Qt4-only code, 2020-06-02,
v3.19.0-rc1~712^2~1) we removed an event filter that was thought to be
necessary only as a workaround for a bug in Qt.  However, that bug was
fixed in Qt 4.5, and the file dialog still crashes as of Qt 5.14 without
the filter.  Restore the workaround pending further investigation.

Fixes: #21400
2020-11-05 14:50:45 -05:00
Andrew Fuller
1134064e22 clang-tidy: allow OBJC and OBJCXX 2020-11-05 11:39:32 -08:00
Vitaly Stakhovsky
f6e7d5f3a0 Reduce the scope of temporary cmProp variables and other improvements 2020-11-05 11:07:39 -05:00
Brad King
c43b0505a5 Merge topic 'makefile-CMAKE_EXPORT_COMPILE_COMMANDS-ASM'
52152409c3 Makefiles: Honor CMAKE_EXPORT_COMPILE_COMMANDS for ASM

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5464
2020-11-05 07:58:37 -05:00
Brad King
d720cd847e Merge topic 'cmprop-source'
c7b50349de cmSourceFile::GetPropertyForUser: return cmProp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5462
2020-11-05 07:54:03 -05:00
Gusts Kaksis
bffb17be3d Xcode: Inherit target library and framework search paths from project
Xcode has multiple levels of build settings with priority in descending
order:

1. Target
2. Project
3. Workspace
4. SDK defaults

`CMAKE_XCODE_ATTRIBUTE_*` path variables add these to project level, but
linked frameworks and libraries override this in target level.  Add the
`$(inherited)` macro to keep both in the final list.

Fixes: #21387
2020-11-05 13:48:54 +02:00
Kitware Robot
1588e65f4c CMake Nightly Date Stamp 2020-11-05 00:01:07 -05:00
Maxime Girard
52152409c3 Makefiles: Honor CMAKE_EXPORT_COMPILE_COMMANDS for ASM
Generate build command for assembly file in `compile_command.json`.

Issue: #20059
2020-11-04 15:36:47 -05:00
Vitaly Stakhovsky
c7b50349de cmSourceFile::GetPropertyForUser: return cmProp
also fix GetSafeProperty() return type
2020-11-04 10:11:54 -05:00
Kitware Robot
21ee7ea4e0 CMake Nightly Date Stamp 2020-11-04 00:01:07 -05:00
Marc Chevrier
1c912056a1 cmake_path: remove new command from 3.19
Defer adding this command until post-3.19 development so that it
has more time to mature before being included in a release.

Issue: #21385
2020-11-03 09:55:35 -05:00
Brad King
eea24ca551 Merge topic 'cmprop-grl'
f808f27919 cmLocalGenerator::GetRuleLauncher: return cmProp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5456
2020-11-03 07:31:03 -05:00
Brad King
db02ccf406 Merge topic 'cmake-presets-no-path-arg-warning'
cb2d01c182 CMakePresets.json: Don't warn if no path argument is given

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5455
2020-11-03 07:24:25 -05:00