From: Matthias Maier Date: Sun, 22 Apr 2018 17:18:28 +0000 (-0500) Subject: Tests: Always create a small 'detailed.log' file X-Git-Tag: v9.0.0-rc1~134^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8623aae6cd10cd672d26d71125fd53c91cf6f5ec;p=dealii.git Tests: Always create a small 'detailed.log' file This ensures that scripts like `run_testsuite.cmake` always have the correct compiler versions at hand. --- diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cfa8b2ef60..412024e3df 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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)