[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.4 1.5 imp_testExe1.c 1.3 1.4

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Aug 11 16:23:12 EDT 2008


Update of /cvsroot/CMake/CMake/Tests/ExportImport/Import
In directory public:/mounts/ram/cvs-serv3016/Tests/ExportImport/Import

Modified Files:
	CMakeLists.txt imp_testExe1.c 
Log Message:
ENH: Test target_link_libraries INTERFACE option


Index: imp_testExe1.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/ExportImport/Import/imp_testExe1.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** imp_testExe1.c	28 Jan 2008 19:46:16 -0000	1.3
--- imp_testExe1.c	11 Aug 2008 20:23:10 -0000	1.4
***************
*** 4,11 ****
  extern int testLib3();
  extern int testLib4();
  
  int main()
  {
    return (testLib2() + generated_by_testExe1() + testLib3() + testLib4()
!           + generated_by_testExe3());
  }
--- 4,21 ----
  extern int testLib3();
  extern int testLib4();
+ extern int testLib4lib();
+ 
+ /* Switch a symbol between debug and optimized builds to make sure the
+    proper library is found from the testLib4 link interface.  */
+ #ifdef EXE_DBG
+ # define testLib4libcfg testLib4libdbg
+ #else
+ # define testLib4libcfg testLib4libopt
+ #endif
+ extern testLib4libcfg(void);
  
  int main()
  {
    return (testLib2() + generated_by_testExe1() + testLib3() + testLib4()
!           + generated_by_testExe3() + testLib4lib() + testLib4libcfg());
  }

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/ExportImport/Import/CMakeLists.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -C 2 -d -r1.4 -r1.5
*** CMakeLists.txt	25 Mar 2008 15:26:51 -0000	1.4
--- CMakeLists.txt	11 Aug 2008 20:23:10 -0000	1.5
***************
*** 33,36 ****
--- 33,37 ----
  # Try linking to a library imported from the install tree.
  target_link_libraries(imp_testExe1 exp_testLib2 exp_testLib3 exp_testLib4)
+ set_property(TARGET imp_testExe1 PROPERTY COMPILE_DEFINITIONS_DEBUG EXE_DBG)
  
  # Try building a plugin to an executable imported from the install tree.
***************
*** 58,61 ****
--- 59,63 ----
  # Try linking to a library imported from the build tree.
  target_link_libraries(imp_testExe1b bld_testLib2 bld_testLib3 bld_testLib4)
+ set_property(TARGET imp_testExe1b PROPERTY COMPILE_DEFINITIONS_DEBUG EXE_DBG)
  
  # Try building a plugin to an executable imported from the build tree.



More information about the Cmake-commits mailing list