diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-11-04 22:24:54 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-11-12 21:36:45 (GMT) |
commit | b80557c7bdf12f9e924ac8b010d547ce4561848e (patch) | |
tree | 67b5bc2ed5509a7ab116bfa16e8757324c651ad3 /Tests/RunCMake/File_Generate/GenerateSource-result.txt | |
parent | 0019d54b6e4bfde7ef1c211a1c5e5bab194381b2 (diff) | |
download | CMake-b80557c7bdf12f9e924ac8b010d547ce4561848e.zip CMake-b80557c7bdf12f9e924ac8b010d547ce4561848e.tar.gz CMake-b80557c7bdf12f9e924ac8b010d547ce4561848e.tar.bz2 |
file(GENERATE): Evaluate early to allow generating source files
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.
Diffstat (limited to 'Tests/RunCMake/File_Generate/GenerateSource-result.txt')
-rw-r--r-- | Tests/RunCMake/File_Generate/GenerateSource-result.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/RunCMake/File_Generate/GenerateSource-result.txt b/Tests/RunCMake/File_Generate/GenerateSource-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/File_Generate/GenerateSource-result.txt @@ -0,0 +1 @@ +0 |