diff options
Diffstat (limited to 'Tests/SourcesProperty')
-rw-r--r-- | Tests/SourcesProperty/CMakeLists.txt | 12 | ||||
-rw-r--r-- | Tests/SourcesProperty/iface.cpp | 5 | ||||
-rw-r--r-- | Tests/SourcesProperty/iface.h | 4 | ||||
-rw-r--r-- | Tests/SourcesProperty/main.cpp | 7 | ||||
-rw-r--r-- | Tests/SourcesProperty/prop.cpp | 5 |
5 files changed, 33 insertions, 0 deletions
diff --git a/Tests/SourcesProperty/CMakeLists.txt b/Tests/SourcesProperty/CMakeLists.txt new file mode 100644 index 0000000000..6c99e00745 --- /dev/null +++ b/Tests/SourcesProperty/CMakeLists.txt @@ -0,0 +1,12 @@ + +cmake_minimum_required(VERSION 3.0) + +project(SourcesProperty) + +add_library(iface INTERFACE) +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.cpp b/Tests/SourcesProperty/iface.cpp new file mode 100644 index 0000000000..e38ac3778b --- /dev/null +++ b/Tests/SourcesProperty/iface.cpp @@ -0,0 +1,5 @@ + +int iface() +{ + return 0; +} diff --git a/Tests/SourcesProperty/iface.h b/Tests/SourcesProperty/iface.h new file mode 100644 index 0000000000..6da80a4edf --- /dev/null +++ b/Tests/SourcesProperty/iface.h @@ -0,0 +1,4 @@ + +int iface(); + +int prop(); diff --git a/Tests/SourcesProperty/main.cpp b/Tests/SourcesProperty/main.cpp new file mode 100644 index 0000000000..33a97f4bea --- /dev/null +++ b/Tests/SourcesProperty/main.cpp @@ -0,0 +1,7 @@ + +#include "iface.h" + +int main(int argc, char** argv) +{ + return iface() + prop(); +} diff --git a/Tests/SourcesProperty/prop.cpp b/Tests/SourcesProperty/prop.cpp new file mode 100644 index 0000000000..e343431751 --- /dev/null +++ b/Tests/SourcesProperty/prop.cpp @@ -0,0 +1,5 @@ + +int prop() +{ + return 0; +} |