]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Tests: Always create a small 'detailed.log' file 6284/head
authorMatthias Maier <tamiko@43-1.org>
Sun, 22 Apr 2018 17:18:28 +0000 (12:18 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sun, 22 Apr 2018 17:21:23 +0000 (12:21 -0500)
This ensures that scripts like `run_testsuite.cmake` always have the
correct compiler versions at hand.

tests/CMakeLists.txt

index cfa8b2ef6082416244543183bf6a453995b3ed81..412024e3dfaf8887505be76158ad25c334854da2 100644 (file)
@@ -30,6 +30,26 @@ MACRO(SET_IF_EMPTY _variable)
 ENDMACRO()
 
 SET_IF_EMPTY(MAKEOPTS $ENV{MAKEOPTS})
+SET_IF_EMPTY(DEAL_II_DIR $ENV{DEAL_II_DIR})
+
+#
+# A bit of necessary setup if tests are configured as a stand-alone
+# project:
+#
+
+IF(NOT DEFINED DEAL_II_HAVE_TESTS_DIRECTORY)
+  FIND_PACKAGE(deal.II 9.0.0 REQUIRED HINTS ${DEAL_II_DIR})
+  DEAL_II_INITIALIZE_CACHED_VARIABLES()
+  PROJECT(TESTSUITE CXX)
+  FILE(WRITE ${CMAKE_BINARY_DIR}/detailed.log
+    "#        CMAKE_CXX_COMPILER:     ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} on platform ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR}"
+    )
+ENDIF()
+
+#
+# A bit of necessary setup if tests are included via ADD_SUBDIRECTORY from
+# the top-level CMake project:
+#
 
 IF(DEFINED DEAL_II_HAVE_TESTS_DIRECTORY)
 

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.