]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Prepare build system for porting the test suite to CMake
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 17 Aug 2013 02:44:13 +0000 (02:44 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 17 Aug 2013 02:44:13 +0000 (02:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@30329 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CMakeLists.txt
tests/CMakeLists.txt [new file with mode: 0644]

index 45d1ad2964e6d095c20da6769aacfb20178cb5fd..714613a8c7f85a71fb7ba5a089abfda27301942d 100644 (file)
@@ -49,7 +49,7 @@ FOREACH(_file ${_macro_files})
 ENDFOREACH()
 
 #
-# Check whether the doc and bundled folders are available:
+# Check for the existence of various optional folders:
 #
 IF(EXISTS ${CMAKE_SOURCE_DIR}/bundled/CMakeLists.txt)
   SET(DEAL_II_HAVE_BUNDLED_DIRECTORY TRUE)
@@ -59,6 +59,14 @@ IF(EXISTS ${CMAKE_SOURCE_DIR}/doc/CMakeLists.txt)
   SET(DEAL_II_HAVE_DOC_DIRECTORY TRUE)
 ENDIF()
 
+IF(NOT DEFINED TEST_DIR)
+  GET_FILENAME_COMPONENT(TEST_DIR "${CMAKE_SOURCE_DIR}" PATH)
+  SET(TEST_DIR "${TEST_DIR}/tests")
+ENDIF()
+IF(EXISTS ${TEST_DIR}/CMakeLists.txt)
+  SET(DEAL_II_HAVE_TESTS_DIRECTORY TRUE)
+ENDIF()
+
 #
 # We have to initialize some cached variables before PROJECT is called, so
 # do it at this point:
@@ -137,6 +145,10 @@ ADD_SUBDIRECTORY(cmake/config) # has to be included after source
 ADD_SUBDIRECTORY(contrib) # has to be included after source
 ADD_SUBDIRECTORY(examples)
 
+IF(DEAL_II_HAVE_TESTS_DIRECTORY)
+  ADD_SUBDIRECTORY(${TEST_DIR} ${CMAKE_BINARY_DIR}/tests)
+ENDIF()
+
 #
 # And finally, print the configuration:
 #
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644 (file)
index 0000000..dcca0f9
--- /dev/null
@@ -0,0 +1 @@
+ADD_CUSTOM_TARGET(foobar)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.