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 improvements - expose ifs in options #10

Closed
Xeverous opened this issue Nov 19, 2019 · 3 comments
Closed

CMake improvements - expose ifs in options #10

Xeverous opened this issue Nov 19, 2019 · 3 comments

Comments

@Xeverous
Copy link
Contributor

The following switch is not visible in cmake -L or in the cmake-gui. A library user is not aware of being able to disable examples unless the variable is added blindly.

elements/CMakeLists.txt

Lines 19 to 21 in 9e73461

if (NOT ELEMENTS_NO_EXAMPLES)
add_subdirectory(examples)
endif()

With modern CMake, it is recommended to do such thing instead:

option(ELEMENTS_BUILD_EXAMPLES "build Elements library examples" ON)

if (NOT ELEMENTS_BUILD_EXAMPLES) 
    add_subdirectory(examples) 
endif() 

Would you like a PR for this?

@djowel
Copy link
Collaborator

djowel commented Nov 19, 2019

Would you like a PR for this?

Absolutely!

@Xeverous
Copy link
Contributor Author

Which branch should I target with PRs? develop?

@djowel
Copy link
Collaborator

djowel commented Nov 19, 2019

Which branch should I target with PRs? develop?

develop please

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

2 participants