Commit Graph

20115 Commits

Author SHA1 Message Date
Brad King a64fa04b4b Merge topic 'cmake-gui-reset-generator'
da490e11 cmake-gui: Fix cmState initialization when changing generators (#15959)
2016-02-16 09:52:36 -05:00
Brad King e0a3009cda Merge topic 'fix-cmake_parse_arguments-expansion'
c8c45a2c cmake_parse_arguments: Restore ;-list argument flattening
2016-02-16 09:52:34 -05:00
Brad King c0a0c7d3f2 Merge topic 'ninja-deterministic-gen'
46fa9583 Ninja: Fix non-determinism in generated target dependency order (#15968)
2016-02-16 09:52:25 -05:00
Kitware Robot 28126b8927 CMake Nightly Date Stamp 2016-02-16 00:01:03 -05:00
Kitware Robot f03cb192e9 CMake Nightly Date Stamp 2016-02-15 00:01:04 -05:00
Kitware Robot 7534a4d567 CMake Nightly Date Stamp 2016-02-14 00:01:03 -05:00
Kitware Robot dec7d5c4de CMake Nightly Date Stamp 2016-02-13 00:01:09 -05:00
Dimitar Yordanov c8c45a2c4e cmake_parse_arguments: Restore ;-list argument flattening
The re-implementation in commit v3.5.0-rc1~116^2~1 (CMakeParseArguments:
replace by native cmake_parse_arguments command, 2015-12-05) introduced
a regression when parsing the ARGN arguments with cmake_parse_arguments.
The original implementation used

    foreach(currentArg ${ARGN})

to iterate over input arguments.  This flattened ;-lists within the
arguments whether they were quoted or not.  Fix our new implementation
to preserve this behavior and add a test case to cover it.

Signed-off-by: Dimitar Yordanov <dimitar.yordanov@sap.com>
Signed-off-by: Matthias Maennich <matthias.maennich@sap.com>
2016-02-12 11:19:40 -05:00
Brad King da490e1159 cmake-gui: Fix cmState initialization when changing generators (#15959)
Refactoring in commit v3.3.0-rc1~29^2~1 (cmState: Host some state from
the cmGlobalGenerator, 2015-05-24) moved storage of some generator
traits over to cmState.  However, it accidentally removed initialization
of the values from the cmGlobalGenerator constructor.  This is needed
because generator subclasses update the settings in their constructors.
Since a single cmState instance is shared across multiple build trees by
cmake-gui, initializing the values in its constructor is not enough.
Fix this by restoring the needed initializations to the
cmGlobalGenerator constructor.
2016-02-12 10:21:00 -05:00
Brad King 1c8dadd914 Merge topic 'fix-warnings'
e1ea1df0 cmListFileCache: Fix warning about inconsistent use of class/struct
2016-02-12 09:03:52 -05:00
Brad King 46fa958362 Ninja: Fix non-determinism in generated target dependency order (#15968)
We represent target dependency sets as `set<cmTargetDepend>` which
orders by a `cmGeneratorTarget const*` pointer value.  Therefore the
order of dependencies encountered in AppendTargetDepends is not
predictable.  Sort them by content to make the result deterministic.
2016-02-12 08:51:58 -05:00
Kitware Robot 3fd326695f CMake Nightly Date Stamp 2016-02-12 00:01:04 -05:00
Tobias Hunger e1ea1df07e cmListFileCache: Fix warning about inconsistent use of class/struct
Exposed by Clang trunk.
2016-02-11 13:38:02 -05:00
Brad King 53108f8008 Merge topic 'ninja-deterministic-gen'
59ade844 Ninja: Fix non-determinism in generated build statement order (#15968)
2016-02-11 10:41:18 -05:00
Brad King 59ade844ef Ninja: Fix non-determinism in generated build statement order (#15968)
Generate custom command build statements in the order we encounter
source files specifying them.  Do not depend on pointer values of
internally allocated structures for ordering.
2016-02-11 08:53:37 -05:00
Kitware Robot d83abbf9e3 CMake Nightly Date Stamp 2016-02-11 00:01:04 -05:00
Brad King 7540deb185 Merge topic 'curl-pre-7.21.5'
1ea55acf cmCurl: Fix compilation with system curl versions prior to 7.21.5
2016-02-10 08:49:30 -05:00
Kitware Robot 0def7e6e70 CMake Nightly Date Stamp 2016-02-10 00:01:05 -05:00
Brad King 1ea55acf8a cmCurl: Fix compilation with system curl versions prior to 7.21.5
This version introduced CURLE_NOT_BUILT_IN which we have used since
commit v3.4.0-rc1~211^2~4 (cmCurl: Tolerate lack of CURLOPT_CAPATH
support, 2015-08-12).  For older versions, just define the name to the
then-unused error code so that we can compile.
2016-02-09 13:24:19 -05:00
Brad King a887c7f1fd Merge topic 'fix-target-lookup-performance-regression'
9b7d5871 Improve internal generator target structure lookup
6cbf6a51 Fix internal target lookup performance regression
2016-02-09 10:10:23 -05:00
Brad King 3b8c0fbfd7 Merge topic 'install-EXCLUDE_FROM_ALL'
586e56d0 Help: Add notes for topic 'install-EXCLUDE_FROM_ALL'
d321c196 Tests: Add cases for install() command EXCLUDE_FROM_ALL option
18ce97c4 install: Add EXCLUDE_FROM_ALL option (#14921)
2016-02-09 10:10:15 -05:00
Brad King e509c0e6d4 Merge topic 'fix-install-EXPORT-crash'
a1ad098d Tests: Avoid OS X 10.5 limitation warning in RunCMake.install test
47460f3e install(EXPORT): Fix crash on target in another directory
e86383e1 Tests: Use newer policy settings in RunCMake.install test
2016-02-09 10:10:09 -05:00
Kitware Robot 41c38ee7cd CMake Nightly Date Stamp 2016-02-09 00:01:05 -05:00
Brad King 9b7d5871b8 Improve internal generator target structure lookup
In commit v3.5.0-rc1~272^2~6 (cmGlobalGenerator: Add FindGeneratorTarget
API, 2015-10-25) a lookup was implemented via linear search.  Replace it
with an efficient data structure.

Suggested-by: Stephen Kelly <steveire@gmail.com>
2016-02-08 13:08:11 -05:00
Brad King 6cbf6a5197 Fix internal target lookup performance regression
Refactoring in commit v3.5.0-rc1~272^2~13 (cmGlobalGenerator: Remove
direct storage of targets, 2015-10-25) replaced an efficient data
structure mapping from target name to cmTarget instance with a linear
search.  Lookups through cmGlobalGenerator::FindTarget are done a lot.
Restore the efficient mapping structure with a name indicating its
purpose.

Reported-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2016-02-08 13:08:11 -05:00
Brad King a7e2021fea Merge topic 'fix-Fortran-module-in-subdir'
c5eb21b6 Fix dependency scanning configuration in subdirectories
2016-02-08 10:33:04 -05:00
Brad King 5643088bb1 Merge topic 'fix-pedantic-warnings'
58a4a771 Make cmLinkInterface:: and cmGeneratorTarget::Multiplicity unsigned ints
2016-02-08 10:32:57 -05:00
Brad King 08e5362004 Merge topic 'error-multiple-targets'
497cad7c cmake: Teach --build to reject multiple --target options
886acd80 Help: Fix reference to `cmake --build` in cmake(1) manual
2016-02-08 10:32:55 -05:00
Kitware Robot ccb2a26095 CMake Nightly Date Stamp 2016-02-08 00:01:05 -05:00
Kitware Robot c8100794b4 CMake Nightly Date Stamp 2016-02-07 00:01:03 -05:00
Kitware Robot d276b6e997 CMake Nightly Date Stamp 2016-02-06 00:01:04 -05:00
Sebastian Schuberth 497cad7c88 cmake: Teach --build to reject multiple --target options
Previously we did not clearly document that `--target` is only supported
to be specified once.  Even worse, specifying it multiple times would
silently ignore any previously specified targets and only build the last
target.

Update the documentation to specify this.  Update the implementation to
reject multiple `--target` options to prevent user errors.
2016-02-05 11:48:16 -05:00
Brad King 47460f3e15 install(EXPORT): Fix crash on target in another directory
Refactoring merged by commit v3.5.0-rc1~299 (Merge topic
'use-generator-target', 2015-10-20) in and around
commit v3.5.0-rc1~299^2~13 (cmExportSet: Store a cmGeneratorTarget,
2015-10-17) changed export sets to delay looking up actual targets and
stores only their names.  However, in InstallCommand::HandleExportMode
we need to lookup targets immediately to check them for
EXPORT_LINK_INTERFACE_LIBRARIES.  The check was accidentally made local
to the current directory, so if an export set contains a target from
another directory the lookup fails and CMake crashes.  Fix the check to
look up the target name globally, and tolerate when no target is found
just in case.

Reported-by: Kelly Thompson <kgt@lanl.gov>
2016-02-05 09:45:16 -05:00
Brad King c5eb21b6d1 Fix dependency scanning configuration in subdirectories
Refactoring in commit v3.5.0-rc1~347^2~2 (Set the current dirs on the
snapshot before creating the cmMakefile) accidentally changed the
source and binary directories configured in `cmake -E cmake_depends`
for use during dependency scanning.  This can cause the wrong directory
information to be loaded.  It also breaks Fortran module dependency
scanning for modules provided by targets in subdirectories that do
not have Fortran_MODULE_DIRECTORY set.

Fix the dependency scanning directory configuration and add a test to
cover the Fortran module case in which the breakage was observed.

Reported-by: Kelly Thompson <kgt@lanl.gov>
2016-02-05 09:26:44 -05:00
Kitware Robot 5ee00b71e9 CMake Nightly Date Stamp 2016-02-05 00:01:04 -05:00
Christoph Grüninger 58a4a77132 Make cmLinkInterface:: and cmGeneratorTarget::Multiplicity unsigned ints 2016-02-04 10:57:02 -05:00
Brad King 7b1fbcc4b0 Merge topic 'list-FILTER-command'
0205f882 list: Add FILTER subcommand (#3986)
2016-02-04 10:53:14 -05:00
Nick Lewis 18ce97c4a2 install: Add EXCLUDE_FROM_ALL option (#14921)
Let us take an example of a project that has some tests in a component
that need to be installed into a dedicated test package.  The user
expectation is that the result could be achieved by typing the
following:

    make
    make tests
    make install
    DESTDIR=/testpkgs make install-tests

However this results in test components in the default installation as
well as the testpkg.

Add an EXCLUDE_FROM_ALL option to the install() command to tell it that
the installation rule should not be included unless its component is
explicitly specified for installation.
2016-02-04 09:16:56 -05:00
Kitware Robot bfd1b3aaba CMake Nightly Date Stamp 2016-02-04 00:01:04 -05:00
Ashley Whetter 0205f882ae list: Add FILTER subcommand (#3986)
Create a `list(FILTER)` command to filter lists by regular expression.
2016-02-03 11:13:17 -05:00
Kitware Robot a58abc69c2 CMake Nightly Date Stamp 2016-02-03 00:01:03 -05:00
Brad King c84dfa7457 Begin post-3.5 development 2016-02-02 08:40:37 -05:00
Brad King 8a8d22cf1e CMake 3.5.0-rc1 version update 2016-02-02 08:37:05 -05:00
Brad King 570e84b44b Merge topic 'remove-stray-semicolon'
ccb2d5c0 cmAlgorithms.h: remove superfluous semicolon after method
2016-02-02 08:33:23 -05:00
Brad King f8e5e5bb03 Merge topic 'fix-CMAKE_MATCH-self-match'
6ffc4323 cmConditionEvaluator: Fix matching of `CMAKE_MATCH_*` values (#15944)
2016-02-02 08:33:20 -05:00
Kitware Robot 6a230df636 CMake Nightly Date Stamp 2016-02-02 00:01:05 -05:00
Christoph Grüninger ccb2d5c07f cmAlgorithms.h: remove superfluous semicolon after method 2016-02-01 10:47:25 -05:00
Brad King c022b6f686 Merge topic 'clarify-add_custom_command-TARGET-scope'
d257d681 add_custom_command: Clarify error when TARGET is out of scope (#15681)
4d53e0a7 Help: Clarify `add_custom_command(TARGET)` scope (#15681)
8c615af4 Help: Clarify policy `CMP0040` documentation (#15681)
63c5808f Help: Clarify scope of `if(TARGET)` expression
a336e438 Help: Improve markup in `if` command documentation
88968265 Help: Improve markup in `get_target_property` documentation
2016-02-01 10:43:51 -05:00
Brad King 6ffc432367 cmConditionEvaluator: Fix matching of `CMAKE_MATCH_*` values (#15944)
While evaluating `if(MATCHES)` we get a `const char*` pointer to the
string to be matched.  On code like

    if(CMAKE_MATCH_COUNT MATCHES "Y")

the string to be matched may be owned by our own result variables.
We must move the value to our own buffer before clearing them.
Otherwise we risk reading freed storage.
2016-02-01 10:05:10 -05:00
Kitware Robot e18d0df5ed CMake Nightly Date Stamp 2016-02-01 00:01:03 -05:00