Skip to content

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

@kinnarr

Description

@kinnarr

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()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions