diff --git a/resources/3rdparty/gmm-5.2/include/gmm/gmm_blas.h b/resources/3rdparty/gmm-5.2/include/gmm/gmm_blas.h index 19e58f755..4fbe070d3 100644 --- a/resources/3rdparty/gmm-5.2/include/gmm/gmm_blas.h +++ b/resources/3rdparty/gmm-5.2/include/gmm/gmm_blas.h @@ -44,7 +44,7 @@ #ifdef STORM_HAVE_INTELTBB #include // This fixes a potential dependency ordering problem between GMM and TBB -#include "tbb/tbb.h" +#include "storm/adapters/IntelTbbAdapter.h" #include #endif diff --git a/src/storm-cli-utilities/cli.cpp b/src/storm-cli-utilities/cli.cpp index e79971cbc..e4a929445 100644 --- a/src/storm-cli-utilities/cli.cpp +++ b/src/storm-cli-utilities/cli.cpp @@ -17,9 +17,8 @@ // Includes for the linked libraries and versions header. -#ifdef STORM_HAVE_INTELTBB -# include "tbb/tbb_stddef.h" -#endif +#include "storm/adapters/IntelTbbAdapter.h" + #ifdef STORM_HAVE_GLPK # include "glpk.h" #endif diff --git a/src/storm/adapters/IntelTbbAdapter.h b/src/storm/adapters/IntelTbbAdapter.h new file mode 100644 index 000000000..fb4d7eb72 --- /dev/null +++ b/src/storm/adapters/IntelTbbAdapter.h @@ -0,0 +1,32 @@ +#pragma once + +// To detect whether the usage of TBB is possible, this include is neccessary +#include "storm-config.h" + + +/* On macOS, TBB includes the header + * /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/mach/boolean.h + * which #defines macros TRUE and FALSE. Since these also occur as identifiers, we #undef them after including TBB. + * We still issue a warning in case these macros have been defined before. +*/ + +#ifdef TRUE +#warning "Undefining previously defined macro 'TRUE'." +#endif + +#ifdef FALSE +#warning "Undefining previously defined macro 'FALSE'." +#endif + +#ifdef STORM_HAVE_INTELTBB +#include "tbb/tbb.h" +#include "tbb/tbb_stddef.h" +#endif + +#ifdef TRUE +#undef TRUE +#endif + +#ifdef FALSE +#undef FALSE +#endif diff --git a/src/storm/settings/modules/CoreSettings.cpp b/src/storm/settings/modules/CoreSettings.cpp index 3925012e3..baf474d1c 100644 --- a/src/storm/settings/modules/CoreSettings.cpp +++ b/src/storm/settings/modules/CoreSettings.cpp @@ -9,6 +9,7 @@ #include "storm/solver/SolverSelectionOptions.h" #include "storm/storage/dd/DdType.h" +#include "storm/adapters/IntelTbbAdapter.h" #include "storm/utility/macros.h" #include "storm/exceptions/IllegalArgumentValueException.h" diff --git a/src/storm/solver/GmmxxMultiplier.cpp b/src/storm/solver/GmmxxMultiplier.cpp index 95abf61fb..59d71af8e 100644 --- a/src/storm/solver/GmmxxMultiplier.cpp +++ b/src/storm/solver/GmmxxMultiplier.cpp @@ -2,6 +2,7 @@ #include "storm/adapters/RationalNumberAdapter.h" #include "storm/adapters/RationalFunctionAdapter.h" +#include "storm/adapters/IntelTbbAdapter.h" #include "storm/storage/SparseMatrix.h" #include "storm/settings/SettingsManager.h" #include "storm/settings/modules/CoreSettings.h" diff --git a/src/storm/solver/NativeMultiplier.cpp b/src/storm/solver/NativeMultiplier.cpp index 7dd2457df..b8c6c3549 100644 --- a/src/storm/solver/NativeMultiplier.cpp +++ b/src/storm/solver/NativeMultiplier.cpp @@ -10,6 +10,7 @@ #include "storm/adapters/RationalNumberAdapter.h" #include "storm/adapters/RationalFunctionAdapter.h" +#include "storm/adapters/IntelTbbAdapter.h" #include "storm/utility/macros.h" diff --git a/src/storm/storage/SparseMatrix.cpp b/src/storm/storage/SparseMatrix.cpp index 2ca0c823c..cdeaaf9a2 100644 --- a/src/storm/storage/SparseMatrix.cpp +++ b/src/storm/storage/SparseMatrix.cpp @@ -1,12 +1,5 @@ #include -// To detect whether the usage of TBB is possible, this include is neccessary -#include "storm-config.h" - -#ifdef STORM_HAVE_INTELTBB -#include "tbb/tbb.h" -#endif - #include "storm/storage/sparse/StateType.h" #include "storm/storage/SparseMatrix.h" #include "storm/adapters/RationalFunctionAdapter.h" diff --git a/src/storm/storage/SparseMatrix.h b/src/storm/storage/SparseMatrix.h index d33eda907..dbdd4086d 100644 --- a/src/storm/storage/SparseMatrix.h +++ b/src/storm/storage/SparseMatrix.h @@ -16,6 +16,7 @@ #include "storm/utility/macros.h" #include "storm/utility/constants.h" #include "storm/adapters/RationalFunctionAdapter.h" +#include "storm/adapters/IntelTbbAdapter.h" // Forward declaration for adapter classes. namespace storm { diff --git a/src/storm/utility/VectorHelper.cpp b/src/storm/utility/VectorHelper.cpp index ca40c8844..352910dd1 100644 --- a/src/storm/utility/VectorHelper.cpp +++ b/src/storm/utility/VectorHelper.cpp @@ -5,8 +5,7 @@ #include "storm/adapters/RationalNumberAdapter.h" #include "storm/adapters/RationalFunctionAdapter.h" - -#include "storm-config.h" +#include "storm/adapters/IntelTbbAdapter.h" #include "storm/utility/vector.h" diff --git a/src/storm/utility/vector.h b/src/storm/utility/vector.h index 153f74a36..82d698dde 100644 --- a/src/storm/utility/vector.h +++ b/src/storm/utility/vector.h @@ -1,16 +1,12 @@ #ifndef STORM_UTILITY_VECTOR_H_ #define STORM_UTILITY_VECTOR_H_ -#include "storm-config.h" -#ifdef STORM_HAVE_INTELTBB -#include "tbb/tbb.h" -#endif - #include #include #include #include #include +#include #include