Closed fschloesser closed 3 years ago
@fschloesser, the line you point at doesn't contain neither CMAKE_CURRENT_SOURCE_DIR
nor CMAKE_SOURCE_DIR
. Some time ago I applied a fix to the line: https://github.com/oneapi-src/oneTBB/pull/476. Could you please clarify what problem you have now? What version of oneTBB do you use?
Sorry, I mistyped, I of course mean PROJECT_SOURCE_DIR
and CMAKE_CURRENT_SOURCE_DIR
I use the onetbb_2021, but i think this is also in master
@fschloesser, according to the doc:
This is the source directory of the last call to the project() command
Root CMakeLists.txt in oneTBB has unconditional project()
call:
https://github.com/oneapi-src/oneTBB/blob/357c9b27fa84eaf748bc556585c26995c446eceb/CMakeLists.txt#L57
So this call should set PROJECT_SOURCE_DIR
specific for oneTBB scope. How do you do add_subdirectory()
? Maybe you can provide step-by-step instruction how to reproduce the issue.
I use the onetbb_2021, but i think this is also in master
Oh, seems you didn't mean PROJECT_SOURCE_DIR
, since onetbb_2021
doesn't contain #476 fix:
https://github.com/oneapi-src/oneTBB/blob/261fe22630bd61ec137b66f6dd4403ad7ab36a14/src/tbb/CMakeLists.txt#L140
onetbb_2021
contains release snapshots and will be updated for the next release. Please try master
branch for your case.
Here is the original issue: https://github.com/oneapi-src/oneTBB/issues/474. This one looks as duplicate.
Yes, this was the original issue. Thank you and sorry for the confusion.
When adding oneTBB as a subdirectory i needed to replace
CMAKE_CURRENT_SOURCE_DIR
byCMAKE_SOURCE_DIR
in https://github.com/oneapi-src/oneTBB/blob/a070e5f2086c895adf125c490b1f0e0acd6330a5/src/tbb/CMakeLists.txt#L172