| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes: #25023
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Setting the variables CMAKE_AUTOGEN_ORIGIN_DEPENDS,
CMAKE_AUTOMOC_COMPILER_PREDEFINES, and CMAKE_AUTOMOC_MACRO_NAMES on the
cmake command line did not work as expected. CMakeGenericSystem.cmake
initialized these variables even if they were defined by the user.
This led to the confusing situation where the cache variant of a
variable had one value (defined on the command line) and the non-cache
variant of a variable had a different value (defined in
CMakeGenericSystem.cmake).
Fix this by checking whether the variables are defined before setting
their default values.
Fixes: #24069
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
6ab9fbd43b color: Add tests for CMAKE_COLOR_DIAGNOSTICS
78adb1b952 color: Add CMAKE_COLOR_DIAGNOSTICS environment variable
884d9de8b7 color: Introduce CMAKE_COLOR_DIAGNOSTICS variable
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Frank Dana <ferdnyc@gmail.com>
Merge-request: !6990
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Add a variable to control both makefile color messages and compiler
color diagnostics.
Fixes: #15502
|
|/
|
|
|
|
| |
To be more consistent between genex and variables as well as
the forecomming LINK_GROUP genex, rename variable *_LINK_USING_<FEATURE>*
in *_LINK_LIBRARY_USING_<FEATURE>*
|
|
|
|
|
|
| |
To enable the management of incompatible $<LINK_LIBRARY> declarations,
add LINK_LIBRARY_OVERRIDE and LINK_LIBRARY_OVERRIDE_<LIBRARY> target
properties.
|
|
|
|
|
|
|
|
| |
Generate the same default `CMAKE_INSTALL_PREFIX` if a project is
configured with CMAKE_GENERATOR_PLATFORM (`cmake -G "Visual Studio
[...]" -A x64` and `cmake -G "Visual Studio [...]" -A ARM`) instead of
the prior CMake 3.1 way (`cmake -G "Visual Studio [...] Win64"` and
`cmake -G "Visual Studio [...] ARM"`).
|
|\ |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Change the default value of `CMAKE_AUTOMOC_PATH_PREFIX` to `OFF` to
restore compatibility with behavior of CMake 3.15 and below.
C++ source files that are generated by Qt's meta object compiler (moc)
include the header file that was passed as input argument to moc. This
is usually a path relative to the source directory, for example
#include "../../source/dir/myobject.h"
That is problematic for reproducible builds as described in #18815.
To cope with that, the target property AUTOMOC_PATH_PREFIX was
introduced in CMake 3.16 by commit d018d27c10 (Autogen: Add moc path
prefix generation (AUTOMOC_PATH_PREFIX), 2019-09-13, v3.16.0-rc1~94^2~4).
The property is default-initialized from the variable
`CMAKE_AUTOMOC_PATH_PREFIX`, which defaults to `ON`.
If this property is ON, and myobject.h is located in an include
directory of the target, moc-generated C++ files include the file
without the "path prefix":
#include "myobject.h"
This behavior, however, can break projects that have equally named
header files in different include directories. As "not breaking
existing projects" trumps "have reproducible builds by default" we
change the default of `CMAKE_AUTOMOC_PATH_PREFIX` to `OFF`.
Also, it is now possible to pass `-DCMAKE_AUTOMOC_PATH_PREFIX=ON` on the
CMake command line. Before, it was overridden in `CMakeGenericSystem`.
Fixes: #20598
Issue: #18815
|
|/ /
| |
| |
| |
| |
| | |
Also de-duplicate its initialization code.
Fixes: #16588
|
| |
| |
| |
| |
| |
| | |
Qt 5.14 introduced a new moc keyword `Q_NAMESPACE_EXPORT`.
Qt-Issue: https://bugreports.qt.io/browse/QTBUG-68014
|
|/
|
|
| |
Fixes: #18386
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new `AUTOMOC_PATH_PREFIX` boolean target property enables automatic
generation of the path prefix `-p` option for `moc`.
`AUTOMOC_PATH_PREFIX` is initialized from the variable
`CMAKE_AUTOMOC_PATH_PREFIX`, which is ON by default.
When `AUTOMOC_PATH_PREFIX` is enabled, CMake tests if a `moc`ed header file is
in one of the include directories. If so, then the `-p` option, with the
relative path of the header parent directory to the respective include
directory, is added to the `moc` command. If the header file is not in an
include directory, the `-p` option is omitted.
Closes: #18815 "AUTOMOC: generated files include full relative path,
breaking certain reproducible builds"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds
- the variable ``CMAKE_AUTOGEN_ORIGIN_DEPENDS`` which initializes
- the target property ``AUTOGEN_ORIGIN_DEPENDS``
which controls whether or not the origin target dependencies
should be forwarded to the corresponding ``_autogen`` target.
The default value of ``CMAKE_AUTOGEN_ORIGIN_DEPENDS`` is ``ON``
which corresponds to the behavior that is in place since CMake 3.9.
Closes: #18493
|
|
|
|
|
|
|
|
| |
In CMakeGenericSystem, it should be ``CMAKE_INCLUDE_SEP_<LANG>`` and not
``CMAKE_INCLUDE_<LANG>_SEP``. However, if the flag is defined, include
behavior changes to Java-style non-repeating flags, which isn't
intended. Therefore, removing the (misspelled) default initialization
should help remove confusion and unintended side effects.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes duplicated code for per-config variable initialization by
providing a `cmake_initialize_per_config_variable(<PREFIX> <DOCSTRING>)`
function.
This function initializes a `<PREFIX>` cache variable from `<PREFIX>_INIT`
and unless the `CMAKE_NOT_USING_CONFIG_FLAGS` variable is defined, does
the same with `<PREFIX>_<CONFIG>` from `<PREFIX>_<CONFIG>_INIT` for every
`<CONFIG>` in `CMAKE_CONFIGURATION_TYPES` for multi-config generators or
`CMAKE_BUILD_TYPE` for single-config generators.
|
| |
|
|
|
|
|
|
|
|
|
| |
Instead of adding `Q_OBJECT` and `Q_GADGET` to the macro search list
in `Source/cmQtAutoGenerators.cxx`, add them in
`Modules/CMakeGenericSystem.cmake` to the default value of
`CMAKE_AUTOMOC_MACRO_NAMES`.
Also add `Q_NAMESPACE` to `CMAKE_AUTOMOC_MACRO_NAMES`
which closes #17299.
|
|
|
|
|
|
| |
Visual Studio 15.4 adds support for this architecture.
Fixes: #17213
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool. Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience. Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.
Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices. It also references version control
history for more precise information. Therefore we no longer need to spell
out the list of Contributors in each source file notice.
Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing". The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.
Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically. Manually fix up shebang lines and trailing
newlines in a few files. Manually update the notices in a few files that the
script does not handle.
|
|
|
|
|
|
| |
Add a TARGET_MESSAGES property to control whether Makefile targets print
the "Built target " completion messages. Default to ON to preserve
existing behavior.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block. This is no longer the preferred style.
Run the following shell code:
for c in else endif endforeach endfunction endmacro endwhile; do
echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ancient CMake versions required upper-case commands. Later command
names became case-insensitive. Now the preferred style is lower-case.
Run the following shell code:
cmake --help-command-list |
grep -v "cmake version" |
while read c; do
echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
b71e731 -add docs for ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}
7ced073 make default install component name configurable
b6fba35 -strip trailing whitespace
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Until now an unnamed component was always named "Unspecified".
Now this name is taken from the new cmake variable CMAKE_INSTALL_DEFAULT_COMPONENT_NAME,
which is initialized to "Unspecified". But it can now be set to something
project-specific, per directory
Alex
|
| |
| |
| |
| | |
Alex
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default value for CMAKE_INSTALL_PREFIX should be
based on what architecture the built targets are, not
what architecture CMake itself is.
This fix merely guesses better what the built targets
architecture is. It still may guess incorrectly in some
cases. For those cases, it will have to be up to build
scripts and developers on projects to pass in a correct
value for CMAKE_INSTALL_PREFIX with -D on the command line
or via 'force cache value' logic in CMakeLists.txt files.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This moves GNU compiler flags into new-style modules
Compiler/GNU-<lang>.cmake
Platform/<os>-GNU-<lang>.cmake
We use language-independent helper modules
Compiler/GNU.cmake
Platform/<os>-GNU.cmake
to define macros consolidating the information.
|
|
|
|
|
|
|
| |
This adds copyright/license notification blocks CMake's non-find
modules. Most of the modules had no notices at all. Some had notices
referring to the BSD license already. This commit normalizes existing
notices and adds missing notices.
|
|
|
|
|
|
|
|
|
| |
This creates global property RULE_MESSAGES which can be set to disbale
per-rule progress and action reporting. On Windows, these reports may
cause a noticable delay due to the cost of starting extra processes.
This feature will allow scripted builds to avoid the cost since they do
not need detailed information anyway. This replaces the RULE_PROGRESS
property created earlier as it is more complete. See issue #8726.
|
|
|
|
|
|
|
|
| |
This creates global property RULE_PROGRESS which can be set to disbale
per-rule progress reporting. On Windows, progress reports may cause a
noticable delay due to the cost of starting an extra process. This
feature will allow scripted builds to avoid the cost since they do not
need detailed progress anyway. See issue #8726.
|
|
|
|
|
|
|
|
|
| |
now generates the project so that the environment variable VERBOSE is set to
1 when make is executed by kdevelop (and additionally this didn't work,
since CMAKE_GENERATOR never matches KDevelop3, this is now in
CMAKE_EXTRA_GENERATOR)
Alex
|
|
|
|
| |
powerful signature.
|
|
|
|
|
|
| |
(needed by the Digital Mars D compiler)
Alex
|
|
|
|
| |
Alex
|
|
|
|
|
|
| |
to the first global cmake property TARGET_SUPPORTS_SHARED_LIBS
Alex
|
|
|
|
|
|
| |
platform doesn't support shared libraries
Alex
|
|
|
|
|
|
| |
CMakeGenericSystem.cmake to gcc.cmake
Alex
|
|
|
|
| |
the command line and one set by CMake as a default. This is useful for changing the default prefix while still allowing the user to override it.
|