Commit Graph

3668 Commits

Author SHA1 Message Date
Brad King 594dd9b36a Merge topic 'use-std-unordered_map'
d7923b82 Use std::unordered_map instead of hash_map where available.
820777af Tests: Don't rely on ordering of targets in maps.
921d74d8 AutoGen: Don't iterate over a container while populating it.
2015-05-19 11:30:21 -04:00
Brad King 0cbc69b9ea Merge topic 'minor-cleanups'
61d52e6e cmListFileBacktrace: Hide the context-stack implementation detail.
a271f7f1 cmTarget: Simplify CMP0023 message loop.
f4300cd4 cmTarget: Simplify output computation.
65a42849 cmTarget: Store context in stack only if different.
9645cba3 cmListFileContext: Implement EqualityComparable.
52a8d19c cmTarget: Store only cmListFileContext for CMP0023 handling.
59ba1215 cmTarget: Remove needless iteration.
18f810a8 cmListFileContext: Sort by line before file.
e96b5d14 cmListFileContext: Implement LessThanComparable.
7eb0dfa0 cmMakefile: Use std::set::insert API to simplify CMP0054 handling.
f9785e0c cmMakefile: Simplify CMP0054 handling.
e17b5e42 cmMakefile: Add access to the top-level execution context.
1ec1bf9f if(): Test the effect of cmMakefileCall use in elseif() handling.
9b4aefad cmMakefile: Replace deques with vectors.
2015-05-19 11:09:36 -04:00
Brad King aa68f2e4c9 Merge topic 'fix-function-missing-endforeach'
3a656065 Fix assertion failure on unmatched foreach in function (#15572)
2015-05-19 11:09:21 -04:00
Stephen Kelly 1ec1bf9f07 if(): Test the effect of cmMakefileCall use in elseif() handling. 2015-05-18 21:28:09 +02:00
Brad King 3a65606591 Fix assertion failure on unmatched foreach in function (#15572)
The lexical scope counting added by commit v3.2.0-rc1~332^2~1 (Track
nested loop levels in CMake language with a stack of counters,
2014-11-18) forgot to account for scopes popped by error messages about
unclosed scopes.  Teach the error handler to pop the lexical scope it
reports as unclosed.  Re-order the lexical scope RAII object to be
inside the variable scope RAII object scope so that the lexical scope
is fully closed before we check assertions about variable scopes.

Extend the RunCMake.Syntax test with a case covering this.
2015-05-18 11:13:05 -04:00
Stephen Kelly 820777af03 Tests: Don't rely on ordering of targets in maps. 2015-05-17 11:19:20 +02:00
Brad King 2e4ea0c055 Merge topic 'refactor-cmLocalGenerator'
ce167b54 cmMakefile: Handle CMP0014 before configuring the generator.
7baef756 cmLocalGenerator: Assert that there is a parent.
63255342 cmMakefile: Remove redundant variable set.
894961af cmMakefile: Use the state to determine the parent directory.
115e9199 Use new top-level check abstraction.
c5059c90 cmLocalGenerator: Add abstraction to check if top-level.
b17686d2 cmGlobalGenerator: Move some flags from cmLocalGenerator.
ed41a8e7 cmLocalGenerator: Port loops to cmState::Snapshot.
48a9e91b cmState: Add an accessor for Parent snapshot and a validity check.
e7f7c2e2 cmLocalGenerator: Convert two recursive methods to loops.
c5cb3a73 cmLocalGenerator: Get project directories from the cmState.
76b59831 cmLocalGenerator: Initialize state before creating cmMakefile.
34c9ee2e cmLocalGenerator: Require a global generator in the constructor.
3837c483 Tests: Add case for 'ctest' run with bad CTestTestfile
b317b38d cmGlobalBorlandMakefileGenerator: Do not inherit from NMake generator
94867698 Don't use a cmLocalGenerator instance to call static methods.
...
2015-05-15 11:22:36 -04:00
Brad King 912dff6253 Merge topic 'disallow-install-of-export'
b85d3b66 install: Disallow installing export() result.
501c237a install: Use an intermediate filesVector variable.
2015-05-15 11:22:29 -04:00
Brad King e0a2be659f Merge topic 'fix-tests-in-usr-local'
d430cb7c Tests: Fix failures when running under the default install prefix (#15566)
332ee3e3 Tests: Fix CheckSourceTree test when build is under source (#15566)
2015-05-15 11:22:27 -04:00
Stephen Kelly b85d3b66c6 install: Disallow installing export() result. 2015-05-14 21:38:29 +02:00
Brad King 3837c48334 Tests: Add case for 'ctest' run with bad CTestTestfile 2015-05-14 20:36:27 +02:00
Brad King d430cb7c36 Tests: Fix failures when running under the default install prefix (#15566)
Fix test cases whose behavior differs when their source or build tree is
under CMAKE_INSTALL_PREFIX by setting an install prefix under the build
tree.  Otherwise they may fail when run under the default install prefix
(e.g. /usr/local).
2015-05-14 10:07:37 -04:00
Brad King 332ee3e305 Tests: Fix CheckSourceTree test when build is under source (#15566)
Since the build tree will populate content under the source tree
the test cannot reliably check that the source tree is pristine.
Simply skip most of the test in this case.
2015-05-14 09:50:34 -04:00
Axel Huebl 5685817874 FindHDF5: Add version support
Detect the HDF5 version and set HDF5_VERSION just as we
detect HDF5_IS_PARALLEL from the header already.
2015-05-13 10:00:55 -04:00
Brad King 53bb51fc31 Merge topic 'ctest-no-make-i'
226df303 CTest: Stop telling 'make' to ignore errors with -i
28e7a135 Help: Fix build_command alternative signature docs
231601b6 build_command: Choose configuration consistently across signatures
2015-05-12 09:12:56 -04:00
Brad King 70d48e1287 Merge topic 'cpack-deb-component-dependencies'
1237d5fa Help: Add notes for topic 'cpack-deb-component-dependencies'
e3f522f6 CPack/DEB per component dependencies
2015-05-12 09:12:54 -04:00
Brad King a5bab6e1a4 Merge topic 'cpack-not-running-tests'
7c103be8 CPack: Enable DEB and RPM tests more reliably
2015-05-12 09:12:52 -04:00
Brad King 55fe56444f Merge topic 'ExternalProject-improve-missing-source-error'
dcb18836 ExternalProject: Improve error when SOURCE_DIR is missing (#15560)
2015-05-12 09:12:43 -04:00
Brad King 226df303f9 CTest: Stop telling 'make' to ignore errors with -i
Add policy CMP0061 to maintain compatibility for existing projects.
2015-05-12 09:06:49 -04:00
Domen Vrankar 7c103be8de CPack: Enable DEB and RPM tests more reliably
CPack DEB and RPM generators were not used for some tests because
CPACK_BINARY_DEB and CPACK_BINARY_RPM variable were not set.  Fix this,
simplify generator selection in CTEST_RUN_CPackComponentsForAll, and fix
bugs that were detected after tests were run.
2015-05-12 08:56:34 -04:00
Raffi Enficiaud e3f522f6e4 CPack/DEB per component dependencies
Dependencies may now be set per component
2015-05-08 23:36:26 +02:00
Brad King dcb188363d ExternalProject: Improve error when SOURCE_DIR is missing (#15560)
Mention the SOURCE_DIR that we checked and found empty or missing
so that the user can see the full path to what we expected to find.
2015-05-08 09:20:43 -04:00
Brad King f65bb82f36 execute_process: Improve stdout/stderr merging
Use the KWSys Process "MergeOutput" option to give the child process
the same pipe (or file) for both stdout and stderr.  This allows
natural merging of stdout and stderr together instead of merging
on arbitrary buffered read boundaries as before.
2015-05-07 14:40:38 -04:00
Brad King 18527c4991 Merge topic 'vs-install-in-default-build'
a6e4e73d VS: Add option to put INSTALL target in .sln default build
562e69dd Tests: Enable devenv tests on VS >= 10
2015-05-07 14:25:37 -04:00
Raffi Enficiaud 4588a1697f CPack/DEB component dependency auto-discovery
Dependency auto-discovery can now be set per component
2015-05-07 14:21:57 -04:00
Robert Goulet a6e4e73da3 VS: Add option to put INSTALL target in .sln default build
Add a CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD variable to control
this behavior.
2015-05-06 10:31:39 -04:00
Brad King 562e69dd50 Tests: Enable devenv tests on VS >= 10
The VSExcludeFromDefaultBuild have not been enabled on VS >= 10 since
commit v3.0.0-rc1~260^2~9 (Tests: Simplify VSExcludeFromDefaultBuild
configuration, 2013-11-14).  Since commit v3.0.0-rc1~260^2~2 (VS: Add
CMAKE_VS_(DEVENV|MSBUILD|MSDEV)_COMMAND variables, 2013-12-04) we can
simply check the CMAKE_VS_DEVENV_COMMAND variable for a devenv tool
to use for the test.
2015-05-04 16:07:23 -04:00
Brad King 88c5ec72b0 Merge topic 'test-RunCMake-parallel-make'
703e7625 Tests: Protect RunCMake tests from MAKEFLAGS in environment (#15542)
2015-04-30 10:32:15 -04:00
Brad King 1c3158558c Merge topic 'cpack-deb-component-description'
2f0afffa CPackDEB component description
2015-04-30 10:32:06 -04:00
Nils Gladitz aed6239e40 if: Implement new IN_LIST operator 2015-04-30 10:21:19 -04:00
Nils Gladitz 32a2f41402 Revert "add_custom_command: Diagnose MAIN_DEPENDENCY limitation."
This reverts commit 242c3966 (add_custom_command: Diagnose
MAIN_DEPENDENCY limitation, 2015-03-09) and the follow up commit
b372a99a (UseSWIG: Do not use MAIN_DEPENDENCY on custom commands,
2015-03-26).

I misdiagnosed the underlying issue that prompted creation of policy CMP0057.
The actual issue surfaces when a single custom command's MAIN_DEPENDENCY
is listed in more than one target; this issue will have to be addressed
independently.
2015-04-30 10:20:20 -04:00
Brad King 703e762529 Tests: Protect RunCMake tests from MAKEFLAGS in environment (#15542) 2015-04-29 16:14:52 -04:00
Raffi Enficiaud 2f0afffabd CPackDEB component description
Support for setting different description
for each component.
2015-04-29 18:05:36 +02:00
Brad King f0673c1022 Merge topic 'deterministic-CTest-tests'
bf24b6c5 Tests: Guard more CTest tests against parallel execution.
2015-04-28 13:55:57 -04:00
Brad King 248a58e790 Merge topic 'test-ExportImport-AIX-GCC'
4fc47424 Tests: Fix ExportImport on AIX with GCC
2015-04-28 13:55:48 -04:00
Stephen Kelly bf24b6c501 Tests: Guard more CTest tests against parallel execution. 2015-04-27 22:03:40 +02:00
Brad King 75bd5ca06a Tests: Fix RunCMake.CTest to tolerate source line number changes 2015-04-27 10:46:52 -04:00
Brad King 4fc4742477 Tests: Fix ExportImport on AIX with GCC
The iface_test_bld gets the excludedFromAll include directory with
"-isystem" because it is added indirectly through an imported target.
On AIX with GCC the -isystem flag causes sources to be preprocessed as:

  # 3 "/.../excludedFromAll.h" 2 3 4

The flags after the file name are documented here:

  https://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html

and the "4" flag says that following content is extern "C".  This
causes the excludedFromAll function to be declared as a C symbol
and not mangled for C++, which fails to link later because the
symbol is really provided as C++.

Work around this by setting the NO_SYSTEM_FROM_IMPORTED target property
on iface_test_bld.  Somehow iface_test_exp does not end up with -isystem
so we do not need this workaround for that target.
2015-04-23 10:53:39 -04:00
Brad King ebb54e02c4 Merge topic 'cpack-deb-linitian-md5hash'
75b0e167 CPackDeb: Add basic package tests
fdfe4586 CPackDeb: Fix lintian md5sum file warning
2015-04-23 09:04:43 -04:00
Brad King 195a724c57 Merge topic 'deterministic-CTest-tests'
b5b20d20 ctest: Treat ENV{CTEST_OUTPUT_ON_FAILURE} as a boolean
fcf9cf6c Tests: Make a CTest test deterministic.
2015-04-23 09:04:33 -04:00
Raffi Enficiaud 75b0e1679c CPackDeb: Add basic package tests
Tests of generated component based deb packages with lintian and dpkg.
Also includes basic file name check.
2015-04-23 09:03:10 -04:00
Brad King 6189cdda79 Merge topic 'ExternalProject-depend-INTERFACE'
e1c6df39 ExternalProject: Allow dependencies on INTERFACE libraries
c0502faa ExternalProject: Fix error message typo
2015-04-22 11:16:45 -04:00
Brad King 1468f31988 Merge topic 'ExternalProject-genex'
b470d618 Help: Add notes for topic 'ExternalProject-genex'
0273ef14 ExternalProject: Allow generator expressions with LOG_* options (#15287)
7bd8cfb8 ExternalProject: Allow generator expressions in initial cache options
1cf43dcf Tests: Add case to cover ExternalProject with subdirectories
2015-04-22 11:16:43 -04:00
Brad King 8f95392879 Merge topic 'fix-CTestTestSerialOrder-parallel-env'
2f4b13b3 Tests: Protect CTestTestSerialOrder from environment (#15524)
2015-04-22 11:16:40 -04:00
Brad King e1c6df392b ExternalProject: Allow dependencies on INTERFACE libraries
Respect INTERFACE library property whitelist.  Check that a target has
type "UTILITY" before querying other properties.
2015-04-22 08:48:52 -04:00
Brad King 2f4b13b32d Tests: Protect CTestTestSerialOrder from environment (#15524)
Reported-by: Stephen Kelly <steveire@gmail.com>
2015-04-21 11:47:42 -04:00
Andrey Pokrovskiy 0273ef1469 ExternalProject: Allow generator expressions with LOG_* options (#15287)
Use file(GENERATE) to write the logging wrapper scripts to evaluate
generator expressions.  Use a per-config script names in case the
content varies by configuration.
2015-04-21 10:51:08 -04:00
Andrey Pokrovskiy 7bd8cfb813 ExternalProject: Allow generator expressions in initial cache options
Use file(GENERATE) to write the initial cache file so that we can
evaluate generator expressions.  Use a per-config initial cache file
name in case the content varies by configuration.
2015-04-21 10:50:29 -04:00
Brad King 1cf43dcf7c Tests: Add case to cover ExternalProject with subdirectories
Add an ExternalProjectSubdir test directory with a minimal test showing
use of ExternalProject_Add for a source tree in a subdirectory.  This
will allow us to easily add test external projects that cover specific
behavior where the client project must check results.
2015-04-21 10:40:52 -04:00
Brad King 258ba82882 QtAutogen: Process 'rcc --list' stdout and stderr separately (#15523)
The stderr may have warning messages.  We should not treat these lines
as resource files.  However, we must still recognize error message lines
for missing resource files that may be generated.

Extend the QtAutogen test to cover a generated resource as the only one
listed in a .qrc file.  This causes 'rcc --list' to print a warning to
stderr that we now intend to ignore.
2015-04-21 09:33:19 -04:00