#CMake Fetch Content Usage

10 messages · Page 1 of 1 (latest)

crisp adder
#

Does anyone know how to use FetchContent in CMake to build and include https://github.com/oneapi-src/oneTBB ?

FetchContent_Declare(oneTBB
        GIT_REPOSITORY https://github.com/oneapi-src/oneTBB
        GIT_TAG v2021.9.0
        )

FetchContent_GetProperties(oneTBB)
if(NOT oneTBB_POPULATED)
    FetchContent_Populate(oneTBB)
    add_subdirectory(${oneTBB_SOURCE_DIR} ${oneTBB_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()

I've attempted to include the oneTBB library like so ... however, this obviously doesn't work as those paths don't exist. oneTBB, unlike my MantaRay library isn't a header-only library. What should I do?

GitHub

oneAPI Threading Building Blocks (oneTBB). Contribute to oneapi-src/oneTBB development by creating an account on GitHub.

celest wolfBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

last tinsel
crisp adder
#

I'll try it!

crisp adder
last tinsel
#

it isnt compiling the cpp files probably

crisp adder
#

Well then what exactly do I do?

#

seems like it is.. @last tinsel