From 2c77efbde1cd77ca2b06bfc1efbee12d0368538e Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 5 May 2025 19:49:34 +0200 Subject: [PATCH] Compile fix for Linux arch (#3642) --- src/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3c341a8b82..ddc9b49769 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -466,6 +466,17 @@ target_include_directories(openspace-core target_link_libraries(openspace-core PUBLIC nlohmann_json) +if (UNIX) + # On Arch Linux, if you have the package `oneapi` installed, this influences including + # the header and causes the header /usr/include/oneapi/tbb/task_group.h be + # pulled in, causing a compile problem + target_compile_definitions( + openspace-core + PUBLIC "_GLIBCXX_USE_TBB_PAR_BACKEND=0" + PUBLIC "_PSTL_PAR_BACKEND_SERIAL" + ) +endif () + target_precompile_headers(openspace-core PRIVATE