summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* list: Add FILTER subcommand (#3986)Ashley Whetter2016-02-0325-0/+61
| | | | Create a `list(FILTER)` command to filter lists by regular expression.
* Merge topic 'fix-CMAKE_MATCH-self-match'Brad King2016-02-022-0/+6
|\ | | | | | | | | 6ffc4323 cmConditionEvaluator: Fix matching of `CMAKE_MATCH_*` values (#15944)
| * cmConditionEvaluator: Fix matching of `CMAKE_MATCH_*` values (#15944)Brad King2016-02-012-0/+6
| | | | | | | | | | | | | | | | | | | | | | While evaluating `if(MATCHES)` we get a `const char*` pointer to the string to be matched. On code like if(CMAKE_MATCH_COUNT MATCHES "Y") the string to be matched may be owned by our own result variables. We must move the value to our own buffer before clearing them. Otherwise we risk reading freed storage.
* | add_custom_command: Clarify error when TARGET is out of scope (#15681)Brad King2016-01-2810-2/+19
|/ | | | | | | | The add_custom_command(TARGET) signature only works for targets defined in the current directory. Clarify this in the error message when the target exists but was defined elsewhere. Inspired-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
* Merge topic 'fix-pkg_search_module-cache'Brad King2016-01-222-0/+17
|\ | | | | | | | | 40249bcc FindPkgConfig: set standard variables in the cache
| * FindPkgConfig: set standard variables in the cacheBen Boeckel2016-01-212-0/+17
| | | | | | | | | | | | | | | | | | Fixes a regression introduced when the code was simplified to use the variable queries. Fixes #15903. Reported-by: Bernd Lörwald
* | cmake: Fix `-E time` argument passing to childBrad King2016-01-204-0/+10
|/ | | | | | | | | | Since this command was introduced in 2002 it has incorrectly constructed the child process command line by concatenating arguments separated by spaces with no quoting. Fix this by passing the command argument vector directly to RunSingleCommand without an intermediate quoting and re-parsing step. Reported-by: Andrey Pokrovskiy <wonder.mice@gmail.com>
* Print line number of cache parse errors (#11109)Ashley Whetter2016-01-197-0/+26
| | | | | Track the line number while parsing `CMakeCache.txt` files and include it in a parse failure error message.
* Merge topic 'install-DIRECTORY-genex'Brad King2016-01-144-0/+9
|\ | | | | | | | | 630c8aa8 install: Allow generator expressions in DIRECTORY
| * install: Allow generator expressions in DIRECTORYYves Frederix2016-01-134-0/+9
| | | | | | | | | | Teach install(DIRECTORY) to support generator expressions in the list of directories, much like install(FILES) already supports.
* | Add -Werror and -Wno-error command-line optionsMichael Scott2016-01-1222-9/+95
|/ | | | | | | | | Expand the -W set of cmake options to include support for the -Werror and -Wno-error format, which is used to control upgrading and downgrading warning and error messages. Implement support for these new formats for the dev and deprecated message types. Add tests and updated documentation for new options.
* Merge topic 'xcode-global-attribute-variant'Brad King2016-01-072-1/+61
|\ | | | | | | | | | | | | | | d8bc26a0 Xcode: Parse variant and genex for CMAKE_XCODE_ATTRIBUTE (#14947) dc0ddb9e Xcode: Store configuration name along with XcodeObject (#14947) 28f98cee Xcode: Make CMAKE_XCODE_ATTRIBUTE calculation last step (#14947) 28db2268 Xcode: Factor out XCODE_ATTRIBUTE_ variant filter (#14947)
| * Xcode: Parse variant and genex for CMAKE_XCODE_ATTRIBUTE (#14947)Gregor Jasny2016-01-032-1/+61
| |
* | Xcode: Escape all backslashes in strings (#15328)Gregor Jasny2016-01-073-0/+11
|/ | | | | | | | | | Before this change backslashes in strings were escaped during compile flags adds via AppendFlag(). But global flags like OTHER_CPLUSPLUSFLAGS are not added as flags but as plain strings so they were not escaped properly. Now the escaping is performed within cmXCodeObject::PrintString() which ensures that strings are always encoded.
* cmake_parse_arguments: consider duplicate keyword as warningMatthias Maennich2015-12-172-3/+43
| | | | | | 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.
* CMakeParseArguments: replace by native cmake_parse_arguments commandMatthias Maennich2015-12-175-17/+9
| | | | | | | 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.
* CMakeParseArguments: add a RunCMake test suiteMatthias Maennich2015-12-1711-0/+185
|
* Merge topic 'ios-universal'Brad King2015-12-117-0/+160
|\ | | | | | | | | | | 565d080a Xcode: Add support for combined install on iOS 34f5ef56 iOS: Fix App Bundle layout
| * Xcode: Add support for combined install on iOSRuslan Baratov2015-12-107-0/+160
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | cmake: Teach -E make_directory to support multiple input directoriesBartosz Kosiorek2015-12-107-0/+18
|/
* Merge topic 'cmake-E-copy-multiple-inputs'Brad King2015-12-0910-0/+23
|\ | | | | | | | | | | | | | | 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
| * cmake: Teach -E copy_directory to support multiple input directoriesBartosz Kosiorek2015-12-0710-0/+23
| |
* | CPack: Added tests for package name and group controll fieldsDomen Vrankar2015-12-079-0/+80
|/
* cmake: Teach -E copy[_if_different] to support multiple files (#15703)Bartosz Kosiorek2015-12-0420-0/+35
| | | | | | 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.
* cmake: Improve '-E' help message formattingBartosz Kosiorek2015-12-044-4/+4
|
* iOS: Fix framework resource directory layout (#15848)Bartosz Kosiorek2015-12-035-4/+41
| | | | | | | | 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.
* Explicitly enable deprecated warnings by default.Michael Scott2015-12-013-1/+12
| | | | | | | | | | 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.
* Modify dev warning options to affect deprecated warnings.Michael Scott2015-12-011-0/+13
| | | | | | | | | | | 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.
* Add -W options to control deprecated warning messages.Michael Scott2015-12-014-0/+14
| | | | | | | | 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.
* Refactor the -W options parser to be generic.Michael Scott2015-12-015-1/+18
| | | | | | 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.
* Explicitly enable author (dev) warnings by default.Michael Scott2015-12-015-0/+14
| | | | | | | | | 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.
* Make message suppression more consistent.Michael Scott2015-11-303-3/+18
| | | | | | | | | | | | | | | | 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.
* Tests: Revise message in RunCMake.CommandLine -Wdev caseMichael Scott2015-11-303-3/+3
| | | | Use more prose-like capitalization.
* Merge topic 'fix-find_package-version-file-error-stack'Brad King2015-11-2511-0/+22
|\ | | | | | | | | | | | | 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
| * Merge branch 'test-cmake_policy-unmatched' into ↵Brad King2015-11-2418-0/+36
| |\ | | | | | | | | | fix-find_package-version-file-error-stack
| | * Tests: Add case for package version file unmatched policy scopeBrad King2015-11-2411-0/+22
| | |
| * | Merge branch 'fix-find_program-regression' into releaseBrad King2015-10-304-0/+14
| |\ \
* | \ \ Merge topic 'test-cmake_policy-unmatched'Brad King2015-11-257-0/+14
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | 378185fb Tests: Add case for unmatched cmake_policy({PUSH,POP})
| * | | Tests: Add case for unmatched cmake_policy({PUSH,POP})Brad King2015-11-247-0/+14
| | | |
* | | | Merge topic 'test-add_subdirectory-in-function'Brad King2015-11-244-0/+33
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 010c5959 Tests: Add case for add_subdirectory inside a function
| * | | | Tests: Add case for add_subdirectory inside a functionBrad King2015-11-234-0/+33
| |/ / /
* | | | Merge topic 'ninja-symbolic-custom-command'Brad King2015-11-202-0/+26
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | Ninja: Always re-run custom commands that have symbolic dependenciesBrad King2015-11-192-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Fix auto export symbols for Dlls containing /bigobj for 64bit builds.Bill Hoffman2015-11-191-0/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Add test for OSX/iOS Framework directory structure (#15833)Gregor Jasny2015-11-139-0/+131
| | | |
* | | | Merge topic 'fix-find_program-regression'Brad King2015-11-024-0/+14
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | 31e6571c find_program: Fix regression in finding an already-known path
| * | | find_program: Fix regression in finding an already-known pathBrad King2015-10-304-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | FindPkgConfig: return actual error when a package is not found (#15810)Benjamin Chrétien2015-10-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Tests: Disable parallel test execution while running ctest_testStephen Kelly2015-10-271-0/+1
| | | |
* | | | Tests: Don't overwrite RunCMake_TEST_FAILED variableStephen Kelly2015-10-271-5/+5
| | | |