Open fbudin69500 opened 8 years ago
Thanks for creating the report.
My first idea would be to extend the SEMMacroBuildCLI
API to accept an optional multi value parameters named COMPILE_FEATURES
.
They could be listed doing something like this:
SEMMacroBuildCLI(
NAME ${MODULE_NAME}
LOGO_HEADER ${Slicer_SOURCE_DIR}/Resources/ITKLogo.h
TARGET_LIBRARIES ${ITK_LIBRARIES}
COMPILE_FEATURES
PRIVATE cxx_digit_separators cxx_generic_lambdas
PUBLIC cxx_alias_templates
)
If there are features we could generally expect to be available for all CLI, a variable named SlicerExecutionModel_REQUIRED_COMPILE_FEATURES
could also be hardcoded in the SlicerExecutionModel
project ...
When compiling a target that has specific C++ requirements, one can use the new CMake function target_compile_features() [1].
There is currently no way of passing these requirements to
SEMMacroBuildCLI
, and the targets created in the macro are not exposed to the user. It would be great to either be able:Note: Both solutions are not mutually exclusive and even if 1) is implemented, 2) might still be useful in certain corner cases.
[1] https://cmake.org/cmake/help/v3.6/command/target_compile_features.html