# #
###########################################################################
-SET(_log "${CMAKE_BINARY_DIR}/summary.log")
-
-FILE(WRITE ${_log}
+SET(_log_detailed "${CMAKE_BINARY_DIR}/detailed.log")
+SET(_log_summary "${CMAKE_BINARY_DIR}/summary.log")
+FILE(REMOVE ${_log_detailed} ${_log_summary})
+
+MACRO(_both)
+ # Write to both log files:
+ FILE(APPEND ${_log_detailed} ${ARGN})
+ FILE(APPEND ${_log_summary} ${ARGN})
+ENDMACRO()
+MACRO(_detailed)
+ # Only write to detailed.log:
+ FILE(APPEND ${_log_detailed} ${ARGN})
+ENDMACRO()
+MACRO(_summary)
+ # Only write to summary.log:
+ FILE(APPEND ${_log_summary} ${ARGN})
+ENDMACRO()
+
+
+_both(
"###
#
# ${DEAL_II_PACKAGE_NAME} configuration:
# CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} on platform ${CMAKE_SYSTEM_NAME}
# ${CMAKE_CXX_COMPILER}
#
-# Compiler flags used for this build:
+"
+ )
+
+_detailed(
+"# Compiler flags used for this build:
# CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}
"
)
IF(CMAKE_BUILD_TYPE MATCHES "Release")
- FILE(APPEND ${_log} "# DEAL_II_CXX_FLAGS_RELEASE: ${DEAL_II_CXX_FLAGS_RELEASE}\n")
+ _detailed("# DEAL_II_CXX_FLAGS_RELEASE: ${DEAL_II_CXX_FLAGS_RELEASE}\n")
ENDIF()
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
- FILE(APPEND ${_log} "# DEAL_II_CXX_FLAGS_DEBUG: ${DEAL_II_CXX_FLAGS_DEBUG}\n")
+ _detailed("# DEAL_II_CXX_FLAGS_DEBUG: ${DEAL_II_CXX_FLAGS_DEBUG}\n")
ENDIF()
-FILE(APPEND ${_log} "# CMAKE_SHARED_LINKER_FLAGS: ${CMAKE_SHARED_LINKER_FLAGS}\n")
+_detailed("# CMAKE_SHARED_LINKER_FLAGS: ${CMAKE_SHARED_LINKER_FLAGS}\n")
IF(CMAKE_BUILD_TYPE MATCHES "Release")
- FILE(APPEND ${_log} "# DEAL_II_SHARED_LINKER_FLAGS_RELEASE: ${DEAL_II_SHARED_LINKER_FLAGS_RELEASE}\n")
+ _detailed("# DEAL_II_SHARED_LINKER_FLAGS_RELEASE: ${DEAL_II_SHARED_LINKER_FLAGS_RELEASE}\n")
ENDIF()
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
- FILE(APPEND ${_log} "# DEAL_II_SHARED_LINKER_FLAGS_DEBUG: ${DEAL_II_SHARED_LINKER_FLAGS_DEBUG}\n")
+ _detailed("# DEAL_II_SHARED_LINKER_FLAGS_DEBUG: ${DEAL_II_SHARED_LINKER_FLAGS_DEBUG}\n")
ENDIF()
+_detailed("#\n")
IF(NOT DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
- FILE(APPEND ${_log} "#\n# WARNING: DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS is set to OFF\n")
+ _both("# WARNING: DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS is set to OFF\n")
ENDIF()
-
-FILE(APPEND ${_log}
- "#\n# Configured Features ("
- )
+_both("# Configured Features (")
IF(DEFINED DEAL_II_ALLOW_BUNDLED)
- FILE(APPEND ${_log}
- "DEAL_II_ALLOW_BUNDLED = ${DEAL_II_ALLOW_BUNDLED}, "
- )
+ _both("DEAL_II_ALLOW_BUNDLED = ${DEAL_II_ALLOW_BUNDLED}, ")
ENDIF()
IF(DEAL_II_FORCE_AUTODETECTION)
- FILE(APPEND ${_log}
- "!!! DEAL_II_FORCE_AUTODETECTION=ON !!!, "
- )
+ _both("!!! DEAL_II_FORCE_AUTODETECTION=ON !!!, ")
ENDIF()
-FILE(APPEND ${_log}
- "DEAL_II_ALLOW_AUTODETECTION = ${DEAL_II_ALLOW_AUTODETECTION}):\n"
- )
+_both("DEAL_II_ALLOW_AUTODETECTION = ${DEAL_II_ALLOW_AUTODETECTION}):\n")
+
#
# Cache for quicker access:
# FEATURE is enabled
STRING(REGEX REPLACE "^DEAL_II_WITH_" "" _feature ${_var})
IF(FEATURE_${_feature}_EXTERNAL_CONFIGURED)
- FILE(APPEND ${_log} "# ${_var} set up with external dependencies\n")
+ _both("# ${_var} set up with external dependencies\n")
#
# Print the feature configuration:
( (NOT _var2 MATCHES "^(MPI|Boost)") AND
_var2 MATCHES "^${_feature}_(INCLUDE_DIRS|LIBRARIES|LINKER_FLAGS)$" )
)
- FILE(APPEND ${_log} "# ${_var2} = ${${_var2}}\n")
+ _detailed("# ${_var2} = ${${_var2}}\n")
ENDIF()
ENDFOREACH()
ELSEIF(FEATURE_${_feature}_BUNDLED_CONFIGURED)
IF(DEAL_II_FORCE_BUNDLED_${_feature})
- FILE(APPEND ${_log} "# ${_var} set up with bundled packages (forced)\n")
+ _both("# ${_var} set up with bundled packages (forced)\n")
ELSE()
- FILE(APPEND ${_log} "# ${_var} set up with bundled packages\n")
+ _both("# ${_var} set up with bundled packages\n")
ENDIF()
ENDIF()
ELSE()
# FEATURE is disabled
- FILE(APPEND ${_log} "# ( ${_var} = ${${_var}} )\n")
+ _both("# ( ${_var} = ${${_var}} )\n")
ENDIF()
ENDFOREACH()
-FILE(APPEND ${_log}
+_both(
"#\n# Component configuration:\n"
)
FOREACH(_var ${_components})
IF(_var MATCHES "DEAL_II_COMPONENT")
IF(${${_var}})
- FILE(APPEND ${_log} "# ${_var}\n")
+ _both("# ${_var}\n")
STRING(REPLACE "DEAL_II_COMPONENT_" "" _component ${_var})
LIST(APPEND _components ${_component})
ELSE()
- FILE(APPEND ${_log} "# ( ${_var} = ${${_var}} )\n")
+ _both("# ( ${_var} = ${${_var}} )\n")
ENDIF()
ENDIF()
ENDFOREACH()
-FILE(APPEND ${_log}
- "#\n###"
+_summary(
+ "#\n# Detailed information (compiler flags, feature configuration) can be found in detailed.log\n"
)
+
+_both("#\n###")
+