diff options
Diffstat (limited to 'Tests/OutOfSource/OutOfSourceSubdir')
-rw-r--r-- | Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/OutOfSource/OutOfSourceSubdir/simple.cxx | 11 |
2 files changed, 14 insertions, 1 deletions
diff --git a/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt b/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt index 412a1ca..3180f28 100644 --- a/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt +++ b/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt @@ -1,3 +1,5 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) + IF ("${PROJECT_SOURCE_DIR}" STREQUAL "${ANOTHER_PROJ_SOURCE_DIR}") SET(BUILD_SHARED_LIBS 1) ADD_LIBRARY(testlib testlib.cxx) @@ -5,3 +7,5 @@ IF ("${PROJECT_SOURCE_DIR}" STREQUAL "${ANOTHER_PROJ_SOURCE_DIR}") TARGET_LINK_LIBRARIES(simple testlib) ENDIF ("${PROJECT_SOURCE_DIR}" STREQUAL "${ANOTHER_PROJ_SOURCE_DIR}") +# test getting a definition from a subdir +SET (WEASELS SIZZLING) diff --git a/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx b/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx index cfb1f1a..e06777d 100644 --- a/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx +++ b/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx @@ -1,7 +1,16 @@ +#include <stdio.h> +#include <string.h> + #include "testlib.h" +#include "testdp.h" int main () -{ +{ + if (strcmp(animal,"SIZZLING")) + { + fprintf(stderr,"Get definitions from a subdir did not work\n"); + return -2; + } if(TestLib() != 1.0) { return -1; |