diff options
Diffstat (limited to 'Tests/OutOfSource/OutOfSourceSubdir')
-rw-r--r-- | Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/OutOfSource/OutOfSourceSubdir/simple.cxx | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt b/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt index 02ab4f6..bbdaa55 100644 --- a/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt +++ b/Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt @@ -4,7 +4,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 ../simple.cxx) - TARGET_LINK_LIBRARIES(simple testlib) + TARGET_LINK_LIBRARIES(simple testlib outlib) ENDIF ("${PROJECT_SOURCE_DIR}" STREQUAL "${ANOTHER_PROJ_SOURCE_DIR}") # test getting a definition from a subdir diff --git a/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx b/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx index 3c9be09..124b7f9 100644 --- a/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx +++ b/Tests/OutOfSource/OutOfSourceSubdir/simple.cxx @@ -5,6 +5,7 @@ #include "testdp.h" extern int simple(); +extern "C" int outlib(); int main () { @@ -21,5 +22,9 @@ int main () { return -1; } + if(outlib() != 456) + { + return -4; + } return 0; } |