10000 Rename BUILD_TESTING to QCORO_BUILD_TESTING · Issue #233 · qcoro/qcoro · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Rename BUILD_TESTING to QCORO_BUILD_TESTING #233

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

Closed
kelteseth opened this issue Jul 29, 2024 · 1 comment · Fixed by #236
Closed

Rename BUILD_TESTING to QCORO_BUILD_TESTING #233

kelteseth opened this issue Jul 29, 2024 · 1 comment · Fixed by #236

Comments

@kelteseth
Copy link

Examples and testing executables are features that I do not need when consuming the library. Now, I can easily disable them in my CMakePresets.json, but BUILD_TESTING should have the QCORO_ prefix and a dedicated option. Now I have to hope that no other third party library that I use, uses the same flag :)

image

@danvratil
Copy link
Collaborator

Hi, BUILD_TESTING is a standard CMake option to toggle whether tests are built or not.

Depending on how you are using the library you can turn them off selectively - if you are using ExternalProject, just pass -DBUILD_TESTING=OFF in the configure step. If you are just using add_subdirectory() on a git submodule, you can set(BUILD_TESTING OFF) before adding the subdirectory and then either restore it to its previous value or turn it back on afterwards.

Although I see no harm in adding QCORO_ENABLE_TESTING to disable building QCoro tests, alongside the BUILD_TESTING variable itself.

danvratil added a commit that referenced this issue Aug 20, 2024
This is useful mostly in larger projects where QCoro is included as a submodule
and added using add_subdirectory. Setting this variable allows to disable building
QCoro tests, while keeping BUILD_TESTING set to ON, so that the main project's
test get built and run.

Fixed #233
danvratil added a commit that referenced this issue Aug 23, 2024
This is useful mostly in larger projects where QCoro is included as a submodule
and added using add_subdirectory. Setting this variable allows to disable building
QCoro tests, while keeping BUILD_TESTING set to ON, so that the main project's
test get built and run.

Fixed #233
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

Successfully merging a pull request may close this issue.

2 participants
0