Commit Graph

3662 Commits

Author SHA1 Message Date
Nils Gladitz 9a544f2d98 CTestCoverageCollectGCOV: Support CTEST_CUSTOM_COVERAGE_EXCLUDE 2015-04-04 12:25:15 +02:00
Gilles Khouzam 01a9ab0def VS: Add support for XAML source files
XAML files are by default of type Page in the vcxproj and can be
overriden by setting the VS_XAML_TYPE property.  The .cpp and .h file
of the same name are automatically added as depending on the XAML file.

New VSXaml test builds a basic XAML WindowsStore 8.1 app with VS2013.
2015-04-03 13:40:35 -04:00
Brad King af92482712 Makefile: Tolerate a BOM while scanning source dependencies (#15493)
Otherwise an #include directive on the first line of a source file is
ignored if the file contains a Byte-Order-Mark.

Suggested-by: Aleksey Konovalov <konovalov.aleks@gmail.com>
2015-04-03 13:04:57 -04:00
Brad King 0983825057 Merge topic 'remove-DEFINITIONS-directory-property'
06f61c26 Do not treat DEFINITIONS as a built-in directory property
2015-04-02 13:06:03 -04:00
Stephen Kelly 06f61c26cf Do not treat DEFINITIONS as a built-in directory property
Add policy CMP0059 to cover this change.  The property has been
deprecated since CMake 2.4 anyway.

This will help clean up cmMakefile -- the DefineFlagsOrig member should
not need to exist.
2015-04-02 13:00:48 -04:00
Bill Newcomb a293dcb561 Tests: Fix CMake.ELF test with read-only source (#15489)
When the cmake sources are all set to read-only (e.g. after importing
into perforce), the CMake.ELF test fails because the copy of the binary
is also read-only and cannot be modified.  Fix this by copying the
binary without source permissions.
2015-04-01 16:34:04 -04:00
Brad King 0c69ca831b Merge topic 'ctest-repeat-until-fail'
b687d672 Tests: Fix RunCMake.CTestCommandLine expected output time matching
2015-04-01 13:19:39 -04:00
Brad King 0fa263d9d0 Merge topic 'solaris-fix-target_link_libraries-test'
0778016a Tests: Do not try to use invalid "ld -v" flag on Solaris
2015-04-01 13:19:28 -04:00
Brad King b687d67281 Tests: Fix RunCMake.CTestCommandLine expected output time matching
When matching ctest command-line output, we must account for the
formatting of times that take 10 seconds or more.  The values are
right-justified, so use " +" to match any amount of space before them.
2015-03-31 16:04:29 -04:00
Domen Vrankar 681f3a2f01 CPackRPM: Add basic symlink support (#15209)
RPM packages can contain symbolic links to relative paths - including
support for multiple relocation paths through generation of post install
relocation scripts.  Add basic support with limitations described in
documentation.
2015-03-31 14:04:13 -04:00
Brad King 0778016a0b Tests: Do not try to use invalid "ld -v" flag on Solaris
Fix the CMakeCommands.target_link_libraries test to use "-V" instead of
"-v" on Solaris because the latter does not exist.
2015-03-31 11:21:36 -04:00
Brad King c1f8c6cdf9 Merge topic 'cpack-archive-prefix'
e3f84fc5 cpack: Fix CPACK_PACKAGING_INSTALL_PREFIX handling for archives (#14677)
2015-03-30 09:27:55 -04:00
Brad King c117c2bb5e Merge topic 'add_dependencies-INTERFACE-libraries'
ac14cbf0 Allow add_dependencies() on INTERFACE libraries (#15414)
817d31db Help: Format add_dependencies documentation
2015-03-30 09:27:53 -04:00
Clinton Stimpson e3f84fc504 cpack: Fix CPACK_PACKAGING_INSTALL_PREFIX handling for archives (#14677)
Fix the case when the archive generator is used to package components
with an install prefix.
2015-03-30 09:22:14 -04:00
Brad King ac14cbf017 Allow add_dependencies() on INTERFACE libraries (#15414)
Revert commit v3.0.0-rc1~175^2~20 (add_dependencies: Disallow use with
INTERFACE_LIBRARY, 2013-12-25).  Teach our dependency analysis to
transitively follow INTERFACE target utility dependencies as was done or
IMPORTED targets in commit v2.8.6~127^2~1 (Allow add_dependencies() on
imported targets, 2010-11-19).  Extend the InterfaceLibrary test with a
case to cover header generation for a header-only INTERFACE library via
a custom target.
2015-03-27 16:25:09 -04:00
Brad King 230f2d6e70 ExternalData: Add option to recursively match under directories
Extend the ``DATA{Dir/,...}`` syntax with a new ``RECURSE:`` option
to enable recursive matching of associated files.  This will allow
an entire directory tree of data to be referenced at once.
2015-03-27 14:44:54 -04:00
Gregor Jasny 6ab1413499 Tests: Enable XCTest tests for Xcode 5
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-03-24 11:24:56 -04:00
Brad King 64e97edad7 Merge topic 'ninja-require-byproducts'
bd9c7f9b Ninja: Add policy to require explicit custom command byproducts
ed8e30b0 cmGlobalNinjaGenerator: Optimize handling of known build outputs
ad094f43 cmGlobalNinjaGenerator: Fix spelling of "unknown"
82a37d3c cmGlobalNinjaGenerator: Drop unused member
2015-03-23 09:48:07 -04:00
Brad King e85eb2e336 Merge topic 'add-extra-qbs-generator'
f85db2f3 Qbs: Add new 'extra' generator for qbs project files
2015-03-23 09:18:43 -04:00
Brad King 45583e5272 Merge topic 'cpack-rpm-ignore-default-prefix'
18917d66 CPack/RPM ignore install prefix relocation path
2015-03-23 09:18:36 -04:00
Brad King a37937f7c0 Merge topic 'xcode-xctest'
4178cd88 Help: Add notes for topic 'xcode-xctest'
87a4b858 Tests: Add XCTest example to test Frameworks and Cocoa App Bundles
ba14510b OS X: Add FindXCTest module
3714955b OS X: Add handling for XCTest bundles
54a5cdbb Tests: Compute Xcode version for any generator on OS X
2015-03-23 09:18:29 -04:00
Brad King cc8b8cdc75 Merge topic 'ctest-repeat-until-fail'
6bce0276 Help: Add notes for topic 'ctest-repeat-until-fail'
fde70a1b ctest: Add a new --repeat-until-fail option
2015-03-23 09:18:26 -04:00
Gregor Jasny 87a4b8580c Tests: Add XCTest example to test Frameworks and Cocoa App Bundles
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-03-23 09:12:20 -04:00
Bill Hoffman fde70a1b26 ctest: Add a new --repeat-until-fail option
This option tells ctest to run each test N times until the test fails or
the N times have run. This is useful for finding random failing tests.
2015-03-23 09:08:22 -04:00
Brad King bd9c7f9b2c Ninja: Add policy to require explicit custom command byproducts
Add policy CMP0058 to avoid generating 'phony' ninja rules for unknown
custom command dependencies.  This requires projects to specify their
custom command byproducts explicitly.  With this requirement we no
longer have to assume that unknown custom command dependencies are
generated and can instead simply assume they are source files expected
to exist when the build starts.  This is particularly important in
in-source builds.  It is also helpful for out-of-source builds to allow
Ninja to diagnose missing files before running custom command rules that
depend on them.
2015-03-20 17:40:12 -04:00
Domen Vrankar 18917d66d4 CPack/RPM ignore install prefix relocation path
Patch adds possibility to remove
CPACK_PACKAGING_INSTALL_PREFIX from
the list of relocation paths when
crating a relocatable rpm.
2015-03-20 21:52:49 +01:00
Stanislav Ionascu f85db2f323 Qbs: Add new 'extra' generator for qbs project files 2015-03-20 10:25:11 -04:00
Brad King c95e523db8 Merge topic 'file-globbing-directory-listing'
6e54b0b9 Help: Add notes for topic 'file-globbing-directory-listing'
a2c068a7 file: Teach GLOB to list directories optionally
2015-03-20 09:47:52 -04:00
Domen Vrankar a2c068a7ce file: Teach GLOB to list directories optionally
GLOB lists directories by default and GLOB_RECURSE does not.
LIST_DIRECTORIES enables user to control the behavior explicitly for
consistently for both GLOB and GLOB_RECURSE.
2015-03-20 09:45:25 -04:00
Brad King 54a5cdbb4c Tests: Compute Xcode version for any generator on OS X
Store the version in CMake_TEST_XCODE_VERSION for use by tests that work
with any generator on OS X but may depend on the Xcode version providing
the tools.
2015-03-18 15:23:53 +01:00
Domen Vrankar ffc1b94510 CPack/RPM improved component override test
Component specific attributes test passed
even when attribute was able to leak to
the next component as library package is
the last that is generated. This patch
fixes the test as header package is generated
in the middle so leakage causes the test to
fail.
2015-03-17 17:36:36 +01:00
Brad King 0320993456 Merge topic 'cpack_rpm_old_version_tests'
140a53a8 CPack/RPM architecture test fixup
4552bc88 CPack/RPM relocation paths test fixup
2015-03-17 10:14:54 -04:00
Brad King 8915cddcde Merge topic 'FindMatlab-rewrite'
49c8dcf7 FindMatlab: Rewrite module and provide a usage API
2015-03-17 10:14:52 -04:00
Zach Mullen 874fdd914a CTest: Output test-specific env vars in verbose mode (#15446)
Any environment vars that were configured for a test via the
ENVIRONMENT property will now be output when the test is run
with verbose logging enabled.
2015-03-17 10:11:33 -04:00
Raffi Enficiaud 49c8dcf7bb FindMatlab: Rewrite module and provide a usage API
Implement a brand new FindMatlab module:

- Add support for versions and components.
- Find Matlab and its version in a more precise and multiplatform way.
- Add API to create a new mex extension with documentation.
- Add API to add matlab unit tests (with or without the unit test framework).
- Find as much as possible based on a single Matlab_ROOT_DIR cache entry
  and allow the user to change it to re-find everything.
2015-03-17 09:47:04 -04:00
Domen Vrankar 140a53a810 CPack/RPM architecture test fixup
Fixed architecture test that was
missing architecture in regular
expressions - bug was detected
on older rpm versions where the
check failed.
Extended architecture test that takes
into account older versions of rpm.
This patch is related to 15442.
2015-03-15 21:08:19 +01:00
Domen Vrankar 4552bc886d CPack/RPM relocation paths test fixup
Patch fixes bug in test reported with
id 15442 - older versions of rpm print
out package info a bit differently so
we should ignore white spaces
2015-03-15 20:37:16 +01:00
Brad King 7b185d5017 Merge topic 'main_dependency_diagnostic'
242c3966 add_custom_command: Diagnose MAIN_DEPENDENCY limitation.
2015-03-12 15:26:26 -04:00
Brad King addf4db06c Merge topic 'fix_jacoco_coverage_process'
c771f9d9 CTest: Fix Jacoco Coverage
2015-03-12 15:26:24 -04:00
Brad King ad6fbb88bb Merge topic 'target-language-genex'
232a6883 Help: Add release notes for target-language-genex.
9e168941 File(GENERATE): Process genex evaluation files for each language.
b734fa44 Genex: Allow COMPILE_LANGUAGE when processing include directories.
0b945ea9 Genex: Allow COMPILE_LANGUAGE when processing compile definitions.
5c559f11 Genex: Enable use of COMPILE_LANGUAGE for compile options.
e387ce7d Genex: Add a COMPILE_LANGUAGE generator expression.
4a0128f4 VS6: Compute CMAKE_*_FLAGS and COMPILE_DEFINITIONS* only when needed
2015-03-10 09:12:34 -04:00
Brad King cce9671b4f Merge topic 'ExternalProject-byproducts-tokens'
86032ae0 ExternalProject: Replace placeholder tokens in BYPRODUCTS
2015-03-10 09:12:32 -04:00
Brad King fa4617b7ea Merge topic 'configure_file-NEWLINE_STYLE-no-warn'
024e25e4 Tests: Add more signature tests to RunCMake.configure_file test
3ef776fc configure_file: Do not warn about newline style arguments
2015-03-10 09:12:24 -04:00
Stephen Kelly 9e1689413f File(GENERATE): Process genex evaluation files for each language. 2015-03-09 20:49:17 +01:00
Stephen Kelly b734fa4471 Genex: Allow COMPILE_LANGUAGE when processing include directories.
Issue an error if this is encountered by an IDE generator.
2015-03-09 20:49:17 +01:00
Stephen Kelly 0b945ea9a6 Genex: Allow COMPILE_LANGUAGE when processing compile definitions.
Issue an error if this is encountered by an IDE generator.
2015-03-09 20:49:16 +01:00
Stephen Kelly 5c559f1113 Genex: Enable use of COMPILE_LANGUAGE for compile options.
Follow-ups will allow the use of the generator expression
for compile definitions and include directories for non-IDE
generators.
2015-03-09 20:48:57 +01:00
Gaëtan Lehmann 86032ae0eb ExternalProject: Replace placeholder tokens in BYPRODUCTS
This allows the developer to specify the byproducts relative to the
binary directory without the need to set the binary directory location
explicitly.
2015-03-09 10:04:44 -04:00
Brad King 77f3804ab2 Merge branch 'configure_file-NEWLINE_STYLE-no-warn' into release 2015-03-09 09:20:58 -04:00
Brad King 024e25e485 Tests: Add more signature tests to RunCMake.configure_file test
Move the test cases from Tests/CMakeTests/ConfigureFileTest.cmake.in
over to use the RunCMake.configure_file infrastructure.  This does much
more robust verification of CMake output for each test case, and would
have caught the regression fixed in our parent commit.
2015-03-09 09:17:59 -04:00
Nils Gladitz 242c396656 add_custom_command: Diagnose MAIN_DEPENDENCY limitation.
The new policy CMP0057 diagnoses reuse of the same MAIN_DEPENDENCY across
multiple custom commands.
2015-03-09 12:45:38 +01:00
Stephen Kelly e387ce7d68 Genex: Add a COMPILE_LANGUAGE generator expression. 2015-03-07 13:19:45 +01:00
Joseph Snyder c771f9d945 CTest: Fix Jacoco Coverage
Rename the example jacoco.xml file to be jacoco.xml.in to stop CMake
from apptempting to calculate Jacoco Coverage when running over itself.

Enclose a push of -1 to the coverage vector to only happen if there is a
fin to calculate for. This prevents a crash if the target file doesn't
exist.
2015-03-06 11:18:19 -05:00
Brad King 17b4423c45 Merge topic 'fix-crash-on-bad-LANG_STANDARD'
00d66557 Diagnose invalid <LANG>_STANDARD value instead of crashing (#15426)
2015-03-02 08:36:24 -05:00
Brad King 6b6852a0eb Merge branch 'fix-crash-on-bad-LANG_STANDARD' into release 2015-02-28 12:15:34 -05:00
Brad King 00d66557d4 Diagnose invalid <LANG>_STANDARD value instead of crashing (#15426) 2015-02-28 12:14:42 -05:00
Brad King 29b5ca108e Merge topic 'remove_error_read_script'
6bf13097 CTest: Drop "Error in read script" message at end of testing
2015-02-27 10:34:38 -05:00
Brad King 0bf6c7fa7b Merge topic 'cmake-build-ninja-verbose'
d1082448 Tests: Extend RunCMake.CommandLine to cover 'cmake --build' for 'ninja -v'
ce935ebe cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for Ninja
2015-02-27 10:34:36 -05:00
Zack Galbreath 6bf130979e CTest: Drop "Error in read script" message at end of testing
A more-specific error message is always displayed earlier in the
output if any real error occurred.  This final summary message
is distracting to readers searching through the output for the
word "error".  Simply drop it.
2015-02-27 10:31:02 -05:00
Brad King 4932f59b4c Merge branch 'cpack_rpm_mulit_prefix_fixup' into release 2015-02-27 08:48:45 -05:00
Domen Vrankar 3db740cb31 CPackRPM: Consolidate CPackComponentsForAll test case coverage
Use test infrastructure added by commit 1cbb1562 (Fix handling of
relocation prefix parent directories, 2015-02-26) to cover the same use
cases from tests added by commit 5857ca5e (CPackRPM: Drop explicit
handling of '@' symbols that breaks them, 2015-01-07) and drop the
latter.
2015-02-27 08:45:57 -05:00
Domen Vrankar 3cf86d9e7b Merge branch 'cpack_rpm_mulit_prefix_fixup' into cpack_rpm_mulit_prefix_fixup-for-master
Resolve conflict in Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
by combining the changes from both sides.
2015-02-27 08:42:29 -05:00
Domen Vrankar 1cbb156253 CPackRPM: Fix handling of relocation prefix parent directories
In commit 3ec02547 (CPackRPM: Allow multiple path relocation prefixes
for one package, 2015-01-21) a regression was introduced that causes
parent directories of relocation paths to be incorrectly included in
the rpm.  Fix this and make the test case more strict to cover it.
2015-02-27 08:37:24 -05:00
Brad King d1082448a8 Tests: Extend RunCMake.CommandLine to cover 'cmake --build' for 'ninja -v' 2015-02-26 10:21:09 -05:00
Brad King e4419c9f88 Merge topic 'ExternalData-url-algo-map'
f7f4ca55 ExternalData: Add support for custom algorithm-to-URL mapping
2015-02-26 08:51:52 -05:00
Brad King f7f4ca55bd ExternalData: Add support for custom algorithm-to-URL mapping
Allow URL templates to contain a %(algo:<key>) placeholder that is
replaced by mapping the canonical hash algorithm name through a map
defined by the <key>.

Extend the Module.ExternalData test to cover the behavior.
Extend the RunCMake.ExternalData test to cover error cases.
2015-02-25 08:28:05 -05:00
Brad King b10310e6e6 Tests: Drop CTestTestFailedSubmit-* tests
Everything they cover is now covered by RunCMake.ctest_submit test cases
(except ctest_coverage LABELS which were not actually checked anyway).
Drop these redundant tests.
2015-02-24 10:03:27 -05:00
Brad King 41a16f07c3 Merge topic 'osx-framework-search-platform-SDKs'
0ee2a004 OS X: Add platform-specific Frameworks search path
2015-02-24 09:12:45 -05:00
Brad King 13f9f848de Merge topic 'FeatureSummary-no-duplicates'
38ef2b73 FeatureSummary: Print each feature info only once
2015-02-24 09:12:43 -05:00
Brad King 133ab7a447 Merge topic 'rpm_at_in_path'
5857ca5e CPackRPM: Drop explicit handling of '@' symbols that breaks them (#14782)
2015-02-24 09:12:39 -05:00
Brad King 206ce77781 Merge topic 'ctest-output-options'
ff1ddd2a ctest_upload: Add QUIET option
0b87b2a3 ctest_memcheck: Add QUIET option
fc58bdb9 ctest_coverage: Add QUIET option
876a680d ctest_test: Add QUIET option
49ba4545 ctest_build: Add QUIET option
f999dc0b ctest_configure: Add QUIET option
645ad117 ctest_update: Add QUIET option
19d1a559 ctest_start: Add QUIET option
1643b905 ctest_submit: Add QUIET option
12db1139 CTest: Add cmCTestOptionalLog macro
2015-02-24 09:12:33 -05:00
Brad King 8366b1bd4f Merge topic 'test-RunCMake-refactor-ctest'
e2b9e7f7 Tests: Drop unnecessary stderr matching from RunCMake.ctest_memcheck
7ce9f6e2 Tests: Teach RunCMake to tolerate 'Error kstat returned' lines in test output
69de0f7e Tests: Teach RunCMake to tolerate Guard Malloc lines in test output
57f2aa7c Tests: Teach RunCMake to tolerate BullseyeCoverage lines in test output
b04c8ec3 Tests: Match curl error in RunCMake.ctest_submit FailDrop-* cases
1d82105e Tests: Rename RunCMake.{CTestMemcheck => ctest_memcheck}
d7662141 Tests: Rename RunCMake.{CTestSubmit => ctest_submit}
9b50388b Tests: Split RunCTest helper out of RunCMake.CTest(Submit|Memcheck)
76e7c22b Tests: Rename RunCMake.CTestMemcheck internals to match CTestSubmit
2015-02-24 09:12:31 -05:00
Domen Vrankar 5857ca5e0d CPackRPM: Drop explicit handling of '@' symbols that breaks them (#14782)
The change in commit v2.8.12~218^2 (CPackRPM protect '@' character in
filename processed in the spec file, 2013-07-05) was not necessary after
commit v2.8.12~439^2 (Add support for componentized USER spec file,
2013-04-01).  The latter replaced ${VAR} references in the spec file
template string with \@VAR\@ references, thus protecting '@' symbols
automatically.  This caused CPackRPM to break paths with @ symbols.
Revert the change to fix the behavior, and add a test case.
2015-02-24 08:44:36 -05:00
Gregor Jasny 0ee2a004e7 OS X: Add platform-specific Frameworks search path
Otherwise find_library is unable to lookup the XCTest framework which
is not located in the SDK serach path:

In the 10.10 SDK the SDK frameworks are located here:

  $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks

whereas the Platform SDKs are located here:

  $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/Library/Frameworks

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-02-23 13:10:52 -05:00
Gregor Jasny 38ef2b7363 FeatureSummary: Print each feature info only once
If a feature is added multiple times via ADD_FEATURE_INFO it should
appear only once in FEATURE_SUMMARY.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-02-23 11:39:17 -05:00
Brad King 7cebc5acac Merge topic 'rpm_package_architecture'
b6f94e6b Help: Add notes for topic 'rpm_package_architecture'
f174b919 Tests: CpackRPM test component architecture
3aa9f89d CPackRPM: Support rpm architecture in components
761562fe CPackRPM: Fix CPACK_RPM_PACKAGE_ARCHITECTURE
2015-02-23 11:06:05 -05:00
Joshua A Clayton f174b919d6 Tests: CpackRPM test component architecture
Test creating rpms of type "noarch", native, and "armv7hf"
2015-02-23 10:48:36 -05:00
Brad King 67fa9462ad Merge topic 'rpm_run_tests_on_other_platforms'
8c0474cd CPackRPM: run tests on more platforms than just Linux
2015-02-23 10:26:46 -05:00
Brad King cc3611023d Merge topic 'use-algorithms'
bb9d71b4 Replace loops with algorithms.
4afe6c26 cmAlgorithms: Add cmReverseRange adaptor.
a3a0a8c2 cmAlgorithms: Add cmFindNot algorithm.
8c74a41f cmRST: Replace two erase with a rotate and larger erase.
61fe1919 cmAlgorithms: Update concept requirement to FowardIterator
09d6125b cmAlgorithms: Move cmRotate out of 'implementation detail' namespace.
8ed6ecac cmRST: Move two algorithms beside each other.
dfe49c20 cmRST: Use std::min where appropriate.
21b0654a cmGlobalGenerator: Convert set insert algorithm to vector algorithms.
416df93a Convert some raw loops to cmWrap.
37b88d34 cmAlgorithms: Add cmWrap.
a2818093 Use cmJoin where possible.
76207b08 cmCacheManager: Replace loop with algorithm.
60c3bb73 cmGlobalGenerator: Replace loop with algorithm.
05fec779 cmTarget: Port loop to algorithm.
9c225767 cmGlobalGenerator: Replace set::insert algorithm with cmRemoveDuplicates.
...
2015-02-23 10:26:38 -05:00
Brad King 1eb192905d Merge topic 'private-FindJsonCpp'
a41d621d bootstrap: Add --(no-)system-jsoncpp options
a5768442 FindJsonCpp: Drop new module due to upstream jsoncpp providing package
2015-02-23 10:26:30 -05:00
Domen Vrankar 8c0474cd2c CPackRPM: run tests on more platforms than just Linux
Lift the restriction that limits use of CPackRPM tests to Linux OS only
because RPM can also be used on e.g. AIX which is Unix OS.
2015-02-23 10:19:29 -05:00
Zack Galbreath ff1ddd2a73 ctest_upload: Add QUIET option 2015-02-23 10:02:00 -05:00
Zack Galbreath 0b87b2a339 ctest_memcheck: Add QUIET option 2015-02-23 10:02:00 -05:00
Zack Galbreath fc58bdb9ad ctest_coverage: Add QUIET option 2015-02-23 10:02:00 -05:00
Zack Galbreath 876a680d48 ctest_test: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath 49ba4545c2 ctest_build: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath f999dc0bbf ctest_configure: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath 645ad117e1 ctest_update: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath 19d1a5599a ctest_start: Add QUIET option
This suppresses all non-error messages that would have otherwise
been printed by this function.
2015-02-23 10:01:59 -05:00
Brad King e2b9e7f7bc Tests: Drop unnecessary stderr matching from RunCMake.ctest_memcheck
The Dummy*-stderr.txt files were needed only to match platform-specific
memcheck tooling output and verify that stderr is otherwise empty.  Now
that the RunCMake infrastructure knows how to strip such lines before
matching, we can simply drop these files and use the default empty
string match.
2015-02-23 10:01:58 -05:00
Zack Galbreath 1643b905e0 ctest_submit: Add QUIET option
Specifying this option prevents CTest from printing any non-error
messages to the console for this call to ctest_submit().
2015-02-23 10:01:58 -05:00
Brad King 7ce9f6e29e Tests: Teach RunCMake to tolerate 'Error kstat returned' lines in test output
When RunCMake tests run on Solaris, the output may contain unexpected
lines of the form "Error kstat returned...".  These lines are printed by
SystemInformationImplementation::RunProcess when called from
SystemInformationImplementation::ParseValueFromKStat (see issue #12066).
Until someone investigates why kstat returns values outside the range it
documents, simply remove such lines from the actual output before
matching it against the expected output.
2015-02-23 10:01:58 -05:00
Brad King 69de0f7ea4 Tests: Teach RunCMake to tolerate Guard Malloc lines in test output
When RunCMake tests run under Xcode Guard Malloc, Guard Malloc may add
lines of the form "<tool>(<pid>) malloc:..." to the output.  Remove such
lines from the actual output before matching it against the expected
output.
2015-02-23 10:01:57 -05:00
Brad King 57f2aa7c37 Tests: Teach RunCMake to tolerate BullseyeCoverage lines in test output
When RunCMake tests run under dynamic analysis, Bullseye may add lines
of the form "BullseyeCoverage..." to the output.  Remove such lines from the
actual output before matching it against the expected output.
2015-02-23 10:01:57 -05:00
Brad King b04c8ec3f8 Tests: Match curl error in RunCMake.ctest_submit FailDrop-* cases
Port the regexes over from the CTestTestFailedSubmit tests for ftp,
http, and https.  No such match is needed for the other protocols.
2015-02-23 10:01:57 -05:00
Stephen Kelly 21b0654ace cmGlobalGenerator: Convert set insert algorithm to vector algorithms.
Adjust test for new error output.
2015-02-20 21:36:57 +01:00
Brad King a576844263 FindJsonCpp: Drop new module due to upstream jsoncpp providing package
Since jsoncpp 0.7.0 (2014-11-20) the upstream may provide a CMake
package configuration file such that find_package(jsoncpp) will find a
jsoncppConfig.cmake file.  In order to avoid conflicting with this
(especially on case-insensitive filesystems), and since we always prefer
projects to provide package config files (that they maintain), it is
better to not provide FindJsonCpp publicly.

Move FindJsonCpp into a private source directory that is not installed
so that we can still use it for building CMake itself.

Reported-by: Ryan Pavlik <ryan.pavlik@gmail.com>
2015-02-20 08:22:02 -05:00
Brad King c4c570f9cc Merge topic 'find-command-prefix-from-PATH'
ffc06c12 Teach find_(library|file|path) to get prefixes from PATH (#15370)
2015-02-20 08:10:50 -05:00
Brad King 1d82105e29 Tests: Rename RunCMake.{CTestMemcheck => ctest_memcheck}
Follow the convention of naming tests after the command they test.
2015-02-19 11:35:51 -05:00
Brad King d7662141a7 Tests: Rename RunCMake.{CTestSubmit => ctest_submit}
Follow the convention of naming tests after the command they test.
2015-02-19 11:33:32 -05:00
Brad King 9b50388b09 Tests: Split RunCTest helper out of RunCMake.CTest(Submit|Memcheck)
Provide the "run_ctest" macro for use in other tests that also
want to cover running "ctest" scripts.
2015-02-19 11:26:44 -05:00
Brad King 76e7c22b3c Tests: Rename RunCMake.CTestMemcheck internals to match CTestSubmit 2015-02-19 11:26:43 -05:00
Brad King ffc06c1239 Teach find_(library|file|path) to get prefixes from PATH (#15370)
The find_package command already knows how to compute installation
prefixes from PATH.  Use the same approach to establish prefixes for
find_library, find_file, and find_path to use to look in directories
like "<prefix>/lib[/<arch>]" and "<prefix>/include" for libraries and
headers.  This will reduce the amount of configuration end users need to
do to establish a work environment rooted under a specific prefix.
2015-02-19 10:03:17 -05:00
Brad King f611406fe9 Fortran: Test that CMAKE_Fortran_COMPILER_VERSION is set (#15372)
Update the CMakeOnly.CompilerIdFortran test to require that the variable
is set instead of just warning.  We already require it for C and CXX.
2015-02-19 09:26:28 -05:00
Brad King d891d47434 Tests: Consolidate detection of 'rpmbuild'
Several tests use slight variations of the same logic to enable CPack
RPM tests.  Consolidate this logic into one check before any tests are
added.  Look for 'rpmbuild' only on Linux and only when the test build
tree does not have spaces in the path.  In particular, this will make
the result available in time for the RunCMake.CPackRPM test to be
activated even if CMake is configured exactly once.
2015-02-13 11:50:38 -05:00
Gregor Jasny bf8f9c29e7 Xcode: Teach XCODE_ATTRIBUTE target properties about generator expressions
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-02-12 13:35:31 -05:00
Brad King f30022eb07 install: Allow generator expressions in TARGETS DESTINATION (#14317)
This will allow per-config destinations for targets in EXPORT sets.
Using multiple install(TARGETS) with separate CONFIGURATIONS is
rejected as a target appearing more than once in an export set.
Now instead one can write

 install(TARGETS foo EXPORT exp DESTINATION lib/$<CONFIG>)

to get a single logical membership of the target in the export set
while still having a per-config destination.
2015-02-11 15:15:33 -05:00
Brad King 108e94ecf1 Merge topic 'export-interface-source-files'
f7e33820 Add release notes for export-interface-source-files.
6da65b39 Allow export of targets with INTERFACE_SOURCES.
736bcb96 Tests: Move IfacePaths test stderr files.
d9f8390d Tests: Run IfacePaths tests with a parameter.
cc152094 Tests: Split part of include_directories test to a generic location.
2015-02-11 09:59:30 -05:00
Stephen Kelly 6da65b3907 Allow export of targets with INTERFACE_SOURCES.
Use the same rules for paths in source and binary dirs in
installed INTERFACE_SOURCES as are used for
INTERFACE_INCLUDE_DIRECTORIES.
2015-02-11 00:51:34 +01:00
Stephen Kelly 736bcb9664 Tests: Move IfacePaths test stderr files.
Rename the files with a property-specific name, so that additional
properties can be easily tested.
2015-02-11 00:51:30 +01:00
Brad King 2fd44b082b Merge topic 'test-RunCMake-updates'
c0d8e715 RunCMake: Allow specifying the stderr file for a test.
68d29f51 RunCMake: Allow specifying the directory to run tests in.
1c3918ff RunCMake: Remove unneeded files.
2015-02-10 10:09:47 -05:00
Brad King db9a2e8966 Merge topic 'no-global-setlocale'
0f870234 Merge branch 'backport-no-global-setlocale' into no-global-setlocale
cd408d93 Add setlocale() calls around use of libarchive APIs (#14934, #15377)
87be2e14 Do not call setlocale() globally in CMake applications (#15377)
2015-02-10 09:37:50 -05:00
Stephen Kelly d9f8390db6 Tests: Run IfacePaths tests with a parameter.
Run the tests for the INCLUDE_DIRECTORIES INTERFACE property
in a specific build location, and update the stderr expectation
to match the new output.
2015-02-09 19:34:27 +01:00
Stephen Kelly cc15209476 Tests: Split part of include_directories test to a generic location.
The moved tests are related to paths in INTERFACE_INCLUDE_DIRECTORIES
in general, and when exporting, and covering cases of the install
location being within the build or source prefix etc.  Other build
properties containing paths should have similar tests, so this
allows some parameterization while keeping the preparation of the
various directory structures.
2015-02-09 19:23:47 +01:00
Stephen Kelly c0d8e71591 RunCMake: Allow specifying the stderr file for a test. 2015-02-09 19:15:04 +01:00
Stephen Kelly 68d29f5190 RunCMake: Allow specifying the directory to run tests in. 2015-02-09 19:15:04 +01:00
Stephen Kelly 1c3918ff02 RunCMake: Remove unneeded files.
The default expectation of RunCMake tests is empty content, so there
is no need to specify it.
2015-02-09 19:15:04 +01:00
Brad King 0f870234fe Merge branch 'backport-no-global-setlocale' into no-global-setlocale
Resolve conflict in Source/CMakeLists.txt by taking both changes.
2015-02-06 13:35:21 -05:00
Brad King 87be2e1427 Do not call setlocale() globally in CMake applications (#15377)
Revert the changes made by commit v3.1.0-rc1~406^2~1 (Encoding: Add
setlocale() to applications, 2014-05-30) and commit v3.1.0-rc1~406^2
(Encoding: Change to only set LC_CTYPE, 2014-06-11), and other setlocale
calls added later in their spirit.  CMake has not been taught how to
deal with non-C locales everywhere.  We do not define any functionality
for character conversions for non-ASCII strings.  Another solution will
be needed to address the original problem motivating addition of
setlocale() calls.
2015-02-06 13:32:26 -05:00
Brad King 54e900abfb CheckFortranCompilerFlag: Add test case
Extend the FortranOnly test with a case covering this module.
2015-02-05 11:18:13 -05:00
Brad King 9042c875dc Merge topic 'fix-C-standard-features'
fb3487a9 Features: Fix C90 feature detection.
6027798a Features: Allow setting standard dialect below the default.
9d767810 Features: Populate CMAKE_<LANG>_STANDARD_DEFAULT only for supported compilers.
72537e44 Features: Add dialect compile flags only if default is known.
82c9d686 AppleClang: Remove redundant UNIX condition.
2015-02-05 09:25:14 -05:00
Stephen Kelly fb3487a997 Features: Fix C90 feature detection.
This bug caused c_function_prototypes to not be recorded at configure
time when compiling with -std=gnu99 or similar. In the case of feature
recording, that was not a problem, because the logic in
CMakeDetermineCompileFeatures.cmake currently assumes that a feature
present for an earlier standard is present for a later standard.

However, the detection strings are also used in WriteCompilerDetectionHeader,
so the feature macro has been defined to '0' when using a later language
dialect.

Fix that by not checking the existence of the __STDC_VERSION__ macro at
all when detecting C90 features.
2015-02-04 18:38:21 -05:00
Brad King 8f82004368 Merge topic 'CTestCoverageCollectGCOV-refinements'
809a5a5e Help: Add notes for topic 'CTestCoverageCollectGCOV-refinements'
03c0812c CTestCoverageCollectGCOV: Fix handling of international characters
8caa4e72 CTestCoverageCollectGCOV: Add test case
5c828cc8 CTestCoverageCollectGCOV: Allow custom flags to gcov
30cb628e CTestCoverageCollectGCOV: Fix handling of large file counts
2015-02-04 12:30:10 -05:00
Bill Hoffman 8caa4e72ab CTestCoverageCollectGCOV: Add test case 2015-02-03 10:40:58 -05:00
Brad King aec11372a5 Merge topic 'rpm_multi_prefix'
3ec02547 CPackRPM: Allow multiple path relocation prefixes for one package
2015-02-03 09:46:21 -05:00
Robert Maynard d3489bdb0b Features: Record for MSVC 2010-2015
Also, in WCDH add MSVC Compatibility for cxx_align{of,as}.

Co-Author: Stephen Kelly <steveire@gmail.com>
Co-Author: Brad King <brad.king@kitware.com>
2015-01-30 09:57:33 -05:00
Brad King 3228fc5049 Features: Define meaning for no language standard default
Define an empty string in CMAKE_<LANG>_STANDARD_DEFAULT to mean that
the toolchain has no notion of lanuage standard levels.  In this case
the <LANG>_STANDARD[_REQUIRED] properties will have no effect.

Update the RunCMake.CompileFeatures test to exclude the
LinkImplementationFeatureCycle test when there is no standard default.
It can never fail because no use of specific features will adjust the
CXX_STANDARD level required for any target since the standard levels
have no meaning in this case.
2015-01-29 15:01:40 -05:00
Domen Vrankar 3ec0254727 CPackRPM: Allow multiple path relocation prefixes for one package 2015-01-29 10:48:58 -05:00
Brad King 326cfe2b30 Merge topic 'xcode-revise-make-program'
ab9fa54d Xcode: Switch to internal CMAKE_MAKE_PROGRAM lookup by generator (#15324)
11e2e6ca Xcode: Select make program at build time
e4055a61 Xcode: Add internal API to find xcodebuild
2015-01-29 09:14:00 -05:00
Brad King 98659aecfd Merge topic 'vs-shader-flags'
4775c901 VS: Add source file property to set extra hlsl shader flags
2015-01-29 09:13:58 -05:00
Brad King abec4213d6 Merge topic 'fix-OBJECT_DEPENDS-after-path-normalization'
9259d778 Normalize OBJECT_DEPENDS paths to match custom commands (#15366)
2015-01-29 09:13:53 -05:00
Brad King ab9fa54d48 Xcode: Switch to internal CMAKE_MAKE_PROGRAM lookup by generator (#15324)
The "cmakexbuild" wrapper is not needed for Xcode 4 and above, and the
path to it may change when CMake moves.  Avoid storing a specific path
to a build program in CMakeCache.txt and instead compute the value for
CMAKE_MAKE_PROGRAM on demand.  However, if a user does set the value
explicitly then honor it.

This does for Xcode what commit v3.0.0-rc1~260^2~4 (VS: Switch to
internal CMAKE_MAKE_PROGRAM lookup by generators, 2013-11-15) did for
Visual Studio generators.
2015-01-29 09:11:11 -05:00
Brad King 6a0a4079ef Merge topic 'shorten-test-paths'
70c50962 Tests: Shorten paths in ExternalProjectLocal
539c5c25 Tests: Shorten paths in RunCMake.CompileFeatures
494f6e8d Tests: Shorten paths in CompileDefinitions
2015-01-28 09:33:38 -05:00
Robert Goulet 4775c90145 VS: Add source file property to set extra hlsl shader flags
Create a VS_SHADER_FLAGS source file property so that we can set all
other Visual Studio .hlsl shader file compilation flags.
2015-01-28 09:29:50 -05:00
Brad King 9259d77881 Normalize OBJECT_DEPENDS paths to match custom commands (#15366)
Custom command path normalization added in commit v3.1.0-rc1~471^2
(add_custom_command: Normalize OUTPUT and DEPENDS paths, 2014-05-28)
broke use of OBJECT_DEPENDS to bring in custom commands because the
latter paths were not normalized too.  Normalize them and add a test
case.

Reported-by: Daniel v. Gerpen
2015-01-28 09:06:21 -05:00
Brad King a47b904db2 Merge topic 'file-strings-utf-16'
1f77a700 file: Teach STRINGS to support UTF-16 and UTF-32 encodings
2015-01-27 11:36:45 -05:00
Justin Borodinsky 1f77a7001b file: Teach STRINGS to support UTF-16 and UTF-32 encodings 2015-01-27 11:30:26 -05:00
Brad King c1f5d6e6f5 Merge topic 'test-features-enforce-expectation'
67e76e82 Features: Fix test to reject missing expectation definitions
3046be77 Features: Emit a test failure if 'override' is present but not expected
2015-01-27 11:22:12 -05:00
Brad King af9cf04647 Merge topic 'cmake-E-tar-files-from'
44fd71de cmake: Teach "-E tar" command a "--files-from=" option
2015-01-27 11:22:08 -05:00
Brad King 33daec1ae9 Merge topic 'test-rerun-cmake'
7f2dc8dc configure_file: Test that CMake re-runs on input change or output missing
daf95a38 try_compile: Test that CMake re-runs on input change
2015-01-27 11:22:06 -05:00
Brad King 34ce0dd22f Merge topic 'tests-RunCMake-normalize-newlines'
bf05938b Tests/RunCMake: Normalize newlines before checking actual output
2015-01-27 11:22:04 -05:00
Brad King 7f2dc8dc54 configure_file: Test that CMake re-runs on input change or output missing
With the Makefile generators we expect that touching or modifying the
input file of a configure_file, or removing its output, will cause CMake
to re-run on the next build.  Extend the RunCMake.configure_file test
with a case covering this.  Also check that CMake does not re-run if
nothing has changed.
2015-01-27 11:18:37 -05:00
Brad King bf05938b8f Tests/RunCMake: Normalize newlines before checking actual output
We read the expected output with file(STRINGS) which converts CRLF
newlines to LF.  Do the same with the actual output before comparing.
2015-01-27 11:18:36 -05:00
Brad King daf95a3827 try_compile: Test that CMake re-runs on input change
With the Makefile and Ninja generators we expect that touching the input
source file for a try_compile will cause CMake to re-run on the next
build.  Extend the RunCMake.try_compile test with a case covering this.
Also check that CMake does not re-run if nothing has changed.
2015-01-27 11:18:36 -05:00
Brad King 70c50962fb Tests: Shorten paths in ExternalProjectLocal
Use a shorter name for the external project base directory to
allow longer CMake build tree directory names on Windows.
2015-01-27 08:57:57 -05:00
Brad King 67e76e82df Features: Fix test to reject missing expectation definitions
Whenever feature support is added to a compiler, the CompileFeatures
test needs to be updated to set expected availability of features.
Add #error directives to ensure the test fails if expectations are
not set.

Suggested-by: Stephen Kelly <steveire@gmail.com>
2015-01-26 14:41:33 -05:00
Stephen Kelly 3046be7784 Features: Emit a test failure if 'override' is present but not expected 2015-01-26 14:41:33 -05:00
Brad King 44fd71decb cmake: Teach "-E tar" command a "--files-from=" option
Read file names from the lines of a specified file.  Reject input lines
starting in '-' to leave room for option parsing to be added later.  Add
just '--add-file=' now to allow files starting in '-' to be specified.
2015-01-26 13:28:31 -05:00
Brad King 19e57a48cd Merge topic 'tests-RunCMake-make-program'
23bf98fc Tests/RunCMake: Honor CMAKE_MAKE_PROGRAM
2015-01-26 10:28:30 -05:00
Brad King 8def82585c Merge topic 'try-run-link-libraries'
d0adcccb try_run: Add tests for LINK_LIBRARIES with mock libraries.
223c5cb7 try_run: Add test for bad link libraries.
e2b1f058 try_run: Add support for LINK_LIBRARIES option.
2015-01-26 10:28:25 -05:00
Matt McCormick d0adcccbf4 try_run: Add tests for LINK_LIBRARIES with mock libraries.
Extend the ExportImport test to try using an imported library with
try_run.
2015-01-26 10:05:59 -05:00