[cmake-commits] hoffman committed CMakeLists.txt 1.44 1.45

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jan 30 12:04:40 EST 2008


Update of /cvsroot/CMake/CMake/Tests
In directory public:/mounts/ram/cvs-serv31553/Tests

Modified Files:
	CMakeLists.txt 
Log Message:
ENH: fix for bug 3218 dependant projects are written out automatically if they are in the project.  Also fix bug 5829, remove hard coded CMAKE_CONFIGURATION_TYPES from vs 7 generator


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CMakeLists.txt,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- CMakeLists.txt	28 Jan 2008 13:40:20 -0000	1.44
+++ CMakeLists.txt	30 Jan 2008 17:04:38 -0000	1.45
@@ -52,7 +52,40 @@
   ADD_TEST_MACRO(SourceGroups SourceGroups)
   ADD_TEST_MACRO(Preprocess Preprocess)
   ADD_TEST_MACRO(ExportImport ExportImport)
-  
+
+  # test for correct sub-project generation
+  # not implemented in VS6 or Xcode
+  IF(NOT MSVC60 AND NOT XCODE)
+    # run cmake and configure all of SubProject
+    # but only build the independent executable car
+    ADD_TEST(SubProject ${CMAKE_CTEST_COMMAND}
+      --build-and-test
+      "${CMake_SOURCE_DIR}/Tests/SubProject"
+      "${CMake_BINARY_DIR}/Tests/SubProject"
+      --build-project SubProject
+      --build-generator ${CMAKE_TEST_GENERATOR}
+      --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+      --build-target car
+      --test-command car
+      )
+    # For stage 2, do not run cmake again.
+    # Then build the foo sub project which should build
+    # the bar library which should be referenced because
+    # foo links to the static library bar, but bar is not
+    # directly in the foo sub project
+    ADD_TEST(SubProject-Stage2  ${CMAKE_CTEST_COMMAND}
+      --build-and-test
+      "${CMake_SOURCE_DIR}/Tests/SubProject/foo"
+      "${CMake_BINARY_DIR}/Tests/SubProject/foo" 
+      --build-generator ${CMAKE_TEST_GENERATOR}
+      --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+      --build-nocmake 
+      --build-project foo
+      --build-target foo
+      --test-command foo
+      )
+  ENDIF(NOT MSVC60 AND NOT XCODE)
+
   IF (CMAKE_STRICT)
     ADD_TEST_MACRO(DocTest DocTest)
   ENDIF (CMAKE_STRICT)
@@ -505,7 +538,6 @@
     ENDIF(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG)
   ENDIF("${CMAKE_SYSTEM_NAME}" MATCHES syllable)
 
-
   ADD_TEST(linkorder1 ${CMAKE_CTEST_COMMAND}
     --build-and-test
     "${CMake_SOURCE_DIR}/Tests/LinkLineOrder"



More information about the Cmake-commits mailing list