Commit Graph

3799 Commits

Author SHA1 Message Date
Brad King a07d16085b Merge topic 'OUTPUT_DIRECTORY-genex'
d25819bc Add generator expression support to OUTPUT_DIRECTORY target properties
e36a05fd cmTarget: Detect and diagnose recursion in GetOutputInfo
2015-08-13 10:38:54 -04:00
Chuck Atkins 675ef165f2 Allow LINK_SEARCH_{START,END}_STATIC props to have default values.
Use the CMAKE_LINK_SEARCH_START_STATIC and CMAKE_LINK_SEARCH_END_STATIC
variables to initialize the LINK_SEARCH_START_STATIC and
LINK_SEARCH_END_STATIC target properties respectively.
2015-08-13 10:34:44 -04:00
Robert Goulet d25819bc26 Add generator expression support to OUTPUT_DIRECTORY target properties
If {ARCHIVE,LIBRARY,RUNTIME}_OUTPUT_DIRECTORY is set with a genex then
do not add the per-config subdirectory on multi-config generators.
This will allow projects to use $<CONFIG> to place the per-config
part of the directory path somewhere other than the end.
2015-08-12 13:43:00 -04:00
Brad King ce254de60e Merge topic 'tests-use-CMAKE_MAKE_PROGRAM'
c180f0cb Tests: Fix CMAKE_MAKE_PROGRAM selection in FortranC.Flags test
586b2e5e Tests: Fix CMAKE_MAKE_PROGRAM selection in CMakeOnly tests
2015-08-12 09:30:36 -04:00
Brad King c180f0cbc2 Tests: Fix CMAKE_MAKE_PROGRAM selection in FortranC.Flags test
Use the explicitly-tested make program, if any.
2015-08-11 10:18:05 -04:00
Brad King 586b2e5e36 Tests: Fix CMAKE_MAKE_PROGRAM selection in CMakeOnly tests
Use the explicitly-tested make program, if any.
2015-08-11 10:18:04 -04:00
Gregor Jasny 5790aca4ad target_include_directories: Support relative SYSTEM include dirs (#15464) 2015-08-11 08:53:00 -04:00
Brad King 16b889da9a Merge topic 'fix-get-filename-component'
d035e968 get_filename_component: Fix bug where CACHE was ignored.
38ed5866 get_filename_component: Added initial tests for PROGRAM component.
772ca69f get_filename_component: Tests now check for proper CACHE usage.
2015-08-10 09:13:20 -04:00
Brad King 3d0a719b70 Merge topic 'change-nmake-env-warning'
afeb4eb2 nmake/jom: Only warn about bad VS environment if compiler not found.
2015-08-10 09:13:18 -04:00
James Johnston d035e9687a get_filename_component: Fix bug where CACHE was ignored.
If PROGRAM_ARGS is provided to get_filename_component, fix bug where the
command failed to honor the CACHE argument.

Added test cases to RunCMake.get_filename_component that fail when the
bug is not fixed to prevent regressions.

Signed-off-by: James Johnston <johnstonj.public@codenest.com>
2015-08-06 17:53:34 +00:00
James Johnston 38ed5866ed get_filename_component: Added initial tests for PROGRAM component.
The RunCMake.get_filename_component test now tests basic functionality
of the PROGRAM component argument of get_filename_component.

Signed-off-by: James Johnston <johnstonj.public@codenest.com>
2015-08-06 17:53:25 +00:00
James Johnston 772ca69f80 get_filename_component: Tests now check for proper CACHE usage.
The RunCMake.get_filename_component test was improved to assert that
each test variable outputted by get_filename_component is or is not
a cache variable, as per the particular test.

Signed-off-by: James Johnston <johnstonj.public@codenest.com>
2015-08-06 17:53:12 +00:00
James Johnston afeb4eb243 nmake/jom: Only warn about bad VS environment if compiler not found.
nmake and jom generators no longer warn about missing INCLUDE/LIB
environment variables unless the C/CXX compiler cannot be found.  This
is useful if the user does not want to use these generators with the
Visual C++ compiler, or they do not want to enable any language.
2015-08-06 17:32:43 +00:00
Brad King 35aab9df9f Reject TARGET_PDB_FILE for imported targets instead of crashing
Reported-by: Justin Borodinsky <justin.borodinsky@gmail.com>
2015-08-06 09:42:31 -04:00
Brad King 22590805bf Merge topic 'cpack-rpm-documentation-fixes'
94226751 Tests/RunCMake/CPack: Add dependencies tests
105011e0 Tests/RunCMake/CPack: Bump verify result cmake version
d882d477 Tests/RunCMake/CPack/DEB: Add getPackageInfo helper function
145735b7 Tests/RunCMake/CPack: Enable CXX language in tests
e26f53a8 CPack/RPM: missing PACKAGE_CONFLICTS documentation
64aacb24 CPack/RPM: undocumented variables
2015-08-06 09:38:33 -04:00
Brad King 91c1b13d6e Merge topic 'ninja-LINK_DEPENDS'
43c94281 Ninja: Honor the LINK_DEPENDS target property (#14796)
2015-08-06 09:38:31 -04:00
Brad King 73e3de381d Merge topic 'cmState-policies'
757a1f54 cmState: Move PolicyState from cmMakefile.
52dbe654 cmState: Record the end position of each directory.
65a5e0c6 cmLinkedTree: Add Clear API.
34835433 cmState: Add Type for policy scope.
af0de01c cmState: Remove call stack parent tracking.
6ae8b30b cmMakefile: Move policy barriers inside cmState scopes.
a5fc17b5 cmMakefile: Re-order policy entries and barriers.
0a01e6c6 cmState: Add Snapshot Type accessor.
f0005bb4 Tests: Verify generate-time policy scope behavior.
2015-08-06 09:38:24 -04:00
Brad King d356bced9b Merge topic 'fix-missing-subdir-error'
c4d2f64f add_subdirectory: Fix error message on missing CMakeLists.txt (#15680)
2015-08-06 09:38:17 -04:00
Domen Vrankar 94226751cb Tests/RunCMake/CPack: Add dependencies tests
Add tests for RPM and DEB package test for currently supported
dependency features (requires, provides, conflicts, ...).
2015-08-06 09:33:51 -04:00
Domen Vrankar 105011e08f Tests/RunCMake/CPack: Bump verify result cmake version
Bumped version to current cmake version so that we always use latest
policies.
2015-08-06 09:33:50 -04:00
Domen Vrankar d882d4770f Tests/RunCMake/CPack/DEB: Add getPackageInfo helper function
getPackageInfo helper function returns package info
for provided deb package file
2015-08-06 09:33:50 -04:00
Domen Vrankar 145735b748 Tests/RunCMake/CPack: Enable CXX language in tests
Enable CXX language for CPack tests so that they may compile binaries if
needed.
2015-08-06 09:33:22 -04:00
Brad King 43c9428140 Ninja: Honor the LINK_DEPENDS target property (#14796) 2015-08-05 14:12:05 -04:00
Brad King c4d2f64f3c add_subdirectory: Fix error message on missing CMakeLists.txt (#15680)
Refactoring in commit v3.3.0-rc1~76^2 (cmMakefile: Handle CMP0014 before
configuring the generator, 2015-05-14) accidentally left the file name
"/CMakeLists.txt" in the error message.  Remove it and add a test case.
2015-08-04 16:40:13 -04:00
Marc Chevrier 3d287de4ea UseJava: Teach add_jar to support file syntax for sources 2015-08-04 11:19:43 -04:00
Brad King 7ac2b1256b Merge topic 'if-test'
14e49ed1 if: Add "TEST <test>" condition
623dcc85 ExternalProject: Avoid if() auto-dereference of a "TEST" variable
2015-08-03 09:25:10 -04:00
Matt McCormick 14e49ed156 if: Add "TEST <test>" condition
if(TEST TestNameThatExists) will return true if a test with the name
TestNameThatExists has been added with add_test.  The syntax is similar
to if(TARGET TargetName).  Since use of "TEST" as an argument to if()
could previously be interpreted as a non-keyword argument, add policy
CMP0064 to treat it as a keyword as NEW behavior.
2015-08-03 09:22:25 -04:00
Brad King 5c02ae4ac9 Merge topic 'update-kwsys'
da98b896 Tests: In CTestTest2 skip the kwsys.testProcess-10 test that leaks
129640f2 CTestCustom: Ignore kwsys.testProcess-10 for MemCheck as KWSys does
d0915bc8 Merge branch 'upstream-kwsys' into update-kwsys
1feafc64 KWSys 2015-07-30 (f63febb7)
2015-08-03 09:11:25 -04:00
Stephen Kelly f0005bb484 Tests: Verify generate-time policy scope behavior.
If some day there are no policies checked through the makefile at generate time,
this can be fixed.
2015-08-01 07:18:21 +02:00
Brad King da98b89612 Tests: In CTestTest2 skip the kwsys.testProcess-10 test that leaks
This test intentionally leaks memory so KWSys excludes it from MemCheck.
However, when CTestTest2 runs under our own MemCheck then valgrind may
recursively check tests run by ctest_test() calls in our test.cmake
script.  Teach these calls to exluce testProcess-10 too.  Also read
the KWSys CTestCustom.cmake file so ctest_memcheck() will ignore the
test too.
2015-07-31 09:27:08 -04:00
Michael Scott c96fe0b40d cmake: Add -W options to control deprecation warnings and errors
Refactor the -Wdev and -Wno-dev to use a generic -W parser that follows
the GCC pattern.  Include support for setting CMAKE_ERROR_DEPRECATED and
CMAKE_WARN_DEPRECATED via the deprecated warning.  Add -Werror=dev and
-Wno-error=dev options so that dev warning options are in line with
deprecated warning options.  Use a new CMAKE_SUPPRESS_DEVELOPER_ERRORS
internal cache entry to store the above new dev options persistently.
Add tests for new options and updated cmake documentation and release
notes to list new options.
2015-07-29 09:20:10 -04:00
Brad King 280dde34dd Merge topic 'trace-expand'
594bafe5 cmake: add --trace-expand option
2015-07-27 09:31:22 -04:00
Brad King d74abbea89 Merge topic 'refactor-cmMakefile-properties'
bbb507ae cmMakefile: Move the InitializeFromParent method
6ed9c7e0 cmState: Host buildsystem properties for directories.
8f0a5d84 cmState: Fix compilation on IBM XL compiler
9644a2d1 cmAlgorithms: Add cmMakeReverseIterator.
1e77de74 cmMakefile: Don't clear buildsystem properties.
c1bf1a59 CompileDefinitions: Add unit test for setting empty content.
2015-07-27 09:31:16 -04:00
Ben Boeckel 594bafe527 cmake: add --trace-expand option
The --trace option is helpful, but sometimes, what you're looking for is
deep under many layers of function calls and figuring out what instance
of the function call you're looking at is tedious to determine (usually
involving patching and message()). Instead, add a --trace-expand option
to trace while expanding commands into what CMake actually sees.
2015-07-23 15:33:10 -04:00
Stephen Kelly c1bf1a59ff CompileDefinitions: Add unit test for setting empty content. 2015-07-22 21:23:49 +02:00
Brad King 783c375766 Tests: Extend BuildDepends test to cover OBJECT_DEPENDS
The actual file timestamp dependency is known to not work on
Visual Studio or Xcode generators.  Tolerate such failure for
these generators (Tests/CustomCommand already covers using
OBJECT_DEPENDS to pull a custom command into a target, and
that still works with these generators).
2015-07-22 11:37:47 -04:00
Brad King e00e8713de Merge topic 'export-no-custom-target'
7e9f908e export: Reject custom target exports earlier (#15657)
3b09398a Tests: Teach RunCMake.export to enable languages only when needed
2015-07-22 11:04:32 -04:00
Brad King 4c3d431210 Merge topic 'target-directory-properties'
45c5f8ca Add SOURCE_DIR and BINARY_DIR target properties
2015-07-22 11:04:30 -04:00
Brad King 02e5eba17d Merge topic 'vs-compiler-feature-2015-update'
c2d590c9 Features: Update MSVC features for VS 2015 RTM
2015-07-22 08:31:40 -04:00
Brad King 7e9f908ef5 export: Reject custom target exports earlier (#15657)
Diagnose and reject custom targets given to the export() command
immediately.  Previously we would generate an internal error later.
2015-07-21 14:39:10 -04:00
Brad King 3b09398ae2 Tests: Teach RunCMake.export to enable languages only when needed 2015-07-21 14:29:10 -04:00
Clifford Yapp 45c5f8cad2 Add SOURCE_DIR and BINARY_DIR target properties
This will allow project code to recover the directory information about
where a target was created.
2015-07-21 14:19:35 -04:00
Brad King c2d590c957 Features: Update MSVC features for VS 2015 RTM
VS 2015 RTM completed support for constexpr and attribute features.
Update our feature table and test accordingly.
2015-07-21 12:56:47 -04:00
Stephen Kelly 881613c4ab cmMakefile: Remove special handling of LINK_DIRECTORIES property.
There is no need to handle it in a special way.
2015-07-18 13:56:48 +02:00
Brad King a5412fbab4 Merge topic 'ctest-change-id'
601ff0ec CTest: Optionally add a ChangeId attribute on XML Site tags
2015-07-17 10:36:17 -04:00
Brad King 536b6c7519 Merge topic 'cpack-per-component-extra-control-file'
3e6b2ab6 CPack/DEB: component version of PACKAGE_CONTROL_EXTRA
506f6bc0 CPack/DEB: Remove duplicate string(TOUPPER) calls
32e9276a Tests/RunCMake/CPack/DEB: add verifyDebControl
47d1f118 Tests/RunCMake/CPack: found files should be preserved
2015-07-17 10:36:15 -04:00
Zack Galbreath 601ff0ec55 CTest: Optionally add a ChangeId attribute on XML Site tags
Add variable CTEST_CHANGE_ID to configure the setting.  This allows
CTest clients to give CDash information about what change is being
tested so that CDash can take actions to report the results (e.g. to a
pull request page).
2015-07-17 10:26:28 -04:00
Domen Vrankar 3e6b2ab683 CPack/DEB: component version of PACKAGE_CONTROL_EXTRA
Component version of CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
variable.
2015-07-15 10:00:03 -04:00
Domen Vrankar 32e9276a08 Tests/RunCMake/CPack/DEB: add verifyDebControl
Add verifyDebControl helper function for checking
of package control files such as preinstall scripts.
2015-07-15 09:59:44 -04:00
Domen Vrankar 47d1f1189c Tests/RunCMake/CPack: found files should be preserved
Package file names that are found during validation
should be preserved in FOUND_FILE_${NO} variables
that can be later used in custom VerifyResult scripts.
2015-07-15 09:59:43 -04:00