summaryrefslogtreecommitdiffstats
path: root/Tests/SourcesProperty
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-07-08 18:18:42 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-02 21:14:02 (GMT)
commit81ad69e056d6c6dd2360e3345f6d99f268ee9e54 (patch)
tree3787019041ef423a2d62be2ca7a85599ee193712 /Tests/SourcesProperty
parent6e636f2ebaf78141f4d0a36c96804b9a1bc89857 (diff)
downloadCMake-81ad69e056d6c6dd2360e3345f6d99f268ee9e54.zip
CMake-81ad69e056d6c6dd2360e3345f6d99f268ee9e54.tar.gz
CMake-81ad69e056d6c6dd2360e3345f6d99f268ee9e54.tar.bz2
Make the SOURCES target property writable.
Diffstat (limited to 'Tests/SourcesProperty')
-rw-r--r--Tests/SourcesProperty/CMakeLists.txt2
-rw-r--r--Tests/SourcesProperty/iface.h2
-rw-r--r--Tests/SourcesProperty/main.cpp2
-rw-r--r--Tests/SourcesProperty/prop.cpp5
4 files changed, 10 insertions, 1 deletions
diff --git a/Tests/SourcesProperty/CMakeLists.txt b/Tests/SourcesProperty/CMakeLists.txt
index 0b3097e..6c99e00 100644
--- a/Tests/SourcesProperty/CMakeLists.txt
+++ b/Tests/SourcesProperty/CMakeLists.txt
@@ -8,3 +8,5 @@ set_property(TARGET iface PROPERTY INTERFACE_SOURCES iface.cpp)
add_executable(SourcesProperty main.cpp)
target_link_libraries(SourcesProperty iface)
+
+set_property(TARGET SourcesProperty APPEND PROPERTY SOURCES prop.cpp)
diff --git a/Tests/SourcesProperty/iface.h b/Tests/SourcesProperty/iface.h
index 2cac248..6da80a4 100644
--- a/Tests/SourcesProperty/iface.h
+++ b/Tests/SourcesProperty/iface.h
@@ -1,2 +1,4 @@
int iface();
+
+int prop();
diff --git a/Tests/SourcesProperty/main.cpp b/Tests/SourcesProperty/main.cpp
index ae4f305..33a97f4 100644
--- a/Tests/SourcesProperty/main.cpp
+++ b/Tests/SourcesProperty/main.cpp
@@ -3,5 +3,5 @@
int main(int argc, char** argv)
{
- return iface();
+ return iface() + prop();
}
diff --git a/Tests/SourcesProperty/prop.cpp b/Tests/SourcesProperty/prop.cpp
new file mode 100644
index 0000000..e343431
--- /dev/null
+++ b/Tests/SourcesProperty/prop.cpp
@@ -0,0 +1,5 @@
+
+int prop()
+{
+ return 0;
+}