[Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt 1.10.2.1 1.10.2.2 testLib4lib.c NONE 1.1.2.2 testLib4libdbg.c NONE 1.1.2.2 testLib4libdbg1.c NONE 1.1.2.2 testLib4libopt.c NONE 1.1.2.2 testLib4libopt1.c NONE 1.1.2.2
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Sep 3 09:43:30 EDT 2008
Update of /cvsroot/CMake/CMake/Tests/ExportImport/Export
In directory public:/mounts/ram/cvs-serv18450/Tests/ExportImport/Export
Modified Files:
Tag: CMake-2-6
CMakeLists.txt
Added Files:
Tag: CMake-2-6
testLib4lib.c testLib4libdbg.c testLib4libdbg1.c
testLib4libopt.c testLib4libopt1.c
Log Message:
ENH: 2.6.2 rc 2 merge from main tree
--- NEW FILE: testLib4libopt1.c ---
#include "testLib4libopt.c"
--- NEW FILE: testLib4libdbg1.c ---
#include "testLib4libdbg.c"
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/ExportImport/Export/CMakeLists.txt,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -C 2 -d -r1.10.2.1 -r1.10.2.2
*** CMakeLists.txt 25 Mar 2008 23:59:00 -0000 1.10.2.1
--- CMakeLists.txt 3 Sep 2008 13:43:28 -0000 1.10.2.2
***************
*** 36,39 ****
--- 36,62 ----
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
+ # will work and the other one will fail to link. The import part of
+ # this test will try to use the symbol corresponding to the
+ # 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${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
+ LINK_INTERFACE_LIBRARIES
+ testLib4lib debug testLib4libdbg optimized testLib4libopt
+ )
+
add_executable(testExe3 testExe3.c)
set_property(TARGET testExe3 PROPERTY MACOSX_BUNDLE 1)
***************
*** 43,47 ****
TARGETS
testExe1 testLib1 testLib2 testExe2 testLib3 testLib4 testExe3
! testExe2lib
EXPORT exp
RUNTIME DESTINATION bin
--- 66,70 ----
TARGETS
testExe1 testLib1 testLib2 testExe2 testLib3 testLib4 testExe3
! testExe2lib testLib4lib testLib4libdbg testLib4libopt
EXPORT exp
RUNTIME DESTINATION bin
***************
*** 68,71 ****
--- 91,95 ----
)
export(TARGETS testExe2 testLib4 testExe3 testExe2lib
+ testLib4lib testLib4libdbg testLib4libopt
NAMESPACE bld_
APPEND FILE ExportBuildTree.cmake
--- NEW FILE: testLib4lib.c ---
int testLib4lib(void)
{
return 0;
}
--- NEW FILE: testLib4libopt.c ---
#ifdef LIB_OPT
/* We are building in testLib4libopt. Provide the correct symbol. */
int testLib4libopt(void)
{
return 0;
}
#else
/* We are not building in testLib4libopt. Poison the symbol. */
extern int testLib4libopt_noexist(void);
int testLib4libopt(void)
{
return testLib4libopt_noexist();
}
#endif
--- NEW FILE: testLib4libdbg.c ---
#ifdef LIB_DBG
/* We are building in testLib4libdbg. Provide the correct symbol. */
int testLib4libdbg(void)
{
return 0;
}
#else
/* We are not building in testLib4libdbg. Poison the symbol. */
extern int testLib4libdbg_noexist(void);
int testLib4libdbg(void)
{
return testLib4libdbg_noexist();
}
#endif
More information about the Cmake-commits
mailing list