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

Only enforce build dir when not used as a subproject #1773

Closed
kinnarr opened this issue Oct 16, 2019 · 1 comment
Closed

Only enforce build dir when not used as a subproject #1773

kinnarr opened this issue Oct 16, 2019 · 1 comment

Comments

@kinnarr
Copy link

kinnarr commented Oct 16, 2019

Description
Allow in-source build when Catch2 is used as a subproject.

Additional context
Add NOT_SUBPROJECT to the if-statement

if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
    message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt")
endif()
@horenmar
Copy link
Member

You should not be doing in-tree build anyway, but since the reason we check is that in-tree build leads to weird errors that should not be present when Catch2 is a subdirectory, I am willing to modify the check.

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

Successfully merging a pull request may close this issue.

2 participants