# Add compile flags, definitions and (public) feature (recorded in
# DEAL_II_TARGETS(|_DEBUG|_RELEASE)).
#
- populate_target_properties(${DEAL_II_NAMESPACE}_${build_lowercase} ${build})
+ populate_target_properties(${DEAL_II_TARGET_NAME}_${build_lowercase} ${build})
+ #
+ # Record the expected C++ standard as a compile feature. This target
+ # property ensures that support for our expected C++ standard is always
+ # enabled in client user code irrespective of what compile flags/options
+ # they have set.
+ #
+ target_compile_features(${DEAL_II_NAMESPACE}_${build_lowercase}
+ INTERFACE cxx_std_${CMAKE_CXX_STANDARD}
+ )
+
if(BUILD_SHARED_LIBS)
#
# Add all object targets as private link targets
#
get_property(_object_targets GLOBAL PROPERTY DEAL_II_OBJECT_TARGETS_${build})
- target_link_libraries(${DEAL_II_NAMESPACE}_${build_lowercase}
+ target_link_libraries(${DEAL_II_TARGET_NAME}_${build_lowercase}
PRIVATE ${_object_targets}
)
- endif()
+ endif()
- set_target_properties(${DEAL_II_NAMESPACE}_${build_lowercase}
+ set_target_properties(${DEAL_II_TARGET_NAME}_${build_lowercase}
PROPERTIES
LINKER_LANGUAGE "CXX"
VERSION "${DEAL_II_PACKAGE_VERSION}"