diff options
author | Brad King <brad.king@kitware.com> | 2008-08-12 21:27:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-08-12 21:27:48 (GMT) |
commit | 1712cd0a9874914f04514f5d35a204e9d30a8dea (patch) | |
tree | b8a7c9843b8eb62d0c548f0c5c40fa80fef47428 /Tests | |
parent | ec5f5b093fd5c1d7354a722e3d06f29fbabae7c4 (diff) | |
download | CMake-1712cd0a9874914f04514f5d35a204e9d30a8dea.zip CMake-1712cd0a9874914f04514f5d35a204e9d30a8dea.tar.gz CMake-1712cd0a9874914f04514f5d35a204e9d30a8dea.tar.bz2 |
BUG: Fix ExportImport test on VS6
Visual Studio 6 does not support per-target object files, so just use two
separate source file names in this case.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/ExportImport/Export/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/ExportImport/Export/testLib4libdbg1.c | 1 | ||||
-rw-r--r-- | Tests/ExportImport/Export/testLib4libopt1.c | 1 |
3 files changed, 10 insertions, 2 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 5ac0b36..f0c9017 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -35,6 +35,12 @@ set_property(TARGET testLib3 PROPERTY SOVERSION 3) add_library(testLib4 SHARED testLib4.c) set_property(TARGET testLib4 PROPERTY FRAMEWORK 1) +# Work-around: Visual Studio 6 does not support per-target object files. +set(VS6) +if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6") + set(VS6 1) +endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6") + # Test using the target_link_libraries command to set the # LINK_INTERFACE_LIBRARIES* properties. We construct two libraries # providing the same two symbols. In each library one of the symbols @@ -43,8 +49,8 @@ set_property(TARGET testLib4 PROPERTY FRAMEWORK 1) # configuration in which it is built. If the proper library is not # used via the link interface the import test will fail to link. add_library(testLib4lib STATIC testLib4lib.c) -add_library(testLib4libdbg STATIC testLib4libopt.c testLib4libdbg.c) -add_library(testLib4libopt STATIC testLib4libdbg.c testLib4libopt.c) +add_library(testLib4libdbg STATIC testLib4libopt.c testLib4libdbg${VS6}.c) +add_library(testLib4libopt STATIC testLib4libdbg.c testLib4libopt${VS6}.c) set_property(TARGET testLib4libdbg PROPERTY COMPILE_DEFINITIONS LIB_DBG) set_property(TARGET testLib4libopt PROPERTY COMPILE_DEFINITIONS LIB_OPT) target_link_libraries(testLib4 diff --git a/Tests/ExportImport/Export/testLib4libdbg1.c b/Tests/ExportImport/Export/testLib4libdbg1.c new file mode 100644 index 0000000..cc56cf9 --- /dev/null +++ b/Tests/ExportImport/Export/testLib4libdbg1.c @@ -0,0 +1 @@ +#include "testLib4libdbg.c" diff --git a/Tests/ExportImport/Export/testLib4libopt1.c b/Tests/ExportImport/Export/testLib4libopt1.c new file mode 100644 index 0000000..d9b5587 --- /dev/null +++ b/Tests/ExportImport/Export/testLib4libopt1.c @@ -0,0 +1 @@ +#include "testLib4libopt.c" |