summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt3
-rw-r--r--Tests/OutOfSource/OutOfSourceSubdir/simple.cxx6
2 files changed, 9 insertions, 0 deletions
diff --git a/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt b/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt
index f3d3785..412a1ca 100644
--- a/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt
+++ b/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt
@@ -1,4 +1,7 @@
IF ("${PROJECT_SOURCE_DIR}" STREQUAL "${ANOTHER_PROJ_SOURCE_DIR}")
+ SET(BUILD_SHARED_LIBS 1)
+ ADD_LIBRARY(testlib testlib.cxx)
ADD_EXECUTABLE (simple simple.cxx)
+ TARGET_LINK_LIBRARIES(simple testlib)
ENDIF ("${PROJECT_SOURCE_DIR}" STREQUAL "${ANOTHER_PROJ_SOURCE_DIR}")
diff --git a/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx b/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx
index 1482f27..cfb1f1a 100644
--- a/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx
+++ b/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx
@@ -1,4 +1,10 @@
+#include "testlib.h"
+
int main ()
{
+ if(TestLib() != 1.0)
+ {
+ return -1;
+ }
return 0;
}