1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-20 03:38:05 +08:00

821 Commits

Author SHA1 Message Date
Vitaly Stakhovsky
53675adbcf GetSafeProperty: return std::string const& 2020-04-30 10:27:16 -04:00
Vitaly Stakhovsky
36aba01223 cmGeneratorTarget::GetProperty: return cmProp 2020-04-29 10:59:39 -04:00
Vitaly Stakhovsky
4fd28b9911 cmOutputConverter::GetFortranFormat(): delete const char* overload 2020-04-27 07:38:47 -04:00
Marc Chevrier
aacd4e4a90 Refactoring: add cm::contains to <cmext/algorithm> 2020-04-17 10:00:03 +02:00
Brad King
156196938c Merge topic 'cmprop-source'
e64fa5f1b6 cmSourceFile::GetProperty: return cmProp
fc223f9860 cmGlobalXCodeGenerator: Fix genex interpreter overloads

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4603
2020-04-15 09:49:46 -04:00
Brad King
a67565751f Merge topic 'msbuildUtf8Support'
bc877a7e94 Add support to indicate UTF-8 custom command pipe output encoding

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4587
2020-04-15 09:44:48 -04:00
Vitaly Stakhovsky
e64fa5f1b6 cmSourceFile::GetProperty: return cmProp 2020-04-14 10:57:17 -04:00
Brad King
fc223f9860 cmGlobalXCodeGenerator: Fix genex interpreter overloads
Overload both signatures to add Xcode-specific functionality.

Co-Author: Vitaly Stakhovsky <vvs31415@gitlab.org>
2020-04-14 10:56:45 -04:00
Justin Goshi
bc877a7e94 Add support to indicate UTF-8 custom command pipe output encoding
Adds a flag to indicate that pipe output from a custom command should be
interpreted as UTF-8 encoded. This change does not introduce a public
way to set the flag, but generators that create internally-generated
commands know if they are calling cmake, which uses UTF-8 pipes.

MSBuild added support for interpreting output of PreBuildEvent,
PreLinkEvent, PostBuildEvent, and CustomBuildStep as UTF-8. This change
will appear in Visual Studio 16.6 Preview 3. It is opt-in, and you need
to add the StdOutEncoding tag. MSBuild treats these as property bags so
if we emit the tag for earlier versions of Visual Studio it would be
safely ignored. This change emits the StdOutEncoding tag and sets it to
UTF-8 whenever the custom command UTF-8 pipe flag is set. This fixes
globalization issues when the output from cmake contained characters
that required MSBuild to interpret as UTF-8 before displaying them.
2020-04-13 12:54:47 -07:00
Brad King
dc0dc974a9 Xcode: Fix quoting of paths with square brackets
The Xcode project file format needs paths containing square
brackets ('[' or ']') to be quoted.

Issue: #20555
2020-04-10 09:37:18 -04:00
Brad King
25a920e827 cmLocalGenerator: Convert GetStaticLibraryFlags to take original-case config
Move upper-case conversion of the configuration into the implementation.
2020-04-01 10:55:59 -04:00
Brad King
a6611577c3 Merge topic 'cmprop-getglobalprop'
c84cf42897 cmState::GetGlobalProperty: return cmProp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4521
2020-03-27 07:50:28 -04:00
Vitaly Stakhovsky
c84cf42897 cmState::GetGlobalProperty: return cmProp 2020-03-25 09:10:46 -04:00
Rolf Eike Beer
48adc29721 replace "std::string::find(x) == 0" with cmHasPrefix() 2020-03-23 22:41:43 +01:00
Craig Scott
54863e28ce Merge topic 'rename-macho-version-properties'
14732d3f30 macOS: Rename OSX_*_VERSION properties to MACHO_*_VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4452
2020-03-12 06:52:11 -04:00
Brad King
14732d3f30 macOS: Rename OSX_*_VERSION properties to MACHO_*_VERSION
The properties added by commit 4a62e3d97c (macOS: Add
OSX_COMPATIBILITY_VERSION and OSX_CURRENT_VERSION properties,
2020-01-24, v3.17.0-rc1~80^2~1) are general-purpose for all platforms
using Mach-O formats and not just on OS X.  Rename them accordingly.
The properties are new to the CMake 3.17 release so we can rename
them without compatibility concerns.

Fixes: #20442
2020-03-12 21:15:40 +11:00
Vitaly Stakhovsky
b0dc52704b cmGeneratorExpression: remove const char* overloads 2020-03-08 17:22:43 -04:00
Marc Chevrier
9de0355d4f Modernize memory management
Update internals of various classes.
2020-03-05 07:34:01 -05:00
Kyle Edwards
7abc3d61ac Ninja Multi-Config: Fix issue with framework dependencies and Autogen
Fixes: #20345
2020-02-17 08:24:57 -05:00
Brad King
8752c1bd64 Merge branch 'backport-3.16-link-line-backtrace' 2020-02-10 16:17:03 -05:00
Brad King
e756328434 Propagate backtraces from LINK_LIBRARIES through to link line items
Since commit d4d0dd0f6a (cmLinkLineComputer: Add ComputeLinkLibs
overload with backtraces, 2019-09-13, v3.16.0-rc1~87^2~4), backtraces
have been collected by `ComputeLinkLibs` by looking back through the
link implementation libraries for one matching the text of the link line
item.  This is slow in projects with long link lines.

Instead, teach `cmComputeLinkDepends` and `cmComputeLinkInformation` to
carry backtrace information explicitly along with the text of each item.

Fixes: #20322
2020-02-10 16:11:38 -05:00
Brad King
7706b6a714 Merge topic 'xcode-top-level-only-with-object-library'
64304fe72b Xcode: Fix post build script for 'top level project only' opt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4284
2020-01-28 11:05:17 -05:00
Yauheni Khnykin
64304fe72b Xcode: Fix post build script for 'top level project only' opt
When CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY is set on
Xcode generator created post build scripts which tried to call
XCODE_DEPEND_HELPER.make script in subproject.
But XCODE_DEPEND_HELPER.make don't exist in
subprojects when mentioned option is set on.

Fixes: #20262
2020-01-27 16:14:19 -05:00
Isuru Fernando
4a62e3d97c macOS: Add OSX_COMPATIBILITY_VERSION and OSX_CURRENT_VERSION properties
Fixes: #17652
2020-01-24 14:13:41 -05:00
Brad King
b7b8331d68 Xcode: Drop hard-coded default warning flags like -Wmost
The `-Wmost` flag was added by commit 97a51d2172 (ENH: add more xcode
stuff, 2005-01-27, v2.4.0~2396), along with a couple others, as part of
very early work on the Xcode generator.  I suspect that the flags were
part of Xcode's project creation wizard.  However, they are not
appropriate for CMake-based projects because we already have our own
mechanisms for specifying flags desired by the project or user.
Simply drop the flags.

Fixes: #13516
2020-01-13 11:45:23 -05:00
Marc Chevrier
a00960288b GlobalGenerator family: modernize memory management 2020-01-07 11:03:11 +01:00
Marc Chevrier
f7d12609f0 Refactoring: use append functions from cmext/algorithm 2019-12-17 10:44:02 +01:00
Marc Chevrier
36c8cae2e8 cmLocalGenerator: modernize memory management 2019-12-10 00:24:06 +01:00
Daniel Eiband
777ceaea94 cmMakefile: Delay custom command creation
Move custom command creation to cmLocalGenerator and dispatch custom
commands in cmMakefile to generate time.  Generators add custom commands
using the new methods provided by cmLocalGenerator.

Issue: #12877
2019-11-24 20:32:43 +01:00
Daniel Eiband
96e5042e46 cmCustomCommand: Explicitly pass backtrace on construction 2019-11-24 20:13:23 +01:00
Brad King
51d83d4955 Merge topic 'xcode-objc'
1e68fb0c91 Xcode: Set source file type for Objective C/C++

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4073
2019-11-21 11:27:25 -05:00
Brad King
1e68fb0c91 Xcode: Set source file type for Objective C/C++
Fixes: #19998
2019-11-20 09:43:00 -05:00
Gregor Jasny
92c4c852db Xcode: Add custom working directory property
Closes: #19967
2019-11-18 22:34:34 +01:00
Brad King
ccd2c2824a Merge topic 'modernize-memory-management'
f93385283f cmLocalGenerator: modernize memory management
101b5288ff cmAlgorithm: Extend cmAppend capabilities

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4028
2019-11-12 09:55:20 -05:00
Brad King
5b46bc3194 Merge topic 'unity-HEADER_FILE_ONLY'
9a5418320e Unity: Don't include sources with HEADER_FILE_ONLY property set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4023
2019-11-12 09:51:16 -05:00
Brad King
eae743bf17 Merge topic 'unity-HEADER_FILE_ONLY' into release-3.16
9a5418320e Unity: Don't include sources with HEADER_FILE_ONLY property set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4023
2019-11-12 09:51:15 -05:00
Brad King
43ef704d51 Merge topic 'objc-xcode-flags'
bb42e1ed43 ObjC: Add OBJC/OBJCXX flags to Xcode projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4020
2019-11-12 09:43:11 -05:00
Cristian Adam
bb42e1ed43 ObjC: Add OBJC/OBJCXX flags to Xcode projects
Fixes: #19936
2019-11-11 17:43:17 +01:00
Marc Chevrier
f93385283f cmLocalGenerator: modernize memory management 2019-11-11 16:41:13 +01:00
Cristian Adam
9a5418320e Unity: Don't include sources with HEADER_FILE_ONLY property set
Fixes: #19946
Fixes: #19947
Co-authored-by: Craig Scott <craig.scott@crascit.com>
2019-11-11 14:10:18 +01:00
Brad King
30908fa0ee Merge topic 'xcode-restore-CMakeLists'
0ce8a5c08d Xcode: Fix generated references to CMakeLists.txt files
9457c95aa0 cmGlobalXCodeGenerator: Mark known source locations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3999
2019-11-06 09:23:56 -05:00
Brad King
0ce8a5c08d Xcode: Fix generated references to CMakeLists.txt files
Refactoring in commit 2d888e3390 (cmSourceFile: Rename mutating
GetFullPath() overload, 2019-08-29, v3.16.0-rc1~160^2) accidentally left
the paths to `CMakeLists.txt` files empty in generated Xcode project
files.

Fixes: #19927
2019-11-05 14:29:41 -05:00
Brad King
9457c95aa0 cmGlobalXCodeGenerator: Mark known source locations 2019-11-05 14:22:45 -05:00
Alexander Boczar
99e83d4235 cmake: Teach --build mode to load CMAKE_GENERATOR_TOOLSET
Extend the `cmGlobalGenerator::SetGeneratorToolset` signature to
indicate when it is called from `cmake::build`.
2019-10-15 13:28:41 -04:00
Cristian Adam
36ded610af PCH: Generate sources during Compute step 2019-10-09 13:50:25 +02:00
Brad King
83c1657ff7 Unity build: Generate sources during Compute step
The unity build sources need to be added for all generators.  Create
them during `cmGlobalGenerator::Compute` to avoid duplicating the calls
in every generator.  We already handle Qt autogen there too.

Issue: #19789
2019-10-03 14:55:22 -04:00
Kitware Robot
ed98209ddc Revise include order using clang-format-6.0
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`.  Use `clang-format` version 6.0.
2019-10-01 12:26:36 -04:00
Brad King
dce58afd30 Merge branch 'backport-3.15-fix-EXCLUDE_FROM_ALL-subdir-all'
Resolve conflicts with changes since the 3.15 series:

* Convert `cmSystemTools::IsOn` => `cmIsOn`.
* Move one "EXCLUDE_FROM_ALL" target property logic fix to
  its new location in `cmMakefile::AddNewUtilityTarget`.
2019-09-30 09:34:57 -04:00
Brad King
05d7ca14e9 Merge branch 'backport-3.14-fix-EXCLUDE_FROM_ALL-subdir-all' 2019-09-30 09:19:21 -04:00
Brad King
b3b1c7bf3a Restore "all" target in subdirectories marked EXCLUDE_FROM_ALL
The "all" target in each directory is supposed to have targets from that
directory even if the directory itself is marked `EXCLUDE_FROM_ALL` in
its parent.  This was broken by commit dc6888573d (Pass EXCLUDE_FROM_ALL
from directory to targets, 2019-01-15, v3.14.0-rc1~83^2) which made the
participation of a target in "all" independent of context.  Revert much
of the logic change from that commit to restore the old behavior.  Then
re-implement the behavior intended by the commit to keep its test
working.  Extend the test to cover the old behavior too.

Fixes: #19753
2019-09-30 09:18:20 -04:00