diff options
Diffstat (limited to 'Tests/SourceFileIncludeDirProperty')
-rw-r--r-- | Tests/SourceFileIncludeDirProperty/CMakeLists.txt | 15 | ||||
-rw-r--r-- | Tests/SourceFileIncludeDirProperty/main.c | 7 | ||||
-rw-r--r-- | Tests/SourceFileIncludeDirProperty/source/header.h | 2 | ||||
-rw-r--r-- | Tests/SourceFileIncludeDirProperty/target/header.h | 2 |
4 files changed, 26 insertions, 0 deletions
diff --git a/Tests/SourceFileIncludeDirProperty/CMakeLists.txt b/Tests/SourceFileIncludeDirProperty/CMakeLists.txt new file mode 100644 index 0000000..786d5b6 --- /dev/null +++ b/Tests/SourceFileIncludeDirProperty/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.0) + +project(SourceFileIncludeDirProperty C) + +# +# Check that source level include directory take +# precedence over target one + +add_executable(SourceFileIncludeDirProperty main.c) + +set_property (TARGET SourceFileIncludeDirProperty + PROPERTY INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/target") + +set_property (SOURCE main.c + PROPERTY INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/source") diff --git a/Tests/SourceFileIncludeDirProperty/main.c b/Tests/SourceFileIncludeDirProperty/main.c new file mode 100644 index 0000000..36144ca --- /dev/null +++ b/Tests/SourceFileIncludeDirProperty/main.c @@ -0,0 +1,7 @@ + +#include "header.h" + +int main() +{ + return 0; +} diff --git a/Tests/SourceFileIncludeDirProperty/source/header.h b/Tests/SourceFileIncludeDirProperty/source/header.h new file mode 100644 index 0000000..0c6f241 --- /dev/null +++ b/Tests/SourceFileIncludeDirProperty/source/header.h @@ -0,0 +1,2 @@ + +/* used header file */ diff --git a/Tests/SourceFileIncludeDirProperty/target/header.h b/Tests/SourceFileIncludeDirProperty/target/header.h new file mode 100644 index 0000000..71c1521 --- /dev/null +++ b/Tests/SourceFileIncludeDirProperty/target/header.h @@ -0,0 +1,2 @@ + +#error "wrong header file" |