summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/File_Generate/GenerateSource-result.txt
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-11-04 22:24:54 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-11-12 21:36:45 (GMT)
commitb80557c7bdf12f9e924ac8b010d547ce4561848e (patch)
tree67b5bc2ed5509a7ab116bfa16e8757324c651ad3 /Tests/RunCMake/File_Generate/GenerateSource-result.txt
parent0019d54b6e4bfde7ef1c211a1c5e5bab194381b2 (diff)
downloadCMake-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.txt1
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