Commit Graph

32565 Commits

Author SHA1 Message Date
Marc Chevrier 9480ced81a Makefiles generator: dependencies messages in verbose mode
Fixes: #23689
2022-07-06 17:40:08 +02:00
Brad King ad2e7f3c53 Merge topic 'command-arg-parser-optional'
bff468c988 cmFileCommand: Use cm::optional for keyword argument presence
2586afa31b cmCTest*Command:: Use cm::optional for keyword argument presence
5446b15c5c cmInstallCommand: Use cm::optional for keyword argument presence
298f226cb4 cmExportCommand: Use cm::optional for keyword argument presence
0a4c5164c9 cmArgumentParser: Offer cm::optional bindings to capture keyword presence
f3dbf4b89d cmArgumentParser: Remove unnecessary local names for common types
2873f41bd9 cmArgumentParser: Require callers to consider unparsed arguments
1ee5a4a548 cmArgumentParser: Avoid allocating copies of keyword strings
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7450
2022-07-06 09:22:38 -04:00
Brad King fd0042b68a Merge topic 'freebsd-cpack-update'
2655605261 FreeBSD: follow CPACK_PACKAGE_FILE_NAME, if set
50580af645 FreeBSD (docs): repair errors in documentation of FreeBSD-cpack
1b61cd1597 FreeBSD: explain the pkg_create() call
57e8cd1a81 FreeBSD: drop support for libpkg before 1.17

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7447
2022-07-06 09:19:45 -04:00
Brad King b80ccea686 Merge topic 'enable_language-deduplicate'
e3c8012ccd Help: Document enable_language accepting multiple languages
b4fd385c9b cmMakefile: Dedupe languages when enabling them
66bfe14309 cmMakefile: Refactor parameter and variable names for EnableLanguage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7426
2022-07-06 09:16:34 -04:00
Brad King 18824a9a2d Merge topic 'genex-LINK_LIBRARY-fix-generation'
e8792da04b genex-LINK_LIBRARY: ensure correct generation inside LINK_GROUP genex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7443
2022-07-06 09:13:06 -04:00
Kitware Robot d7ba536841 CMake Nightly Date Stamp 2022-07-06 00:01:09 -04:00
Brad King bff468c988 cmFileCommand: Use cm::optional for keyword argument presence 2022-07-05 16:56:06 -04:00
Brad King 2586afa31b cmCTest*Command:: Use cm::optional for keyword argument presence 2022-07-05 16:55:40 -04:00
Brad King 5446b15c5c cmInstallCommand: Use cm::optional for keyword argument presence 2022-07-05 16:48:17 -04:00
Brad King 298f226cb4 cmExportCommand: Use cm::optional for keyword argument presence 2022-07-05 16:47:01 -04:00
Brad King 0a4c5164c9 cmArgumentParser: Offer cm::optional bindings to capture keyword presence
Several clients have been using `keywordsMissingValue` or
`parsedKeywords` to check for the presence of keywords.  Offer them a
type-encoded way to explicitly check whether a keyword is present.
2022-07-05 16:35:01 -04:00
Brad King f3dbf4b89d cmArgumentParser: Remove unnecessary local names for common types 2022-07-05 16:35:01 -04:00
Brad King 2873f41bd9 cmArgumentParser: Require callers to consider unparsed arguments 2022-07-05 16:35:01 -04:00
Brad King 1ee5a4a548 cmArgumentParser: Avoid allocating copies of keyword strings 2022-07-05 16:34:57 -04:00
Adriaan de Groot 2655605261 FreeBSD: follow CPACK_PACKAGE_FILE_NAME, if set
The underlying pkg library always produces a <name>-<version>.pkg
file, so to follow CPACK_PACKAGE_FILE_NAME we need to detect
that and rename appropriately.

FIXES #23034
2022-07-05 16:00:43 +02:00
Adriaan de Groot 1b61cd1597 FreeBSD: explain the pkg_create() call
- the upstream API is undocumented, so dig in the C sources
  to get parameter names.
2022-07-05 14:24:45 +02:00
Adriaan de Groot 57e8cd1a81 FreeBSD: drop support for libpkg before 1.17
All supported FreeBSD versions are now using 1.17 or later
2022-07-05 11:42:00 +02:00
Marc Chevrier e8792da04b genex-LINK_LIBRARY: ensure correct generation inside LINK_GROUP genex
This fix ensures the following pattern is correctly handled:
$<LINK_GROUP:group_feat,$<LINK_LIBRARY:lib_feat,mylib>>

With:
CMAKE_LINK_GROUP_USING_group_feat = "—START_GROUP" "—END_GROUP"
CMAKE_LINK_LIBRARY_USING_lib_feat = "—PREFIX" "—LINK <LIBRARY>" "—SUFFIX"

Before the fix, we get the following generation:
—START_GROUP —PREFIX —LINK /path/to/mylib —END_GROUP —SUFFIX
—END_GROUP and —SUFFIX are in the wrong order

After the fix, we get the correct order:
—START_GROUP —PREFIX —LINK /path/to/mylib —SUFFIX —END_GROUP
2022-07-05 10:00:04 +02:00
Kitware Robot 15f4ee89fe CMake Nightly Date Stamp 2022-07-05 00:01:10 -04:00
Kitware Robot acf3fe632c CMake Nightly Date Stamp 2022-07-04 00:01:21 -04:00
Kitware Robot 1392102e88 CMake Nightly Date Stamp 2022-07-03 00:01:07 -04:00
Kitware Robot f1e38ec0a7 CMake Nightly Date Stamp 2022-07-02 00:01:10 -04:00
Brad King 27a103e8bc Merge topic 'file-archive-args'
7c83265e59 file(ARCHIVE*): Simplify acceptance of empty list arguments
dfff470d15 file(ARCHIVE*): Add test for keyword arguments with missing values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7427
2022-07-01 08:24:36 -04:00
Brad King 34d746e419 Merge topic 'genex-TARGET_BUNDLE_DIR_NAME'
8bd98b8117 Genex: Fix TARGET_BUNDLE_DIR_NAME incorrect extension

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7428
2022-07-01 08:19:36 -04:00
Ben Leadbetter 8bd98b8117 Genex: Fix TARGET_BUNDLE_DIR_NAME incorrect extension
Fix the genex from commit 997af2e1a6 (Genex: Add TARGET_BUNDLE_DIR_NAME,
2022-04-14, v3.24.0-rc1~233^2) to use the correct bundle directory
extension for each bundle type.

Fixes: #23683
2022-07-01 08:18:10 -04:00
Kitware Robot 113fbaf3e2 CMake Nightly Date Stamp 2022-07-01 00:01:09 -04:00
friendlyanon b4fd385c9b cmMakefile: Dedupe languages when enabling them
cmMakefile::EnableLanguage() now deduplicates the languages argument and
emits an author warning listing the languages that were defined multiple
times in a single call.

Fixes: #23596
2022-06-30 23:37:05 +02:00
friendlyanon 66bfe14309 cmMakefile: Refactor parameter and variable names for EnableLanguage
In commit 731369ef9c (ENH: try to initialize all languages at the same
time, 2004-08-27, v2.4.0~2899) the languages parameter name for
cmMakefile::EnableLanguage() was changed to "std::vector languages" in
the declaration, however the definition had "std::vector lang".

Furthermore, the variable names in the definition had confusing names,
such as the "i" variable in the loop which referred to an iterator at
one point, but no longer does.
2022-06-30 21:21:17 +02:00
Brad King 5a460f3243 Merge topic 'file-set-crash'
3fee5398bd install(EXPORT): Check for missing file sets at generate time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7420
2022-06-30 08:20:24 -04:00
Brad King 6bc597b30e Merge topic 'file-set-crash' into release-3.24
3fee5398bd install(EXPORT): Check for missing file sets at generate time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7420
2022-06-30 08:20:23 -04:00
Kitware Robot 4c2cead0c3 CMake Nightly Date Stamp 2022-06-30 00:01:09 -04:00
Brad King 7c83265e59 file(ARCHIVE*): Simplify acceptance of empty list arguments
In `cmArgumentParser`, a keyword bound to a `std::vector<std::string>`
value is reported in the list of keywords with missing values if the
keyword appears followed by an empty list.  For cases where we want to
tolerate empty lists, clients need to filter out such keywords
themselves before producing an error message.  This may be improved in
the future, but that is out of scope here.

In commit c7e1198a23 (file: Add ARCHIVE_{CREATE|EXTRACT} subcommands,
2020-03-13, v3.18.0-rc1~530^2), a pattern for filtering out keywords
that accept empty lists was copied from commit c998c8d560
(file(GET_RUNTIME_DEPENDENCIES): Tolerate empty list arguments,
2020-01-22, v3.17.0-rc1~111^2~1) incorrectly in two ways:

* Keywords were included in the filter that do not accept empty lists.
* Keywords were not in sorted order, breaking the filter operation.

Those two bugs mostly canceled each other out, and the resulting
behavior was to correctly report keywords with missing values.
However, the `MTIME` keyword was accidentally accepted with no value
by pretending the keyword was not given at all.

Simplify the logic by removing keywords from the filters that should not
be there.  Leave `MTIME` in the filter for compatibility.
2022-06-29 17:43:41 -04:00
Kyle Edwards 3fee5398bd install(EXPORT): Check for missing file sets at generate time
Missing file sets were originally checked at configure time in
install(TARGETS ... EXPORT), but were not checked at generate time. If
a file set was added after install(TARGETS ... EXPORT) was called,
an abortion error was thrown. Check again at generate time to gracefully
display an error message instead of crashing.

Fixes: #23680
2022-06-29 15:05:32 -04:00
Brad King b1d8141534 Merge topic 'log_level_command'
23bbac941a Add cmake_language(GET_MESSAGE_LOG_LEVEL) sub command
2b6ef864e0 Move LogLevel enum out of cmake.h header

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7348
2022-06-29 08:52:13 -04:00
Brad King c42a9dfce0 Merge topic 'lcc-updates'
22a2b9c49f Tests: Fix Java tests on multi-config generators
b05d297964 Tests: handle a case when hg executable is broken
2faabab644 Tests: don't fail tests on broken E2K Java RVM
1462a1e15d Tests: check for shlibdeps symbols/shlibs before testing it
070e217399 Tests: enable Java tests if javac is a recurse symlink
7545d1ca9f Tests: don't use broken makensis
f11c12f9c8 Source: Suppress some warnings on LCC 1.23.x
de16db0f64 curl: make libcmcurl buildable with old LibreSSL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7418
2022-06-29 08:48:13 -04:00
Brad King edad647dd9 Merge topic 'fix-23523'
10668f26c9 AUTOUIC: Fix internal paths of generated ui_foo.h files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7419
2022-06-29 08:43:28 -04:00
Brad King 18c0ff66b2 Merge topic 'fix-23523' into release-3.24
10668f26c9 AUTOUIC: Fix internal paths of generated ui_foo.h files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7419
2022-06-29 08:43:27 -04:00
Kitware Robot 3a3e5462d0 CMake Nightly Date Stamp 2022-06-29 00:01:13 -04:00
Josiah Bills 10668f26c9 AUTOUIC: Fix internal paths of generated ui_foo.h files
For every file foo.ui we generate a ui_foo.h file in
${target}_autogen/include or ${target}_autogen/include_$<CONFIG> in the
multi-config case.  Even .ui files in subdirectories are handled this
way.  That means, .ui files with the same base name will conflict in a
target.

However, for .ui files in subdirectories we added generated sources with
the nonexistent path ${target}_autogen/include/subdir/ui_foo.h.  This
patch fixes that.

Also, CMake will now yield an error if a target has multiple .ui files
with the same base name.

Fixes #23523
2022-06-28 17:26:28 +02:00
makise-homura f11c12f9c8 Source: Suppress some warnings on LCC 1.23.x
LCC 1.23.x (confirmed for 1.23.10, 1.23.19, maybe others)
issues -Wunused-function warning on the following functions:
Source/cmFileAPICodemodel.cxx:126, ValueEq()
Source/cmFileAPICodemodel.cxx:130, ValueLess()
Source/cmGeneratorExpressionNode.cxx:630, back()
This fix makes it silent for compatibility.
This is not a subject for newer LCC versions, like 1.25 and 1.26.
On LCC 1.21 CMake is not buildable, and 1.22 and 1.24 are not
tested, as they are internal development versions. Thus, the fix
is only applied if LCC 1.23 is detected.
2022-06-28 11:12:04 -04:00
Alexandru Croitor 23bbac941a Add cmake_language(GET_MESSAGE_LOG_LEVEL) sub command
The new sub-command writes a string representation of the
current log level to the output variable given to the
sub-command.

Given that the log-level might be set either via the --log-level
command line option or via the CMAKE_MESSAGE_LOG_LEVEL
cache / regular variables, the priority for each of the log level
sources is as follows, with the first one being the highest:
1) --log-level
2) CMAKE_MESSAGE_LOG_LEVEL regular variable
3) CMAKE_MESSAGE_LOG_LEVEL cache variable
4) default log level (STATUS)

Fixes: #23572
2022-06-28 16:03:22 +02:00
Brad King 31cbe200f3 Merge topic 'posix_c'
e1adddc74e RunCMake/CXXModules/NoCXX20: Force older standard
3f7ebf9354 RunCMake/CTestTimeout: Include sched.h for pid_t
8eb8d16c19 cmSystemTools: Fix unsetenv() fallback
324ca5b489 Tests/CTestTestFdSetSize: Support plain POSIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7408
2022-06-28 09:28:08 -04:00
Kitware Robot 10bacfb26b CMake Nightly Date Stamp 2022-06-28 00:01:06 -04:00
Kitware Robot 80e4a155e0 CMake Nightly Date Stamp 2022-06-27 00:01:14 -04:00
Raul Tambre 8eb8d16c19 cmSystemTools: Fix unsetenv() fallback
The fallback path boils down to putenv(). Calling that with a "=" sets the
variable to an empty string.
Use cmSystemTools::UnPutEnv() instead, which correctly handles unsetting
variables on a variety of systems.
2022-06-26 11:50:00 +03:00
Kitware Robot 526d10139d CMake Nightly Date Stamp 2022-06-26 00:01:08 -04:00
Kitware Robot 42984e7c16 CMake Nightly Date Stamp 2022-06-25 00:01:07 -04:00
Alexandru Croitor 2b6ef864e0 Move LogLevel enum out of cmake.h header
Move LogLevel enum into the cmMessageType.h header in preparation
for a new log level querying feature.
Wrap the enum into a new Message namespace.
Adjust all code usages.
2022-06-24 16:24:33 +02:00
Kitware Robot 68eece740a CMake Nightly Date Stamp 2022-06-24 00:01:11 -04:00
Brad King 8c562ece28 CMake 3.24.0-rc2 2022-06-23 10:58:01 -04:00