Skip to content
Snippets Groups Projects

Add multithreading to CbmTaskUnpack and fix compiler errors on several systems

Merged Florian Uhlig requested to merge f.uhlig/cbmroot:fix_execution_stl into master

Files

+ 23
1
@@ -2,7 +2,6 @@
# V. Friese, 2 June 2021
# ----- Library name ----------------------------------
Set(LIBRARY_NAME CbmRecoTasks)
# ---------------------------------------------------------
@@ -70,6 +69,10 @@ CbmData
Algo
external::yaml-cpp
)
if(OpenMP_CXX_FOUND)
list(APPEND DEPENDENCIES OpenMP::OpenMP_CXX)
endif()
# ---------------------------------------------------------
@@ -77,6 +80,25 @@ external::yaml-cpp
set(LINKDEF ${LIBRARY_NAME}LinkDef.h)
# ---------------------------------------------------------
# Check if the compiler supports std::execution in the respective STL
# library
CHECK_CXX_SOURCE_COMPILES("
#include <numeric>
#include <vector>
#include <execution>
int main(int argc, char *argv[])
{
std::vector<double> v(10, 1);
auto result = std::reduce(std::execution::par, v.begin(), v.end());
return 0;
}" HAS_STD_EXECUTION)
if (HAS_STD_EXECUTION)
message("Execution is available in STL")
add_definitions(-DWITH_EXECUTION)
endif()
# ----- Let cmake do the job ---------------------------
include_directories( ${INCLUDE_DIRECTORIES})
Loading