summaryrefslogtreecommitdiffstats
path: root/Tests/IncludeDirectories/TargetIncludeDirectories/other.cpp
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-06-03 21:53:29 (GMT)
committerBrad King <brad.king@kitware.com>2013-06-05 13:05:00 (GMT)
commit5b222354de7060af409d0d80aa06180ed1b3ac64 (patch)
tree734190b0461bfc405c35b73c8dead770c29bc92b /Tests/IncludeDirectories/TargetIncludeDirectories/other.cpp
parent3aa9ce441f010362e404e6f9126ecd3028de76b9 (diff)
downloadCMake-5b222354de7060af409d0d80aa06180ed1b3ac64.zip
CMake-5b222354de7060af409d0d80aa06180ed1b3ac64.tar.gz
CMake-5b222354de7060af409d0d80aa06180ed1b3ac64.tar.bz2
Genex: Fix the HEAD target used for evaluated expressions
If the expression $<TARGET_PROPERTY:prop> appears in the content of a target property, the target that prop is read from is the 'head target' of the expression. In contexts such as evaluating the content of a target property during generation, such as INCLUDE_DIRECTORIES, the 'head target' is the one on which the initial request was made. If evaluating a generator expression which is not a target property content, the target must be explicitly specified. Such contexts include add_custom_command and file(GENERATE). The content might then look like $<TARGET_PROPERTY:tgt,prop> However, as there is no HeadTarget set, any generator expressions evaluated as part of reading prop from tgt which do not specify the tgt directly report an error. Modify the logic of the TARGET_PROPERTY generator expression so that in such contexts, the 'head target' is set to the appropriate target which was first encountered.
Diffstat (limited to 'Tests/IncludeDirectories/TargetIncludeDirectories/other.cpp')
-rw-r--r--Tests/IncludeDirectories/TargetIncludeDirectories/other.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/other.cpp b/Tests/IncludeDirectories/TargetIncludeDirectories/other.cpp
new file mode 100644
index 0000000..6673471
--- /dev/null
+++ b/Tests/IncludeDirectories/TargetIncludeDirectories/other.cpp
@@ -0,0 +1,6 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+int other() {
+ return 0;
+}