Commit Graph

3983 Commits

Author SHA1 Message Date
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
Raffi Enficiaud e5b70ed013 CPackDEB: added config file optional Source field 2015-11-04 21:46:22 +01:00
Raffi Enficiaud 341cd93489 CPackDeb: ctest tests for compression scheme leak
Test that changing compression of debian package
content does not affect DEBIAN/ files which must
be gzipped
2015-11-03 18:18:35 +01:00
Brad King b7b3b675fd Merge topic 'fix-find_program-regression'
31e6571c find_program: Fix regression in finding an already-known path
2015-11-02 09:09:46 -05:00
Brad King 1178b53662 Merge branch 'fix-find_program-regression' into release 2015-10-30 08:38:13 -04:00
Brad King 31e6571cca find_program: Fix regression in finding an already-known path
Changes in commit v3.4.0-rc1~124^2~1 (cmFindProgramCommand: Re-implement
search using more flexible approach, 2015-09-01) did not preserve the
behavior of looking for the given name with no search path at all.
Fix this and add a test case covering finding an absolute path with
no search directories.
2015-10-30 07:40:46 -04:00
Benjamin Chrétien 1bfb527f56 FindPkgConfig: return actual error when a package is not found (#15810)
In some cases, CMake returned the following error:

-- Checking for module 'foo'
--   Package 'foo' not found

When the actual error returned by pkg-config was:

  Package 'bar', required by 'foo', not found

Now, the actual error is forwarded to the user.

-- Checking for module 'foo'
--   Package 'bar', required by 'foo', not found

For the standard case (i.e. the package was indeed not found), the
CMake error was:

-- Checking for module 'foo'
--   Package 'foo' not found

But it now prints:

-- Checking for module 'foo'
--   No package 'foo' found

The associated test was also updated. ${last} refers to the last
CLI argument.
2015-10-28 10:18:15 -04:00
Stephen Kelly 6a56c8247f Tests: Disable parallel test execution while running ctest_test 2015-10-27 21:44:04 +01:00
Stephen Kelly 5f14040c34 Tests: Don't overwrite RunCMake_TEST_FAILED variable 2015-10-27 21:42:24 +01:00
Brad King d71920c457 Merge topic 'xcode-watch-and-tvos'
a91eebeb Xcode: Recognise Watch and TV OS as embedded platforms
2015-10-26 13:13:02 -04:00
Brad King 4c4da56b2e Merge topic 'xcode-optimization-flags'
601e6e1a Xcode: Use regular expression to extract all optimisation flags (#15794)
2015-10-26 13:12:59 -04:00
Brad King f054552124 Merge topic 'fix-test-RUN_SERIAL-failure-regression'
e61973e1 CTest: Fix regression in handling of a RUN_SERIAL test that fails
2015-10-26 13:12:50 -04:00
Gregor Jasny a91eebebdb Xcode: Recognise Watch and TV OS as embedded platforms 2015-10-23 22:19:43 +02:00
Gregor Jasny 601e6e1ad1 Xcode: Use regular expression to extract all optimisation flags (#15794) 2015-10-23 19:29:09 +02:00
Brad King e61973e1ab CTest: Fix regression in handling of a RUN_SERIAL test that fails
Refactoring in commit v3.4.0-rc1~390^2~1 (cmCTestMultiProcessHandler:
Refactor RUN_SERIAL implementation, 2015-06-01) forgot to update a code
path for cleaning up after a failed RUN_SERIAL test.  This causes an
infinite loop after a RUN_SERIAL test fails.  Fix it and add a test.
2015-10-23 09:55:25 -04:00
Brad King 740f85a204 Merge topic 'cmLocalGenerator-generator-target-storage'
a4bbdc5e cmLocalGenerator: Remove cmGeneratorTargetsType from setter API.
04b6bb16 cmLocalGenerator: Simplify semantic of adding generator targets.
400e3d19 cmLocalGenerator: Don't store imported generator targets
726e461b CMP0063: Split unit test by target type.
2015-10-21 09:16:56 -04:00
Brad King e2d4bfef3f Merge topic 'fix-CMP0054-elseif-warning'
d6a03b47 cmIfCommand: Issue CMP0054 warning with appropriate context. (#15802)
2015-10-21 09:16:49 -04:00
Stephen Kelly 726e461b38 CMP0063: Split unit test by target type.
Don't rely on the order of warnings for targets being deterministic.
2015-10-20 23:58:48 +02:00
Stephen Kelly d6a03b475e cmIfCommand: Issue CMP0054 warning with appropriate context. (#15802)
Commit v3.4.0-rc1~494^2~4 (cmMakefile: Add API for elseif to create
backtrace., 2015-05-29) removed the use of cmMakefileCall to push/pop
execution context in favor of a new way to create backtraces.

However, a call to cmMakefile::GetExecutionContext is still invoked to
issue a contextual CMP0054 warning through cmConditionEvaluator.  As
the elseif is not part of the call stack, this resulted in trying to
access an empty vector.

Avoid the attempt at getting execution context when evaluating elseif by
constructing a context and backtrace on behalf of the cmConditionEvaluator
in all cases.
2015-10-20 23:40:12 +02:00
Joseph Snyder 3cd2e0e2d5 Tests: Fix DelphiCoverage test file selection
The HTML file for the Delphi Code coverage was being found by the
Dashboard coverage run of CMake itself.  Switch it to be a configured
file to eliminate this extra reading.
2015-10-20 11:13:25 -04:00
Stephen Kelly 2bf7de167f Subdirs: Initialize from parent before configuring.
Add new API for the subdirs command to cmState.

This fixes a regression introduced in commit f716460e (cmMakefile: Move
invokation to initialize snapshot., 2015-10-06).
2015-10-14 00:34:11 +02:00
Brad King 4df5c3d131 Merge branch 'revert-compiler-features-solaris' into release 2015-10-12 10:29:36 -04:00
Brad King 9b05b14fef Merge topic 'revert-compiler-features-solaris'
340d0897 Revert topic 'compiler-features-solaris'
2015-10-12 10:25:59 -04:00
Brad King 340d0897fa Revert topic 'compiler-features-solaris'
Revert commit v3.4.0-rc1~10^2~2 (Features: Disable support for Oracle
SolarisStudio on non-Linux, 2015-09-29) and two follow-up commits.
The support of compile features and language standards on Orcale
SolarisStudio needs more investigation so for CMake 3.4 we should
just act as 3.3 did.
2015-10-08 13:18:39 -04:00
Brad King 45e9f48f9c Merge topic 'cmake-script-mode-directory-vars'
8bb908b1 Document and test CMAKE_[CURRENT_](BINARY|SOURCE)_DIR in script mode
2015-10-08 10:31:50 -04:00