Commit Graph

4007 Commits

Author SHA1 Message Date
Matthias Maennich ab8a280857 cmake_parse_arguments: consider duplicate keyword as warning
The behaviour of double specified keywords is rather undefined or at
least not clearly documented. This change introduces a strict check and
emits a warning in case a keyword has been specified more than once.
2015-12-17 10:45:19 -05:00
Matthias Maennich e8b148318f CMakeParseArguments: replace by native cmake_parse_arguments command
Implement a native `cmake_parse_arguments` command that is fully
compatible with the documented behaviour of the previous implementation.
Leave the CMakeParseArguments module empty but existing for
compatibility.
2015-12-17 10:44:28 -05:00
Matthias Maennich cbbdfc2b61 CMakeParseArguments: add a RunCMake test suite 2015-12-17 10:31:04 -05:00
Brad King c952f2b424 Merge topic 'FindGTest-imported-targets'
f0b5ce7f Help: Add notes for topic 'FindGTest-imported-targets'
99afe235 Tests: Add tests for FindGTest
611735e7 FindGTest: Add imported targets and update documentation
2015-12-14 10:00:02 -05:00
Brad King a680211ca7 Merge topic 'ios-universal'
565d080a Xcode: Add support for combined install on iOS
34f5ef56 iOS: Fix App Bundle layout
2015-12-11 09:47:18 -05:00
Brad King 53930877b3 Merge topic 'simplify-CTest.UpdateGIT-test'
972849fb Tests: Simplify CTest.UpdateGIT repo path construction
2015-12-11 09:43:58 -05:00
Roger Leigh 99afe23513 Tests: Add tests for FindGTest 2015-12-10 23:09:16 +00:00
Ruslan Baratov 565d080a9a Xcode: Add support for combined install on iOS
This patch solves the problem of installing both: Device and Simulator
libraries on iOS. Before only one of them was installed.

If the IOS_INSTALL_COMBINED property is set on a target, a
special install hook will be activated which builds the corresponding
target and combines both at the install location.

The original patch was contributed by Ruslan Baratov, and polished by
Gregor Jasny.
2015-12-10 22:36:12 +01:00
Brad King 972849fbb7 Tests: Simplify CTest.UpdateGIT repo path construction
Avoid constructing full paths to .git repositories in the test.  Use
relative paths and let Git convert them to absolute paths internally.
This is simpler and also avoids trouble with various absolute path root
component conventions on Windows (`c:/`, `/c/`, `/cygdrive/c/`).
2015-12-10 13:54:54 -05:00
Bartosz Kosiorek 7984ac5e58 cmake: Teach -E make_directory to support multiple input directories 2015-12-10 09:07:38 -05:00
Brad King dc873f6eef Merge topic 'cmake-E-copy-multiple-inputs'
bc35087d cmake: Teach -E copy_directory to support multiple input directories
98be140f cmake: Refine -E copy[_if_different] documentation
93cc80ae cmake: Refine -E copy_if_different implementation indentation
0903812b cmake: Refine -E chdir documentation
2015-12-09 08:36:56 -05:00
Domen Vrankar 27e6f74f29 CPack: Added tests for package name and group controll fields 2015-12-07 20:15:49 +01:00
Bartosz Kosiorek bc35087da3 cmake: Teach -E copy_directory to support multiple input directories 2015-12-07 10:51:27 -05:00
Brad King 128d569af0 Merge topic 'FindTIFF-imported-targets'
ebaca629 FindTIFF: Add imported targets and update documentation
2015-12-07 09:22:56 -05:00
Roger Leigh ebaca6290d FindTIFF: Add imported targets and update documentation
- Add TIFF::TIFF imported target
- Document imported target
- Add testcase to test the standard variables and the imported
  target

Also:

- Add TIFF_INCLUDE_DIRS to match common practice
- Update documentation generally, including documenting
  TIFF_INCLUDE_DIRS
2015-12-07 09:20:08 -05:00
Bartosz Kosiorek 384ae5514e cmake: Teach -E copy[_if_different] to support multiple files (#15703)
If multiple input files are provided then the destination must be a
directory.  If only one input file is provided then destination may be
either a file or directory.
2015-12-04 10:26:34 -05:00
Bartosz Kosiorek 0be5020bf8 cmake: Improve '-E' help message formatting 2015-12-04 10:12:02 -05:00
Brad King 5875801293 Merge topic 'improve-embarcadero'
7a327727 Embarcadero: Fix erroneous interpretation of __CODEGEARC_VERSION__.
25211d75 Compiler ID: Compiler versions must be a valid, numeric version string.
060442c2 Embarcadero:  Check code using CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID.
f3b3219c Embarcadero/Watcom: Properly skip VSResource test for other generators.
ddbda722 Embarcadero: Fix bug where duplicate Ninja job pools would be created.
2015-12-04 09:54:18 -05:00
Brad King 65dc4170f8 Merge topic 'FindBoost-imported-targets'
d60cef77 Help: Add notes for topic 'FindBoost-imported-targets.rst'
9fd98750 Tests: Add FindBoost testcase for imported targets
3f9b081f FindBoost: Add imported targets
01c80acd FindBoost: Automatically add missing component dependencies
5183c6e5 FindBoost: Embed component dependency table
8a60e696 Utilities: Add BoostScanDeps script
2015-12-04 09:54:13 -05:00
James Johnston 25211d756f Compiler ID: Compiler versions must be a valid, numeric version string.
This test helps catch errors in compiler identification.
2015-12-03 21:37:07 +00:00
James Johnston 060442c2e8 Embarcadero: Check code using CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID.
The CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID variables are set to
"Borland" for older versions of the compiler.  Newer CodeGear/Embarcadero
compilers will have those variables set to "Embarcadero".  Search for lines of
code referencing both the variable name and Borland to be sure that they also
refer to Embarcadero.
2015-12-03 21:37:06 +00:00
James Johnston f3b3219c96 Embarcadero/Watcom: Properly skip VSResource test for other generators.
This test should be skipped based on the chosen compiler, not the chosen
generator.
2015-12-03 21:37:06 +00:00
Bartosz Kosiorek e76ee2c006 iOS: Fix framework resource directory layout (#15848)
A typical iOS application bundle (also Framework Bundle) contains the
application executable and any resources used by the application (for
instance, the application icon, other images, and localized content) in
the top-level bundle directory.  The same rule applies to Framework
Bundles.
2015-12-03 08:52:09 -05:00
Roger Leigh 9fd9875076 Tests: Add FindBoost testcase for imported targets
Enable by setting CMake_TEST_FindBoost to TRUE.
2015-12-02 09:40:17 -05:00
Michael Scott aac633d5e5 Explicitly enable deprecated warnings by default.
Explicitly enable deprecated warnings by default, via the
cmake::GetSuppressDeprecatedWarnings method, which signals
suppression is turned off unless the CMake variables are set
as required.

Add tests and update the documentation for the new
functionality.
2015-12-01 10:22:51 -05:00
Michael Scott e8974b62d7 Modify dev warning options to affect deprecated warnings.
Change the '-Wdev' and '-Wno-dev' options to also enable and
suppress the deprecated warnings output, via the
'CMAKE_WARN_DEPRECATED' CMake variable, by default. This
action does not happen if the user specifies a deprecated
warning message option.

Add tests and update the documentation for the new
functionality.
2015-12-01 10:22:45 -05:00
Michael Scott da688bcb3b Add -W options to control deprecated warning messages.
Add 'deprecated' warning options type, to allow setting
CMAKE_WARN_DEPRECATED via the -W '-Wdeprecated' and
'-Wno-deprecated' options.

Add tests for new options and updated documentation.
2015-12-01 10:21:57 -05:00
Michael Scott 07388f83b6 Refactor the -W options parser to be generic.
Refactor the -Wdev and -Wno-dev options parser to use a generic -W
parser that follows the GCC pattern, excluding support for
-Werror=TYPE and -Wno-error=TYPE formats for now.
2015-12-01 09:40:43 -05:00
Michael Scott 246b0bfbfd Explicitly enable author (dev) warnings by default.
Explicitly enable author warnings by default, via the
cmake::GetSuppressDevWarnings method, which signals suppression
is turned off unless the CMake variables are set as required.

Add test cases for author and deprecated messages displayed by
default.
2015-12-01 09:35:53 -05:00
Michael Scott deec3a3f06 Make message suppression more consistent.
Make the message suppression more consistent, by adding a check
for the message related CMake variables in cmake::IssueMessage,
which allows callers of IssueMessage other than the message
command to behave as expected. Also added a check for
CMAKE_SUPPRESS_DEVELOPER_WARNINGS in the message command to
mirror the deprecated message type behaviour.

Added a 'force' flag to the cmake::IssueMessage method, to
make the message suppression consistent, when setting the
message related CMake variables directly in a CMake file.

Expand message command tests to cover the AUTHOR_WARNING message
type as well.
2015-11-30 15:00:08 -05:00
Michael Scott aa427a4239 Tests: Revise message in RunCMake.CommandLine -Wdev case
Use more prose-like capitalization.
2015-11-30 15:00:08 -05:00
Brad King 99533c8e34 Merge topic 'fix-find_package-version-file-error-stack'
62126b67 Merge branch 'test-cmake_policy-unmatched' into fix-find_package-version-file-error-stack
2e28c619 cmState: Skip variable scope snapshots to avoid call stack duplicates
b219ff94 Tests: Add case for package version file unmatched policy scope
2015-11-25 09:21:49 -05:00
Brad King 2b24fbf48c Merge topic 'test-cmake_policy-unmatched'
378185fb Tests: Add case for unmatched cmake_policy({PUSH,POP})
2015-11-25 09:21:45 -05:00
Brad King 62126b67e0 Merge branch 'test-cmake_policy-unmatched' into fix-find_package-version-file-error-stack 2015-11-24 14:09:54 -05:00
Brad King b219ff94ac Tests: Add case for package version file unmatched policy scope 2015-11-24 14:01:21 -05:00
Brad King 378185fb7f Tests: Add case for unmatched cmake_policy({PUSH,POP}) 2015-11-24 09:30:16 -05:00
Brad King f66f6e2490 Merge topic 'FindXercesC-imported-targets'
5dcc833b FindXercesC: Add imported targets and unit test
2015-11-24 09:26:42 -05:00
Brad King db7457452c Merge topic 'test-add_subdirectory-in-function'
010c5959 Tests: Add case for add_subdirectory inside a function
2015-11-24 09:26:37 -05:00
Roger Leigh 5dcc833b28 FindXercesC: Add imported targets and unit test 2015-11-23 14:28:05 -05:00
Brad King ed08d1d489 Merge topic 'expand_cobertura_search'
32268810 CTest: Expand directories for Cobertura search
2015-11-23 13:47:25 -05:00
Joseph Snyder 32268810d9 CTest: Expand directories for Cobertura search
Change the Cobertura handler to look for an environment variable
called "COBERTURADIR" which contains the directory where the
coverage.xml file is found.  If that variable doesn't exist,
continue to use the default of the binary directory.

Update the test to use an appropriate value in the environment
variables.
2015-11-23 12:41:36 -05:00
Brad King 010c595986 Tests: Add case for add_subdirectory inside a function 2015-11-23 10:52:51 -05:00
Brad King b6f471773d Merge topic 'ninja-symbolic-custom-command'
3477b26f Ninja: Always re-run custom commands that have symbolic dependencies
7d64a059 Ninja: Add 'restat' parameter to custom command generation method
866c75de Ninja: Refactor generation of 'restat' on custom commands
2015-11-20 08:53:17 -05:00
Bill Hoffman 75004280af Fix auto export symbols for Dlls containing /bigobj for 64bit builds.
This fixes a bug where 64 bit builds with /bigobj incorrectly determined
that the object files were not 64 bit. This manifested itself with
printf type functions showing up as undefined because the leading
underscore was being removed and should not be removed.
2015-11-19 17:21:03 -05:00
Brad King 3477b26ff6 Ninja: Always re-run custom commands that have symbolic dependencies
If a custom command has a SYMBOLIC output (that is never actually
created) then do not mark the custom command build statement as
'restat'.  Otherwise other custom commands that depend on the symbolic
output may not always re-run because after running the first custom
command Ninja 'restat' will detect that the output timestamp did not
change and skip its dependents.

This was observed with the ExternalProject BUILD_ALWAYS option where
Ninja would not re-run the 'install' step each time 'build' re-runs.
2015-11-19 15:47:41 -05:00
Brad King 65b9d1f228 Merge topic 'fix-ms-manifest-no-linker'
ca263d1d MSVC: Fix linking with /MANIFEST:NO option
2015-11-19 09:10:23 -05:00
Brad King ca263d1d71 MSVC: Fix linking with /MANIFEST:NO option
Refactoring in commit v3.4.0-rc1~74^2~1 (MSVC: Rewrite manifest file
handling with Makefile and Ninja, 2015-09-15) broke handling of this
option.  Fix it and add a test case.
2015-11-18 09:31:56 -05:00
Gregor Jasny f6f03ed4cc Add test for OSX/iOS Framework directory structure (#15833) 2015-11-13 13:58:53 +01:00
Stephen Kelly 4ce9742ae3 Alias: Fix access at generate-time (#15832)
Commit c389f8bb (cmLocalGenerator: Port Find method away from
GetGeneratorTarget, 2015-10-25) ported the implementation of
FindGeneratorTargetToUse away from the FindTargetToUse method,
but neglected to handle alias targets.

The latter method has a parameter to determine whether to
include alias targets in the search, but as that is only
needed at configure time, this generate-time equivalent does
not need the condition.
2015-11-08 13:54:49 +01:00
Brad King 39e830a98e Merge topic 'cpack-deb-config-file-source-field'
e5b70ed0 CPackDEB: added config file optional Source field
f2d98e2d CPackDEB: minor documentation and debug logging fixes
2015-11-06 14:58:11 -05:00