#
-# A small macro used for converting a cmake list <list> into a space
-# separated <string>:
+# A small macro used for converting a list into a space
+# separated string:
#
# Usage:
-# TO_STRING(string list)
+# TO_STRING(string ${list1} ${list2} ...)
#
-MACRO(TO_STRING variable list)
+MACRO(TO_STRING variable)
SET(${variable} "")
- FOREACH(var ${${list}})
+ FOREACH(var ${ARGN})
SET(${variable} "${${variable}} ${var}")
ENDFOREACH()
STRING(STRIP "${${variable}}" ${variable})
#
-# A small macro used for converting a cmake list <list> into a space
-# separated <string>. This macro adds the string <prefix> in front of each
-# element of the list <list>.
+# A small macro used for converting a cmake list into a space
+# separated string. This macro adds the string "prefix" in front of each
+# element of the list.
#
# Usage:
-# TO_STRING_AND_ADD_PREFIX(string list)
+# TO_STRING_AND_ADD_PREFIX(string "prefix" ${list1} ${list2} ...)
#
-MACRO(TO_STRING_AND_ADD_PREFIX variable prefix list)
+MACRO(TO_STRING_AND_ADD_PREFIX variable prefix)
SET(${variable} "")
- FOREACH(var ${${list}})
+ FOREACH(var ${ARGN})
SET(${variable} "${${variable}} ${prefix}${var}")
ENDFOREACH()
STRING(STRIP "${${variable}}" ${variable})
${CMAKE_CURRENT_BINARY_DIR}/deal.IIConfig.cmake
)
+ GET_CMAKE_PROPERTY(res VARIABLES)
+ FOREACH(var ${res})
+ IF(var MATCHES "DEAL_II_WITH")
+ FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/deal.IIConfig.cmake
+ "SET(${var} ${${var}})\n"
+ )
+ ENDIF()
+ ENDFOREACH()
+
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/deal.IIConfigVersion.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/deal.IIConfigVersion.cmake
# actually understands:
#
- TO_STRING(MAKEFILE_EXTERNAL_LIBRARIES DEAL_II_EXTERNAL_LIBRARIES)
- TO_STRING(MAKEFILE_LIBRARIES DEAL_II_LIBRARIES)
- ADD_FLAGS(MAKEFILE_EXTERNAL_LIBRARIES "${MAKEFILE_LIBRARIES}")
+ TO_STRING(MAKEFILE_LIBRARIES
+ ${DEAL_II_EXTERNAL_LIBRARIES}
+ ${DEAL_II_LIBRARIES}
+ )
- TO_STRING(MAKEFILE_EXTERNAL_DEFINITIONS DEAL_II_EXTERNAL_DEFINITIONS)
+ TO_STRING(MAKEFILE_DEFINITIONS
+ ${DEAL_II_EXTERNAL_DEFINITIONS}
+ )
- TO_STRING_AND_ADD_PREFIX(MAKEFILE_EXTERNAL_INCLUDES
+ TO_STRING_AND_ADD_PREFIX(MAKEFILE_INCLUDE_DIRS
"${CMAKE_INCLUDE_FLAG_C}"
- DEAL_II_EXTERNAL_INCLUDE_DIRS
+ ${DEAL_II_EXTERNAL_INCLUDE_DIRS}
+ ${DEAL_II_INCLUDE_DIRS}
)
CONFIGURE_FILE(
vpath %@static_lib_suffix@ $(LIBDIR)
vpath %@shared_lib_suffix@ $(LIBDIR)
-OBJEXT = @CMAKE_CXX_OUTPUT_EXTENSION@
+OBJEXT = o # TODO: @CMAKE_CXX_OUTPUT_EXTENSION@ :-*
EXEEXT = @EXEEXT@ # TODO
# set paths to all the libraries we need:
-lib-deal2.o = ${MAKEFILE_EXTERNAL_LIBRARIES}
-lib-deal2.g = ${MAKEFILE_EXTERNAL_LIBRARIES}
+lib-deal2.o = ${MAKEFILE_LIBRARIES}
+lib-deal2.g = ${MAKEFILE_LIBRARIES}
# necessary includes:
-INCLUDE = ${MAKEFILE_EXTERNAL_INCLUDES}
+INCLUDE = ${MAKEFILE_INCLUDE_DIRS}
# compiler flags for debug and optimized mode
-CXXFLAGS.g = @CMAKE_CXX_FLAGS@ @CMAKE_CXX_FLAGS_DEBUG@ @MAKEFILE_EXTERNAL_DEFINITIONS@ $(INCLUDE)
-CXXFLAGS.o = @CMAKE_CXX_FLAGS@ @CMAKE_CXX_FLAGS_RELEASE@ @MAKEFILE_EXTERNAL_DEFINITIONS@ $(INCLUDE)
+CXXFLAGS.g = @CMAKE_CXX_FLAGS@ @CMAKE_CXX_FLAGS_DEBUG@ @MAKEFILE_DEFINITIONS@ $(INCLUDE)
+CXXFLAGS.o = @CMAKE_CXX_FLAGS@ @CMAKE_CXX_FLAGS_RELEASE@ @MAKEFILE_DEFINITIONS@ $(INCLUDE)
# compile flags for C compiler
-CFLAGS.g = @CMAKE_C_FLAGS@ @CMAKE_C_FLAGS_DEBUG@ @MAKEFILE_EXTERNAL_DEFINITIONS@
-CFLAGS.o = @CMAKE_C_FLAGS@ @CMAKE_C_FLAGS_RELEASE@ @MAKEFILE_EXTERNAL_DEFINITIONS@
+CFLAGS.g = @CMAKE_C_FLAGS@ @CMAKE_C_FLAGS_DEBUG@ @MAKEFILE_DEFINITIONS@
+CFLAGS.o = @CMAKE_C_FLAGS@ @CMAKE_C_FLAGS_RELEASE@ @MAKEFILE_DEFINITIONS@
ifneq ($(enable-threads),no)
SET(DEAL_II_EXTERNAL_DEFINITIONS "${DEAL_II_EXTERNAL_DEFINITIONS}")
+#
+# Feature configuration of the deal.II library
+#
+
#
-# A suggested by the cmake documentation
+# As suggested by the cmake documentation
#
set(PACKAGE_VERSION "@DEAL_II_MAJOR@.@DEAL_II_MINOR@")