-
Notifications
You must be signed in to change notification settings - Fork 442
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
Fix CMakes #250
base: master
Are you sure you want to change the base?
Fix CMakes #250
Conversation
Prefix options with RTTR_ and if it's added as a subdirectory, turn everything off (examples, docs, etc.)
option(CUSTOM_DOXYGEN_STYLE "Enable this option to use a custom doxygen style for HTML documentation; Otherwise the default will be used" ON) | ||
option(BUILD_WEBSITE_DOCU "Enable this option to create the special docu for the website" OFF) | ||
|
||
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what is this if
and the code below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This if
will get fired only if you open this project CMakeLists.txt
as a top, standalone project, but it will not if it's parsed for example from add_subdirectory(vendor/rttr)
NAMESPACE RTTR:: | ||
FILE rttr-config.cmake) | ||
if (RTTR_BUILD_INSTALLER) | ||
install(EXPORT rttr_targets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should go with 4 spaces here for indention
|
Mainly - if you're building this project alone, as a standalone library - it's working as it was, but if you're just a client and do something like And why prefix it? Here is a snippet from root
Right now, it will fail to parse my project, because docs are default to But I need to set those variables before I So prefixing them with |
Okay I got it, that the variable names will leak to other libraries. So this change is okay. However, I don't like this implicit behavior. When you do it in this context then the variables defaults will changes. Please just set the variables default how you like it before calling |
Prefix options with RTTR_ and if it's added as a subdirectory, turn everything off (examples, docs, etc.)