Commit Graph

3773 Commits

Author SHA1 Message Date
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
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
Brad King 77fa27a9f5 Merge topic 'makefile-target-messages'
f0cad193 Tests: Add test for TARGET_MESSAGES global property
1d398478 Makefile: Optionally disable target completion messages in build output
d560b46f CMakeGenericSystem: Recognize Watcom WMake generator as Makefile generator
2015-07-15 09:05:51 -04:00
Brad King 5bd01a4b69 Merge topic 'vs-nsight-tegra-attributes'
8c0afaf4 VS: Add more Nsight Tegra generator Android property settings
2015-07-15 09:05:49 -04:00
Brad King 7054df7df2 Merge topic 'tests-no-match-full-path'
e5ca59b4 Tests: Move command failure cases into RunCMake infrastructure
0699e0d3 Tests: Move CTestTestConfigFileInBuildDir into RunCMake.ctest_start
2015-07-15 09:05:40 -04:00
Mikhail Filimonov 8c0afaf450 VS: Add more Nsight Tegra generator Android property settings
Extend the Nsight Tegra project generator to add bunch of properties
with the backing variables to fine-tune the generated projects.

Add target properties that map to all "Configuration" PropertyGroups for
each configuration:

* ANDROID_ARCH
* ANDROID_STL_TYPE

Add target properties that map to the AntBuild section of vcxproj files:

* ANDROID_ANT_ADDITIONAL_OPTIONS
* ANDROID_ASSETS_DIRECTORIES
* ANDROID_JAR_DEPENDENCIES
* ANDROID_JAR_DIRECTORIES
* ANDROID_JAVA_SOURCE_DIR
* ANDROID_NATIVE_LIB_DEPENDENCIES
* ANDROID_NATIVE_LIB_DIRECTORIES
* ANDROID_PROCESS_MAX
* ANDROID_PROGUARD
* ANDROID_PROGUARD_CONFIG_PATH
* ANDROID_SECURE_PROPS_PATH
* ANDROID_SKIP_ANT_STEP

Reviewed-by: Dmitry Polyanitsa <dpolyanitsa@nvidia.com>
2015-07-14 14:24:05 -04:00
Brad King f0cad1939f Tests: Add test for TARGET_MESSAGES global property 2015-07-14 13:58:53 -04:00
Brad King e5ca59b456 Tests: Move command failure cases into RunCMake infrastructure
Move failure cases from the CMake.{If,List,While,GetProperty} tests over
to the RunCMake.{if,list,while,get_property} tests to use the more
modern infrastructure.  This also avoids using REGEX_ESCAPE_STRING to
try to regex-match full paths.
2015-07-14 10:25:38 -04:00
Brad King 0699e0d3e4 Tests: Move CTestTestConfigFileInBuildDir into RunCMake.ctest_start
Subsume the CTestTestConfigFileInBuildDir test cases into the
RunCMake.ctest_start test as new cases to avoid infrastructure
duplication.  This also avoids using REGEX_ESCAPE_STRING to try to
regex-match full paths.
2015-07-14 09:32:53 -04:00
Brad King e30fe3eba2 Merge topic 'fix-command-rename'
d4f032b5 cmState: Restore renamed commands on cleanup.
2015-07-13 09:17:46 -04:00
Brad King b3a405badd Merge branch 'fix-command-rename' into release 2015-07-13 08:51:06 -04:00
Stephen Kelly d4f032b546 cmState: Restore renamed commands on cleanup.
Commit v3.3.0-rc1~196^2~7 (cmake: Simplify command clean up
loop., 2015-04-12) introduced a bug that built-in commands which
were renamed no longer had their original name restored when
cleanup is performed between configure runs.  Check for that
and restore the commands with their original name.

Extend the complex test for this. That test is run by ctest with
the --build-two-config command line option.
2015-07-12 10:09:54 +02:00
Robert Goulet 809159c9b7 Add generator expression support to OUTPUT_NAME target property 2015-07-09 11:48:10 -04:00
Brad King 3723fe94e6 Merge topic 'CheckCompilerFlag-do-not-use-FLAGS'
a639689c Check*CompilerFlag: Revert to previous method used to pass flags (#15641)
2015-07-09 09:17:19 -04:00
Brad King 6b4fccd1a6 Merge topic 'empty-LINK_LIBRARIES'
7aa9e80e set_property: Fix crash when setting LINK_LIBRARIES to nothing
2015-07-09 09:17:17 -04:00
Brad King d805767545 Merge branch 'empty-LINK_LIBRARIES' into release 2015-07-08 13:27:29 -04:00
Brad King 7aa9e80e35 set_property: Fix crash when setting LINK_LIBRARIES to nothing
We use a special dedicated structure to store the LINK_LIBRARIES target
property.  Do not try to construct a string from a NULL value.  Instead
leave the property structure empty when no value is given.

Reported-by: Ghyslain Leclerc <ghleclerc@gmail.com>
2015-07-08 13:23:16 -04:00
Brad King e7c33efa15 Merge branch 'CheckCompilerFlag-do-not-use-FLAGS' into release 2015-07-08 09:59:42 -04:00
Brad King a639689c16 Check*CompilerFlag: Revert to previous method used to pass flags (#15641)
Since commit v3.3.0-rc1~397^2 (Check*CompilerFlag: Refactor method used
to pass flags, 2015-02-24) these check modules pass the flags to the
compiler front-end during linking as well as during compilation.  This
breaks checks for flags like '-x c++' that are meant only for the
compilation step.  Revert the change and add a test covering a
compiler-only flag.
2015-07-08 09:55:16 -04:00
Brad King c66d232c9c Merge topic 'string-append'
2b18cdca string: add APPEND subcommand
2015-07-08 09:21:52 -04:00
Brad King 8c1460653e Merge topic 'add-apple-swift-language'
bf112531 Add rudimentary support for the Apple Swift language with Xcode
2015-07-08 09:19:10 -04:00
Brad King ad91d0edd5 Merge topic 'auto_export_dll_symbols'
8f86407c Windows: Optionally generate DLL module definition files automatically
069aa93b bindexplib: Add support for "/bigobj" format objects
61bbbdcf bindexplib: Fix treatment of some symbols
de70c922 bindexplib: Teach DumpFile to return errors
8ea69dfe bindexplib: Build source as part of CMakeLib
2963cb2a bindexplib: Wrap long lines
4ff09893 bindexplib: Drop code that CMake does not need
7de8276c bindexplib: Add copyright/license notice block
65086ad7 bindexplib: Import original implementation from CERN
2015-07-08 09:19:07 -04:00
Brad King 2a249d734b Merge topic 'ExternalProject-USES_TERMINAL'
e4947639 ExternalProject: Added new USES_TERMINAL options
2015-07-07 09:53:48 -04:00
Brad King b33b5cd317 Merge topic 'refactor-cmListFileBacktrace'
d2475bb5 cmListFileBacktrace: Implement in terms of cmState::Snapshot.
238aac23 cmListFile: Remove FilePath member from cmListFileContext.
329098a9 cmMakefile: Set the FilePath on the frame from the cmState.
91158a33 cmMakefile: Create intermediate variables for snapshot frames.
821f91d6 cmMakefile: Create a scoped context for parsing listfiles.
30d44efa cmMakefile: Access the execution list file from the cmState.
6361f680 cmState: Store execution context.
94704d75 cmState: Add GetCallStackParent method.
a8e54460 cmState: Store snapshots for more different types.
dbafb015 cmMakefile: Split CallStack into two pieces.
27ff19a9 cmLinkedTree: Add operator* to the iterator.
2015-07-07 09:53:46 -04:00
Brad King 43fafabd99 Merge topic 'fortran-module-preprocessor-defs'
0a203db5 Fortran: Fix passing of preprocessor definitions to dependency scanner
2015-07-07 09:53:42 -04:00
Daniel Pfeifer 2b18cdcaba string: add APPEND subcommand 2015-07-07 09:23:21 -04:00
Brad King bf11253163 Add rudimentary support for the Apple Swift language with Xcode
Allow the `Swift` language to be enabled with the Xcode generator for
Xcode >= 6.1.  Reject it on other generators and with older Xcode
versions.  Since Apple is the only vendor implementing the language
right now, the compiler id can be just `Apple`.
2015-07-06 16:15:49 -04:00
James Johnston e494763997 ExternalProject: Added new USES_TERMINAL options
Added new USES_TERMINAL option to the ExternalProject_Add_Step
function.  This option passes USES_TERMINAL to the underlying
add_custom_command call so that the Ninja console pool is used.
Also, corresponding new USES_TERMINAL_<step> options were added
to the ExternalProject_Add function.

Justification: if using Ninja with a CMake superbuild, it's often
desirable to limit the superbuild to ONE sub-Ninja process at a
time to avoid oversubscribing the CPU.  Using the console pool also
makes it easy to monitor the progress of the sub-Ninja process.

Independent USES_TERMINAL_<step> arguments are passed to
ExternalProject_Add instead of one USES_TERMINAL argument that
controls everything.  Users may wish to run some steps in parallel
but not others (e.g. parallelize configure but not build).
2015-07-06 14:51:40 -04:00