Skip to content

tl::expected didn't respect LIBCORO_BUILD_TESTS=OFF#147

Merged
jbaldwin merged 1 commit intomainfrom
143-expected-builds-tests-when-tests-are-disabled
Jun 3, 2023
Merged

tl::expected didn't respect LIBCORO_BUILD_TESTS=OFF#147
jbaldwin merged 1 commit intomainfrom
143-expected-builds-tests-when-tests-are-disabled

Conversation

@jbaldwin
Copy link
Owner

@jbaldwin jbaldwin commented Jun 3, 2023

Closes #143

@jbaldwin jbaldwin self-assigned this Jun 3, 2023
@dok-net
Copy link
Contributor

dok-net commented Jun 3, 2023

OK, got it, verifies here. The magic is in the order of merging the lines in my test. If CMakeLists.txt has it like this, snip snip:

if(NOT LIBCORO_EXTERNAL_DEPENDENCIES)
    if(NOT LIBCORO_BUILD_TESTS)
        # Disable testing in expected
        set(BUILD_TESTING OFF CACHE INTERNAL "")
    endif()
    add_subdirectory(vendor/tartanllama/expected)
else()
    find_package(tl-expected CONFIG REQUIRED)
endif()

i.e. fist disable, then add subdirectory, the lenghty test builds are omitted.

Merge away :-)

@jbaldwin
Copy link
Owner Author

jbaldwin commented Jun 3, 2023

Woohoo!

@jbaldwin jbaldwin merged commit ea02557 into main Jun 3, 2023
@jbaldwin jbaldwin deleted the 143-expected-builds-tests-when-tests-are-disabled branch June 3, 2023 11:22
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 this pull request may close these issues.

expected submodule builds their tests despite LIBCORO_BUILD_TESTS=OFF here

2 participants