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

[cmake] Do not set CMAKE_CXX_STANDARD in JlCxxConfig.cmake #464

Open
thelfer opened this issue Jan 5, 2025 · 0 comments
Open

[cmake] Do not set CMAKE_CXX_STANDARD in JlCxxConfig.cmake #464

thelfer opened this issue Jan 5, 2025 · 0 comments

Comments

@thelfer
Copy link

thelfer commented Jan 5, 2025

JlCxxConfig.cmake sets CMAKE_CXX_STANDARD to 17 which makes it incompatible with project using newer standards (in my case the MFrontGenericInterfaceSupport: https://github.com/thelfer/MFrontGenericInterfaceSupport/)

One workaround is to do this ugly hack:

# julia-bindings (placed before compiler detection)
option(enable-julia-bindings "enable julia bindings support" OFF)
if(enable-julia-bindings)
  # The current version (0.16.0) of CxxWrap overrides the
  # CMAKE_CXX_STANDARD variables, so we reset it after
  # calling find_package to the current version
  set(_CMAKE_CXX_STANDARD "${CMAKE_CXX_STANDARD}")
  find_package(JlCxx REQUIRED)
  set(CMAKE_CXX_STANDARD "${_CMAKE_CXX_STANDARD}")
endif(enable-julia-bindings)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant