# TODO: A comment
#
-MACRO(DEAL_II_ADD_C_LIBRARY name)
+MACRO(DEAL_II_ADD_C_LIBRARY library)
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
#
# and a debug target
#
- ADD_LIBRARY(${name}.g
+ ADD_LIBRARY(${library}_debug
${ARGN}
)
- SET_TARGET_PROPERTIES(${name}.g PROPERTIES
+ SET_TARGET_PROPERTIES(${library}_debug PROPERTIES
LINK_FLAGS "${DEAL_II_SHARED_LINKER_FLAGS_DEBUG}"
COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_DEBUG}"
COMPILE_FLAGS "${DEAL_II_C_FLAGS_DEBUG}"
)
- SET(deal_ii_objects.g
- ${deal_ii_objects.g}
- $<TARGET_OBJECTS:${name}.g>
- PARENT_SCOPE
+ FILE(APPEND
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/deal_ii_objects_debug
+ "$<TARGET_OBJECTS:${library}_debug>\n"
)
-
ENDIF()
IF(CMAKE_BUILD_TYPE MATCHES "Release")
#
# Add a release target
#
- ADD_LIBRARY(${name}
+ ADD_LIBRARY(${library}
${ARGN}
)
- SET_TARGET_PROPERTIES(${name} PROPERTIES
+ SET_TARGET_PROPERTIES(${library} PROPERTIES
LINK_FLAGS "${DEAL_II_SHARED_LINKER_FLAGS_RELEASE}"
COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_RELEASE}"
COMPILE_FLAGS "${DEAL_II_C_FLAGS_RELEASE}"
)
- SET(deal_ii_objects
- ${deal_ii_objects}
- $<TARGET_OBJECTS:${name}>
- PARENT_SCOPE
+ FILE(APPEND
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/deal_ii_objects
+ "$<TARGET_OBJECTS:${library}>\n"
)
ENDIF()
MACRO(DEAL_II_ADD_DEFINITIONS name)
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
- GET_TARGET_PROPERTY(macro_definitions ${name}.g COMPILE_DEFINITIONS)
- SET_TARGET_PROPERTIES(${name}.g PROPERTIES
+ GET_TARGET_PROPERTY(macro_definitions ${name}_debug COMPILE_DEFINITIONS)
+ SET_TARGET_PROPERTIES(${name}_debug PROPERTIES
COMPILE_DEFINITIONS "${ARGN};${macro_definitions}"
)
ENDIF()
MACRO(DEAL_II_ADD_DEPENDENCIES name target)
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
- ADD_DEPENDENCIES(${name}.g ${target}.g)
+ ADD_DEPENDENCIES(${name}_debug ${target}_debug)
ENDIF()
IF(CMAKE_BUILD_TYPE MATCHES "Release")
# TODO: A comment
#
-MACRO(DEAL_II_ADD_LIBRARY name)
+MACRO(DEAL_II_ADD_LIBRARY library)
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
#
# and a debug target
#
- ADD_LIBRARY(${name}.g
+ ADD_LIBRARY(${library}_debug
${ARGN}
)
- SET_TARGET_PROPERTIES(${name}.g PROPERTIES
+ SET_TARGET_PROPERTIES(${library}_debug PROPERTIES
LINK_FLAGS "${DEAL_II_SHARED_LINKER_FLAGS_DEBUG}"
COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_DEBUG}"
COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_DEBUG}"
)
- SET(deal_ii_objects.g
- ${deal_ii_objects.g}
- $<TARGET_OBJECTS:${name}.g>
- PARENT_SCOPE
+ FILE(APPEND
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/deal_ii_objects_debug
+ "$<TARGET_OBJECTS:${library}_debug>\n"
)
-
ENDIF()
IF(CMAKE_BUILD_TYPE MATCHES "Release")
#
# Add a release target
#
- ADD_LIBRARY(${name}
+ ADD_LIBRARY(${library}
${ARGN}
)
- SET_TARGET_PROPERTIES(${name} PROPERTIES
+ SET_TARGET_PROPERTIES(${library} PROPERTIES
LINK_FLAGS "${DEAL_II_SHARED_LINKER_FLAGS_RELEASE}"
COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_RELEASE}"
COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_RELEASE}"
)
- SET(deal_ii_objects
- ${deal_ii_objects}
- $<TARGET_OBJECTS:${name}>
- PARENT_SCOPE
+ FILE(APPEND
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/deal_ii_objects
+ "$<TARGET_OBJECTS:${library}>\n"
)
ENDIF()
# before target will be processed.
#
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
- ADD_DEPENDENCIES(${target}.g ${target}.inst)
+ ADD_DEPENDENCIES(${target}_debug ${target}.inst)
ENDIF()
IF(CMAKE_BUILD_TYPE MATCHES "Release")
ADD_DEPENDENCIES(${target} ${target}.inst)
#
# Combine all debug OBJECT targets to a debug library:
#
+ FILE(STRINGS
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/deal_ii_objects_debug
+ deal_ii_objects_debug
+ )
ADD_LIBRARY(${DEAL_II_BASE_NAME}${DEAL_II_DEBUG_SUFFIX}
- ${deal_ii_objects.g}
+ ${deal_ii_objects_debug}
)
SET_TARGET_PROPERTIES(${DEAL_II_BASE_NAME}${DEAL_II_DEBUG_SUFFIX}
#
# Combine all release OBJECT targets to a release library:
#
+ FILE(STRINGS
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/deal_ii_objects
+ deal_ii_objects
+ )
ADD_LIBRARY(${DEAL_II_BASE_NAME}
${deal_ii_objects}
)
ENDIF()
+MESSAGE("${deal_ii_objects_debug}")