diff options
Diffstat (limited to 'Tests/RunCMake/SourceProperties')
6 files changed, 20 insertions, 0 deletions
diff --git a/Tests/RunCMake/SourceProperties/CMakeLists.txt b/Tests/RunCMake/SourceProperties/CMakeLists.txt new file mode 100644 index 0000000..a17c8cd --- /dev/null +++ b/Tests/RunCMake/SourceProperties/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8.4) +project(${RunCMake_TEST} C) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/SourceProperties/RelativeIncludeDir-result.txt b/Tests/RunCMake/SourceProperties/RelativeIncludeDir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/SourceProperties/RelativeIncludeDir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/SourceProperties/RelativeIncludeDir-stderr.txt b/Tests/RunCMake/SourceProperties/RelativeIncludeDir-stderr.txt new file mode 100644 index 0000000..cf146c2 --- /dev/null +++ b/Tests/RunCMake/SourceProperties/RelativeIncludeDir-stderr.txt @@ -0,0 +1,4 @@ +CMake Error in CMakeLists.txt: + Found relative path while evaluating include directories of "empty.c": + + "relative" diff --git a/Tests/RunCMake/SourceProperties/RelativeIncludeDir.cmake b/Tests/RunCMake/SourceProperties/RelativeIncludeDir.cmake new file mode 100644 index 0000000..08dffa8 --- /dev/null +++ b/Tests/RunCMake/SourceProperties/RelativeIncludeDir.cmake @@ -0,0 +1,4 @@ + +set_property (SOURCE empty.c PROPERTY INCLUDE_DIRECTORIES "relative") + +add_library (somelib empty.c) diff --git a/Tests/RunCMake/SourceProperties/RunCMakeTest.cmake b/Tests/RunCMake/SourceProperties/RunCMakeTest.cmake new file mode 100644 index 0000000..0982153 --- /dev/null +++ b/Tests/RunCMake/SourceProperties/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(RelativeIncludeDir) diff --git a/Tests/RunCMake/SourceProperties/empty.c b/Tests/RunCMake/SourceProperties/empty.c new file mode 100644 index 0000000..a9ec102 --- /dev/null +++ b/Tests/RunCMake/SourceProperties/empty.c @@ -0,0 +1,5 @@ + +int empty() +{ + return 0; +} |