Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for CMake function target_compile_features #83

Open
fbudin69500 opened this issue Sep 26, 2016 · 1 comment
Open

Add support for CMake function target_compile_features #83

fbudin69500 opened this issue Sep 26, 2016 · 1 comment

Comments

@fbudin69500
Copy link
Member

fbudin69500 commented Sep 26, 2016

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:

  1. to pass the requirements to the CMake macro or
  2. to expose the list of targets created by the macro.

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

@jcfr
Copy link
Member

jcfr commented Sep 26, 2016

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 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants