diff options
author | Marc Chevrier <marc.chevrier@sap.com> | 2017-12-21 16:03:18 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@sap.com> | 2018-01-24 14:10:10 (GMT) |
commit | 044831117955dfa33ed4e0c7799ea3f37258b149 (patch) | |
tree | a443e5f1695bc9290ac7a8c27e4d0df019146a8d /Tests/SourceFileIncludeDirProperty | |
parent | 3073bd1f3deecaaf090202075382e372a3b3656a (diff) | |
download | CMake-044831117955dfa33ed4e0c7799ea3f37258b149.zip CMake-044831117955dfa33ed4e0c7799ea3f37258b149.tar.gz CMake-044831117955dfa33ed4e0c7799ea3f37258b149.tar.bz2 |
sourceFile properties: add property INCLUDE_DIRECTORIES
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" |