summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/File_Generate
Commit message (Collapse)AuthorAgeFilesLines
* GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in TestsCraig Scott2017-12-301-1/+1
|
* Genex: Enable COMPILE_LANGUAGE for file(GENERATE) with Visual StudioBrad King2017-11-171-9/+7
| | | | Issue: #17435
* Tests: Decouple COMPILE_LANGUAGE in file(GENERATE) from COMPILE_OPTIONSBrad King2017-11-171-7/+1
| | | | | Simplify the `RunCMake.File_Generate` test `COMPILE_LANGUAGE-genex` case to avoid requiring support for the genex in `COMPILE_OPTIONS`.
* Tests: Remove unnecessary result files from RunCMake.File_GenerateBrad King2017-11-176-6/+0
| | | | The default result is "0" anyway.
* file(GENERATE): Add policy CMP0070 to define relative path behaviorBrad King2017-06-099-0/+78
| | | | | | | | | Previously `file(GENERATE)` did not define any behavior for relative paths given to the `OUTPUT` or `INPUT` arguments. Define behavior consistent with CMake conventions and add a policy to provide compatibility for projects that relied on the old accidental behavior. Fixes: #16786
* Tests: Use full output paths in file(GENERATE) callsBrad King2017-06-083-3/+3
| | | | | We don't define behavior for relative paths to the OUTPUT argument. Fix our tests to use full paths.
* Xcode: Drop support for Xcode versions below 3Brad King2017-04-221-1/+1
|
* Genex: Allow TARGET_OBJECTS to be used everywhereRobert Maynard2017-04-182-2/+4
| | | | | | | | | Previously the `TARGET_OBJECTS` generator expression was limited only to use in a buildsystem context so that Xcode's placeholders in object file paths can be evaluated. Lift this restriction so that the expression can at least be used in most settings. Co-Author: Brad King <brad.king@kitware.com>
* Genex: Reject TARGET_OBJECTS on non-object libraries earlierBrad King2017-04-181-4/+3
| | | | | | | | Move the diagnostic that rejects the TARGET_OBJECTS generator expression in non-buildsystem context until after the check for whether the named target is an object library. This order will makes more sense than the previous order once TARGET_OBJECTS is allowed in non-buildsystem context.
* Revise C++ coding style using clang-formatKitware Robot2016-05-162-2/+2
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* File(GENERATE): Process genex evaluation files for each language.Stephen Kelly2015-03-095-1/+32
|
* cmGlobalGenerator: Convert set insert algorithm to vector algorithms.Stephen Kelly2015-02-201-1/+1
| | | | Adjust test for new error output.
* RunCMake: Remove unneeded files.Stephen Kelly2015-02-095-5/+0
| | | | | The default expectation of RunCMake tests is empty content, so there is no need to specify it.
* file(GENERATE): Re-run cmake when appropriate.Stephen Kelly2014-11-194-0/+38
| | | | | | | | | | Re-run if the input file changes or if the output file is removed. This only works with the Makefile generators currently. The limitation of the Ninja generator is tracked as issue #15256. The IDE generators will need larger refactoring as they currently rely on being able to determine the depends and output files at the start of generate-time, which is too early for the file(GENERATE) case.
* file(GENERATE): Evaluate early to allow generating source filesStephen Kelly2014-11-1214-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | The evaluation files must be known before cmTargetTraceDependencies attempts to find them, but we must actually generate the files after cmTargetTraceDependencies, as that can add to target SOURCES. The limitation is that the generated output name must not depend on the SOURCES of a target if the generated file is used by that target. Mark the output files as GENERATED so that trace dependencies does not expect them to already exist in the filesystem. Move the invokation of ForceLinkerLanguage in the Generate logic to after the generated file names are known. ForceLinkerLanguage tries to determine the sources of a target (in order to determine an already-known language) and otherwise fails to get information about the generated file. Test that the output of file(GENERATE) can be used as a target source file and that accessing the target SOURCES in the name of the output file is an error. Accessing the TARGET_OBJECTS would be a similar error if it was legal to use that generator expression in this context. That is not currently possible and is a different error condition, so test the current error output as a reminder to change the expected output if that becomes possible in the future. Test that generated rule files resulting from cmTargetTraceDependencies appear in the SOURCES generated in the output file.
* file(GENERATE): Use permissions of input file if present.Stephen Kelly2014-11-045-0/+28
|
* Tests: Activate tests accidentally excluded from XcodeBrad King2014-07-171-2/+2
| | | | | | | | | The generator name is "Xcode", not "XCode". Fix this typo. Explicitly exclude the SubDirSpaces test on Xcode because it does not work. Also tell the RunCMake.File_Generate test when Xcode is not multi-config so it can exlcude the OutputConflict case. Inspired-by: Daniele E. Domenichelli <daniele.domenichelli@iit.it>
* Tests: Refactor RunCMake.File_Generate to drop RunCMake_TEST_FILEBrad King2014-06-304-5/+8
| | | | | Drop use of RunCMake_TEST_FILE and pass the test file in through a definition in RunCMake_TEST_OPTIONS.
* file(GENERATE): Only write the file if content is different.Stephen Kelly2014-04-304-0/+34
| | | | No policy is used to control this behavior for now.
* Cygwin: Avoid legacy warnings in RunCMake.* testsBrad King2013-08-131-1/+1
| | | | | | Set the minimum required version of CMake high enough to avoid the warning for CMAKE_LEGACY_CYGWIN_WIN32. The warning appears on stderr and breaks the expected output matching.
* file: Add GENERATE command to produce files at generate timeStephen Kelly2013-05-2419-0/+69
The idea is to write to a temp file which contains generator expressions, and at generate time, evaluate the generator expressions, and write the result to a file. Because executables on Windows are limited in the length of command line it is possible to use, it is common to write command line arguments to a file instead and specify the file as a source of arguments. This new FILE(GENERATE) subcommand allows the use of generator expressions to create such files so that they can be used with add_custom_command for example.