## ---------------------------------------------------------------------
#
-# This file provides an insource version of the DEAL_II_SETUP_TARGET macro.
+# This file provides an "insource" version of the DEAL_II_SETUP_TARGET macro.
#
# Usage:
-# deal_ii_insource_setup_target(target build)
+# insource_setup_target(target build)
#
# This appends necessary include directories, linker flags, compile
# definitions and the deal.II library link interface to the given target.
#
-#
-macro(deal_ii_insource_setup_target _target _build)
+function(insource_setup_target _target _build)
string(TOLOWER ${_build} _build_lowercase)
set_target_properties(${_target} PROPERTIES
target_compile_definitions(${_target}
PUBLIC ${DEAL_II_DEFINITIONS} ${DEAL_II_DEFINITIONS_${_build}}
)
-
endif()
-get_property(_type TARGET ${_target} PROPERTY TYPE)
-if(NOT "${_type}" STREQUAL "OBJECT_LIBRARY")
- target_link_libraries(${_target} ${DEAL_II_NAMESPACE}_${_build_lowercase})
-endif()
+ get_property(_type TARGET ${_target} PROPERTY TYPE)
+ if(NOT "${_type}" STREQUAL "OBJECT_LIBRARY")
+ target_link_libraries(${_target} ${DEAL_II_NAMESPACE}_${_build_lowercase})
+ endif()
-endmacro()
+endfunction()
foreach(_build ${DEAL_II_BUILD_TYPES})
string(TOLOWER ${_build} _build_lowercase)
add_executable(${_name}.${_build_lowercase} ${_step})
- deal_ii_insource_setup_target(${_name}.${_build_lowercase} ${_build})
+ insource_setup_target(${_name}.${_build_lowercase} ${_build})
set_target_properties(${_name}.${_build_lowercase}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_EXECUTABLE_RELDIR}"
foreach(_build ${DEAL_II_BUILD_TYPES})
string(TOLOWER ${_build} _build_lowercase)
add_executable(${_name}.${_build_lowercase} ${_step})
- deal_ii_insource_setup_target(${_name}.${_build_lowercase} ${_build})
+ insource_setup_target(${_name}.${_build_lowercase} ${_build})
set_target_properties(${_name}.${_build_lowercase}
PROPERTIES
set(_target ${test_basename}.${_build_lowercase})
list(APPEND ALL_TESTS "${_target}")
add_executable(${_target} EXCLUDE_FROM_ALL ${test_basename}.cc)
- deal_ii_insource_setup_target(${_target} ${build_name})
+ insource_setup_target(${_target} ${build_name})
if("${mpi_run}" STREQUAL "")
set(_command ${_target})