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

TBB cannot be build from FetchContent if OVERRIDE_FIND_PACKAGE is specified #1323

Closed
dbs4261 opened this issue Mar 7, 2024 · 0 comments · Fixed by #1324
Closed

TBB cannot be build from FetchContent if OVERRIDE_FIND_PACKAGE is specified #1323

dbs4261 opened this issue Mar 7, 2024 · 0 comments · Fixed by #1324

Comments

@dbs4261
Copy link
Contributor

dbs4261 commented Mar 7, 2024

Pretty straightforward issue to reproduce:

cmake_minimum_required(VERSION 3.24)
project(BugReport LANGUAGES CXX)

include(FetchContent)
FetchContent_Declare(TBB
	GIT_REPOSITORY "https://github.com/oneapi-src/oneTBB.git"
	GIT_TAG "master"
	GIT_SHALLOW ON
	CMAKE_ARGS "-DTBB_TEST:BOOL=OFF -DTBB_EXAMPLES:BOOL=OFF -DTBB_BENCH:BOOL=OFF -DTBB_BUILD:BOOL=ON -DTBB_FIND_PACKAGE:BOOL=OFF -DTBB_FUZZ_TESTING:BOOL=OFF -DTBB_INSTALL:BOOL=ON"
	OVERRIDE_FIND_PACKAGE
)

set(TBB_TEST OFF CACHE INTERNAL "" FORCE)
set(TBB_EXAMPLES OFF CACHE INTERNAL "" FORCE)
set(TBB_BENCH OFF CACHE INTERNAL "" FORCE)
set(TBB_BUILD ON CACHE INTERNAL "" FORCE)
set(TBB_FIND_PACKAGE OFF CACHE INTERNAL "" FORCE)
set(TBB_FUZZ_TESTING OFF CACHE INTERNAL "" FORCE)
set(TBB_INSTALL ON CACHE INTERNAL "" FORCE)

FetchContent_MakeAvailable(TBB)
if (NOT TBB::tbb)
	message(FATAL_ERROR "Failed to add TBB through FetchContent")
endif()
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.

1 participant