Make TBB linking conditional and improve backward compatibility of execution header guards

This commit is contained in:
Niko Savola 2026-06-04 10:30:27 +00:00
parent b116fe452c
commit 7e6119c777
No known key found for this signature in database
3 changed files with 26 additions and 12 deletions

View File

@ -454,3 +454,7 @@ INCLUDEPATH += $$TL_INC $$GSI_INC
DEPENDPATH += $$TL_INC $$GSI_INC
LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi
packagesExist(tbb) {
LIBS += -ltbb
}

View File

@ -1,3 +1,14 @@
#if __cplusplus >= 201703L
#if __has_include(<execution>)
#include <execution>
#endif
#endif
#if defined(__cpp_lib_execution)
#define PARALLEL_EXEC_POLICY std::execution::par,
#else
#define PARALLEL_EXEC_POLICY
#endif
/*
@ -29,12 +40,6 @@
#include "tlProgress.h"
#include "gsi.h"
#if defined(__cpp_lib_execution)
#include <execution>
#define PARALLEL_EXEC_POLICY std::execution::par,
#else
#define PARALLEL_EXEC_POLICY
#endif
#include <vector>
#include <deque>

View File

@ -1,3 +1,14 @@
#if __cplusplus >= 201703L
#if __has_include(<execution>)
#include <execution>
#endif
#endif
#if defined(__cpp_lib_execution)
#define PARALLEL_EXEC_POLICY std::execution::par,
#else
#define PARALLEL_EXEC_POLICY
#endif
/*
@ -28,12 +39,6 @@
#include "tlLog.h"
#include "tlInt128Support.h"
#if defined(__cpp_lib_execution)
#include <execution>
#define PARALLEL_EXEC_POLICY std::execution::par,
#else
#define PARALLEL_EXEC_POLICY
#endif
#include <algorithm>
#include <cmath>