1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-17 01:12:07 +08:00

1071 Commits

Author SHA1 Message Date
Brad King
f10682b796 Merge topic 'ispc_lang_support'
5ece12b7e4 gitlab-ci: add ISPC to the Fedora CI image
8976817d6d ISPC: Update help documentation to include ISPC
2368f46ba4 ISPC: Support building with the MSVC toolchain
e783bf8aa6 ISPC: Support ISPC header generation byproducts and parallel builds
34cc6acc81 Add ISPC compiler support to CMake
419d70d490 Refactor some swift only logic to be re-used by other languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5065
2020-09-01 09:15:39 -04:00
Robert Maynard
34cc6acc81 Add ISPC compiler support to CMake 2020-08-28 11:21:31 -04:00
Kyle Edwards
491dddfbde Bootstrap: Add support for Ninja 2020-08-10 14:40:17 -04:00
Brad King
4daf76e10a Merge topic 'compiler_flags'
f76c20da63 Toolchain: Test compiler initial settings
db486da265 Toolchain: Update documentation for initial compiler flags
deec2f587c Toolchain: Take CMAKE_<lang>_FLAGS_INIT into account during compiler detection
ca899af3e2 Toolchain: Handle repeated invocations of CMake with -DCMAKE_C_COMPILER
12ba89e142 Toolchain: Make `/path/comp;-argn' behave the same as 'comp;-argn'
6f1af899db Toolchain: Capture all arguments from CMAKE_<LANG>_COMPILER
ec1d3bc0b6 cmake: avoid exception when printing "changed variables" message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4136
2020-08-06 11:00:12 -04:00
Vitaly Stakhovsky
f37c14e930 Source: use cmNonempty() 2020-07-28 08:31:31 -04:00
Fred Baksik
ec1d3bc0b6 cmake: avoid exception when printing "changed variables" message
If the changed cache variable was a list then this processing may
attempt to access beyond the last item in the list. Instead skip
printing the non-existing value and backup one to finish the loop.
2020-07-23 14:52:48 -04:00
Vitaly Stakhovsky
7156911242 cmIsOn: add overload accepting const std::string* 2020-07-14 08:22:24 -04:00
Vitaly Stakhovsky
8ef18e8525 Clean a few string conversions 2020-07-09 09:42:00 -04:00
Brad King
df6b077625 cmake: Remove broken '--warn-unused-vars' option
This option has been broken since commit b9f9915516 (cmMakefile: Remove
VarUsageStack., 2015-05-17, v3.3.0-rc1~52^2).  That commit removed the
check that an initialized variable has actually been used and caused the
option to warn on every variable ever set.  This was not caught by the
test suite because the test for the feature only checked that warnings
appear when needed and not that they do not appear when not needed.

The option was never very practical to use.  Remove it to avoid the
runtime cost of usage tracking and checks for every variable (which we
were doing even when the option was not used).
2020-06-29 17:23:27 -04:00
Robert Maynard
7628153edb Refactor file extension queries to be more consistent
It was very easy to forgot to check against all language file
extensions. This updates the internal API to have a unified API.
2020-06-22 09:13:16 -04:00
Brad King
882483192d cmake: Simplify internal conditions for adding extra generators
They are always present except in the bootstrap `cmake`.
2020-06-17 06:55:30 -04:00
Vitaly Stakhovsky
7ed8c9ebe3 cmMakefile: add GetDefExpandList() that splits value into std::vector
Combines cmMakefile:GetDefinition() and cmExpandList()
2020-05-30 08:59:20 -04:00
Brad King
171bf5fa92 Merge topic 'third-parties-layout'
2faa3f6c55 Refactoring: Third-parties public headers are under cm3p prefix
75e87e3db4 bootstrap: update list of problematic files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4705
2020-05-08 08:18:17 -04:00
Craig Scott
b743ffbfa2 Merge topic 'script-mode-and-arbitrary-args'
e4f1b301fe cmake: Allow arbitrary args passed to CMake script

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4707
2020-05-07 09:09:52 -04:00
Marc Chevrier
2faa3f6c55 Refactoring: Third-parties public headers are under cm3p prefix
Fixes: #20666
2020-05-07 12:06:08 +02:00
Alex Turbov
e4f1b301fe cmake: Allow arbitrary args passed to CMake script 2020-05-06 21:40:36 +10:00
Brad King
aa45f3f25f Merge topic 'gcc8-unused-function'
1b4ab323fd Fix build warnings for unused functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4697
2020-05-04 11:02:01 -04:00
Brad King
0b08c1279c Merge topic 'cmprop-state'
e267c3fddf cmState::GetInitializedCacheValue: return cmProp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4696
2020-05-01 08:31:32 -04:00
Wouter Klouwen
1b4ab323fd Fix build warnings for unused functions
This commit addresses two sources of build errors when using the warning
flag -Werror=unused-function for GCC in the default compiler flags.

The affected functions are not used when building in bootstrap
mode and therefore should be ifdefed out.

No functional changes.
2020-05-01 12:54:21 +01:00
Vitaly Stakhovsky
e267c3fddf cmState::GetInitializedCacheValue: return cmProp
cmProp alias is used; no actual change in type
2020-04-30 10:45:45 -04:00
Marc Chevrier
8d4a9ee398 Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view> 2020-04-30 09:53:27 +02:00
Marc Chevrier
aacd4e4a90 Refactoring: add cm::contains to <cmext/algorithm> 2020-04-17 10:00:03 +02:00
Ben Boeckel
f2a33107be clang-tidy: address bugprone-branch-clone lints
Arguably, many of these are bugs in `clang-tidy`. An if/else tree with
other conditionals between cloned blocks may be relying on the
intermediate logic to fall out of the case and inverting this logic may
be non-trivial.

See: https://bugs.llvm.org/show_bug.cgi?id=44165
2020-04-13 11:26:02 -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
Brad King
7e3d81b1df Merge topic 'cmprop-state'
a7f2ff16a4 cmState::GetCacheEntryProperty: return cmProp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4522
2020-03-27 07:49:30 -04:00
Vitaly Stakhovsky
a7f2ff16a4 cmState::GetCacheEntryProperty: return cmProp 2020-03-25 14:46:52 -04:00
Vitaly Stakhovsky
c84cf42897 cmState::GetGlobalProperty: return cmProp 2020-03-25 09:10:46 -04:00
Rolf Eike Beer
ec7928ef26 use _s to construct static string_views at several places
This should avoid the runtime strlen() call.
2020-03-24 19:40:44 +01:00
Rolf Eike Beer
ada6a3226f use cm::string_view for language extension lookups
Once the list of extensions is build the set is just a copy of the vector and
not modified anymore. Use a string_view for the members of the set, which saves
a small amount of memory. It also makes possible to use string_views as lookup
keys, so the callers do not need to create copies for the extensions anymore.
2020-03-23 22:41:43 +01:00
Rolf Eike Beer
48adc29721 replace "std::string::find(x) == 0" with cmHasPrefix() 2020-03-23 22:41:43 +01:00
Brad King
60db3af147 Merge topic 'cmprop-state'
bd89133543 cmState::GetCacheEntryValue: return cmProp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4493
2020-03-19 07:18:27 -04:00
Brad King
0586123ede Merge topic 'trace-format-json-doc'
1994f950ff cmake: List valid values for --trace-format on the command line
e39766d84a Help: Fix documentation of --trace-format parameter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4500
2020-03-19 06:57:52 -04:00
Kyle Edwards
1994f950ff cmake: List valid values for --trace-format on the command line 2020-03-18 16:16:46 -04:00
Vitaly Stakhovsky
bd89133543 cmState::GetCacheEntryValue: return cmProp 2020-03-17 12:09:20 -04:00
Wouter Klouwen
9aa4640792 cmake: add command line options to output script profiling data
For users of CMake who want to optimize their scripts if they take a
while to run, this commit adds the ability to output profiling data.

To enable this output, it adds the two command line parameters
to select the output path and format.

This commit adds the first profiling format of type ``google-trace``,
which is the output is a JSON file containing Duration events as per the
Google Trace Format specification:

https://docs.google.com/document/d/1CvAClvFfyA5R-
PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#
2020-03-07 13:36:27 +00:00
Kyle Edwards
2ac835b9f9 Refactor: Allow generators to decide default configuration for build
And allow them to read any cache values they need.
2020-02-04 14:13:07 -05:00
Vitaly Stakhovsky
bbc07e4561 Source: use std::string in place of const char* 2020-01-29 14:31:01 -05:00
Brad King
a4d7a79beb Merge topic 'ninja-1.10'
ccaa0bccc4 Ninja: Do not clean metadata when re-generating inside a running build
657820a00b Ninja: Track when running to re-generate during a build
b12b013028 Ninja: Factor metadata cleanup into dedicated method
5d92e60d81 Ninja: Skip cleandead and recompact if build.ninja is missing
dd0a4718fd Ninja: Fix CMAKE_NINJA_OUTPUT_PATH_PREFIX with Ninja 1.10
0944caaebb Tests: Fix RunCMake.CMP0037 test with Ninja 1.10
9d4883cce5 Tests: Fix RunCMake.Ninja test for Ninja 1.10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4290
2020-01-28 11:35:24 -05:00
Brad King
657820a00b Ninja: Track when running to re-generate during a build
Tell CMake explicitly when it is re-running inside a `ninja` invocation
to re-generate the build system.
2020-01-27 15:39:04 -05:00
Vitaly Stakhovsky
1398517f31 AppendProperty: convert value param to std::string 2020-01-25 10:37:00 -05:00
Marc Chevrier
a00960288b GlobalGenerator family: modernize memory management 2020-01-07 11:03:11 +01:00
Marc Chevrier
5444a8095d cmGlobalGenerator: modernize memrory managemenbt 2019-12-30 16:55:39 +01:00
Kyle Edwards
bb811568cc Merge topic 'traceJSON'
e113ab1168 trace: Add test for the JSON-v1 trace
482497e0de trace: Add JSON output format

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4102
2019-12-27 10:53:13 -05:00
Daniel Mensinger
482497e0de
trace: Add JSON output format
Add a new `--trace-format=` flag, to enable the new JSON trace
output format. This new format is easier to parse by machines
than the existing format. This new format also removes the
ambiguity of the whitespace in the "old" format (e.g. is that
whitespace part of a file path, or does it seperate arguments)
2019-12-23 14:05:36 +01:00
Kyle Edwards
61960fa466 Merge topic 'add_find_call_debugging'
f3c9396260 Help: Document CMAKE_FIND_DEBUG_MODE
204b8d9f4e find_*: Use debug logging infrastructure
a7ea20649d find_*: Add debug logging infrastructure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3935
2019-12-20 12:59:50 -05:00
Robert Maynard
a7ea20649d find_*: Add debug logging infrastructure
Enable debug messages a new `--find-debug` command-line option or via
the `CMAKE_FIND_DEBUG_MODE` variable.

This work was started by Chris Wilson, continued by Ray Donnelly, and
then refactored by Robert Maynard to collect information into a single
message per find query.

Co-Author: Ray Donnelly <mingw.android@gmail.com>
Co-Author: Chris Wilson <chris+github@qwirx.com>
2019-12-19 08:09:49 -05:00
Brad King
0607a50bb3 Merge topic 'add-header-cmext-algorithm'
f7d12609f0 Refactoring: use append functions from cmext/algorithm
a38d04c076 Refactoring: introduce header cmext/algorithm with append functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4131
2019-12-18 09:32:03 -05:00
Brad King
64e2891cbd Merge topic 'stdstring-target'
c34b4497f8 cmTarget: add std::string overloads

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4137
2019-12-17 11:09:20 -05:00
Marc Chevrier
f7d12609f0 Refactoring: use append functions from cmext/algorithm 2019-12-17 10:44:02 +01:00
Vitaly Stakhovsky
c34b4497f8 cmTarget: add std::string overloads 2019-12-14 09:30:28 -05:00