diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18dd527e6f851f9813bb76b15d76e07a424525d1..55132849878470126d13ce5df382fc90fac8fd89 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,14 @@ be evaluated with the function values provided in the same order as the names wh
 - __Newton__: The Newton solver no longer supports linear solvers without a `norm` interface when computing the resisual norm is required. The linear solvers available in Dumux all have such an interface.
 - __MultiDomain__: The MDTraits are now required to state the LocalResidual type in the Subdomain policy (see multidomain/traits.hh). This only affects users that created their own MDTraits and don't use the default MDTraits.
 - __PDESolver__: The PDESolver interface now requires an `apply` method that returns a `bool` instead of throwing when not converged
+- DuMux-specific preprocessor macros (defined in `config.h`) are now prefixed by `DUMUX_` in order to avoid name conflicts when being passed down to other modules. Corresponding CMake variables (if existing) are now also prefixed. Explicitly, the following macros have been renamed:
+  - `HAVE_KOKKOS` to `DUMUX_HAVE_KOKKOS`
+  - `HAVE_OPENMP` to `DUMUX_HAVE_OPENMP`
+  - `HAVE_GNUPLOT` to `DUMUX_HAVE_GNUPLOT`
+  - `HAVE_CPP_PARALLEL_ALGORITHMS` to `DUMUX_HAVE_CPP_PARALLEL_ALGORITHMS`
+  - `HAVE_GMSH` to `DUMUX_HAVE_GMSH`
+  - `HAVE_GSTAT` to `DUMUX_HAVE_GSTAT`
+  - `HAVE_PVPYTHON` to `DUMUX_HAVE_PVPYTHON`
 
 ### Deprecated properties/classes/functions/files, to be removed after 3.8:
 
diff --git a/cmake/modules/AddKokkosFlags.cmake b/cmake/modules/AddKokkosFlags.cmake
index 7fceb0bd2dfb78f740fc6498e214476f2a1ddacf..1c2c023566218eedef58092de00ba53e8db3f5e5 100644
--- a/cmake/modules/AddKokkosFlags.cmake
+++ b/cmake/modules/AddKokkosFlags.cmake
@@ -4,7 +4,7 @@
 include_guard(GLOBAL)
 
 # set variable for config.h
-set(HAVE_KOKKOS ${Kokkos_FOUND})
+set(DUMUX_HAVE_KOKKOS ${Kokkos_FOUND})
 
 # perform DUNE-specific setup tasks
 if (Kokkos_FOUND)
diff --git a/cmake/modules/AddOpenMPFlags.cmake b/cmake/modules/AddOpenMPFlags.cmake
index d4732623b236967950dc15fcd56ab458e925dbac..006cc61061ad3e2dff9b81fa23ece72ccef9fe33 100644
--- a/cmake/modules/AddOpenMPFlags.cmake
+++ b/cmake/modules/AddOpenMPFlags.cmake
@@ -4,7 +4,7 @@
 include_guard(GLOBAL)
 
 # set variable for config.h
-set(HAVE_OPENMP ${OpenMP_FOUND})
+set(DUMUX_HAVE_OPENMP ${OpenMP_FOUND})
 
 # perform DUNE-specific setup tasks
 if (OpenMP_FOUND)
diff --git a/cmake/modules/DumuxMacros.cmake b/cmake/modules/DumuxMacros.cmake
index 00789290a28ed0163d05f8644e2c9ee17314be30..01f384076c4666af68929bb4531beebbc9baef62 100644
--- a/cmake/modules/DumuxMacros.cmake
+++ b/cmake/modules/DumuxMacros.cmake
@@ -9,7 +9,7 @@ include(DumuxTestMacros)
 
 find_package(GLPK QUIET)
 find_package(Gnuplot QUIET)
-set(HAVE_GNUPLOT ${GNUPLOT_FOUND})
+set(DUMUX_HAVE_GNUPLOT ${GNUPLOT_FOUND})
 find_package(Gstat QUIET)
 find_package(Gmsh QUIET)
 find_package(NLOPT QUIET)
@@ -63,7 +63,7 @@ check_cxx_symbol_exists(
 )
 
 if(DUMUX_HAVE_CXX_EXECUTION_POLICY)
-  set(HAVE_CPP_PARALLEL_ALGORITHMS TRUE)
+  set(DUMUX_HAVE_CPP_PARALLEL_ALGORITHMS TRUE)
 endif()
 
 # setup multithreading backend
diff --git a/cmake/modules/FindGmsh.cmake b/cmake/modules/FindGmsh.cmake
index ff760a6a8871e27d1fd39f527822713a40a936d4..cacf7e0e0967a492dfbc193129aa535cfff02afc 100644
--- a/cmake/modules/FindGmsh.cmake
+++ b/cmake/modules/FindGmsh.cmake
@@ -45,7 +45,7 @@ find_package_handle_standard_args(
 )
 
 # set macros for config.h
-set(HAVE_GMSH ${Gmsh_FOUND})
+set(DUMUX_HAVE_GMSH ${Gmsh_FOUND})
 set(GMSH_EXECUTABLE ${GMSH_EXECUTABLE})
 
 # text for feature summary
diff --git a/cmake/modules/FindGstat.cmake b/cmake/modules/FindGstat.cmake
index abba48d84f7271056918e79085bda3ec1421d0db..c695a0b4716576e42b0959de4238c9315013c1aa 100644
--- a/cmake/modules/FindGstat.cmake
+++ b/cmake/modules/FindGstat.cmake
@@ -45,7 +45,7 @@ find_package_handle_standard_args(
 )
 
 # set macros for config.h
-set(HAVE_GSTAT ${GSTAT_FOUND})
+set(DUMUX_HAVE_GSTAT ${GSTAT_FOUND})
 set(GSTAT_EXECUTABLE ${GSTAT_EXECUTABLE})
 
 # text for feature summary
diff --git a/cmake/modules/FindPVPython.cmake b/cmake/modules/FindPVPython.cmake
index 4ea29ecd9bbde29758367c908cbec7abaccc159d..8757b8dbab5917f8d43578cfc3f2a4fe8c05f4fa 100644
--- a/cmake/modules/FindPVPython.cmake
+++ b/cmake/modules/FindPVPython.cmake
@@ -45,7 +45,7 @@ find_package_handle_standard_args(
 )
 
 # set macros for config.h
-set(HAVE_PVPYTHON ${PVPYTHON_FOUND})
+set(DUMUX_HAVE_PVPYTHON ${PVPYTHON_FOUND})
 set(PVPYTHON_EXECUTABLE ${PVPYTHON_EXECUTABLE})
 
 # text for feature summary
diff --git a/config.h.cmake b/config.h.cmake
index 4c9390e290af1f4219c78e1a35e6cf0c2556058b..71bfe1eea6e5a287e9be0dbb32a017810625c417 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -52,45 +52,45 @@
 #define OPM_GRID_VERSION_MINOR ${OPM_GRID_VERSION_MINOR}
 
 /* Define to 1 if gnuplot was found */
-#cmakedefine HAVE_GNUPLOT 1
+#cmakedefine DUMUX_HAVE_GNUPLOT 1
 
 /* Define path to gnuplot executable */
 #cmakedefine GNUPLOT_EXECUTABLE "@GNUPLOT_EXECUTABLE@"
 
 /* Define to 1 if gstat was found */
-#cmakedefine HAVE_GSTAT 1
+#cmakedefine DUMUX_HAVE_GSTAT 1
 
 /* Define path to gstat executable */
 #cmakedefine GSTAT_EXECUTABLE "@GSTAT_EXECUTABLE@"
 
 /* Define to 1 if gmsh was found */
-#cmakedefine HAVE_GMSH 1
+#cmakedefine DUMUX_HAVE_GMSH 1
 
 /* Define path to gmsh executable */
 #cmakedefine GMSH_EXECUTABLE "@GMSH_EXECUTABLE@"
 
 /* Defines whether pvpython has been found */
-#cmakedefine HAVE_PVPYTHON 1
+#cmakedefine DUMUX_HAVE_PVPYTHON 1
 
 /* Define the path to pvpython */
 #define PVPYTHON_EXECUTABLE "${PVPYTHON_EXECUTABLE}"
 
 /* Define to 1 if quadmath was found */
-#cmakedefine HAVE_QUAD 1
+#cmakedefine DUMUX_HAVE_QUAD 1
 
 /* Set if Kokkos was found */
-#cmakedefine HAVE_KOKKOS ENABLE_KOKKOS
+#cmakedefine DUMUX_HAVE_KOKKOS ENABLE_KOKKOS
 
 /* Set if OpenMP was found */
-#cmakedefine HAVE_OPENMP ENABLE_OPENMP
+#cmakedefine DUMUX_HAVE_OPENMP ENABLE_OPENMP
 
 /* Set the DUMUX_MULTITHREADING_BACKEND */
 #ifndef DUMUX_MULTITHREADING_BACKEND
 #define DUMUX_MULTITHREADING_BACKEND ${DUMUX_MULTITHREADING_BACKEND}
 #endif
 
-/* Set HAVE_CPP_PARALLEL_ALGORITHMS if available */
-#cmakedefine HAVE_CPP_PARALLEL_ALGORITHMS 1
+/* Set DUMUX_HAVE_CPP_PARALLEL_ALGORITHMS if available */
+#cmakedefine DUMUX_HAVE_CPP_PARALLEL_ALGORITHMS 1
 
 /* end dumux
    Everything below here will be overwritten
diff --git a/dumux/common/initialize.hh b/dumux/common/initialize.hh
index 54a0c71e6087e936594443a0639b5c67c0e859cf..8ccbcb72f5cc1aab8359fd00a48d12d8c9ae4003 100644
--- a/dumux/common/initialize.hh
+++ b/dumux/common/initialize.hh
@@ -48,12 +48,12 @@ public:
 #endif // HAVE_TBB
 
 
-#if HAVE_OPENMP
+#if DUMUX_HAVE_OPENMP
 #include <omp.h>
-#endif // HAVE_OPENMP
+#endif // DUMUX_HAVE_OPENMP
 
 
-#if HAVE_KOKKOS
+#if DUMUX_HAVE_KOKKOS
 #include <Kokkos_Core.hpp>
 
 #ifndef DOXYGEN
@@ -76,7 +76,7 @@ public:
 } // namespace Dumux::Detail
 #endif // DOXYGEN
 
-#endif // HAVE_KOKKOS
+#endif // DUMUX_HAVE_KOKKOS
 
 namespace Dumux {
 
@@ -91,14 +91,14 @@ void initialize(int& argc, char* argv[])
     Detail::TBBGlobalControl::instance(argc, argv);
 #endif
 
-#if HAVE_OPENMP
+#if DUMUX_HAVE_OPENMP
     if (const char* dumuxNumThreads = std::getenv("DUMUX_NUM_THREADS"))
         omp_set_num_threads(
             std::max(1, std::stoi(std::string{ dumuxNumThreads }))
         );
 #endif
 
-#if HAVE_KOKKOS
+#if DUMUX_HAVE_KOKKOS
     // initialize Kokkos (command line / environmental variable interface)
     Detail::KokkosScopeGuard::instance(argc, argv);
 #endif
diff --git a/dumux/io/gnuplotinterface.hh b/dumux/io/gnuplotinterface.hh
index f366e2f1dce4e5e3bc1203b70e98eaf184335135..dce6d7811180442870c5fd6914c2b63f8a479d03 100644
--- a/dumux/io/gnuplotinterface.hh
+++ b/dumux/io/gnuplotinterface.hh
@@ -16,7 +16,7 @@
 #ifndef DUMUX_GNUPLOT_INTERFACE_HH
 #define DUMUX_GNUPLOT_INTERFACE_HH
 
-#if !HAVE_GNUPLOT
+#if !DUMUX_HAVE_GNUPLOT
 // Gnuplot has not been found by CMake, no output possible.
 #define GNUPLOT_EXECUTABLE "/usr/bin/gnuplot"
 #endif
@@ -379,7 +379,7 @@ private:
     // Give plot command to gnuplot
     void executeGnuplot(const std::string& plotCommand, std::FILE * pipe) const
     {
-#ifdef HAVE_GNUPLOT
+#ifdef DUMUX_HAVE_GNUPLOT
         fputs((plotCommand + "\n").c_str(), pipe);
         fflush(pipe);
 #else
diff --git a/dumux/material/gstatrandomfield.hh b/dumux/material/gstatrandomfield.hh
index 01e32cffe28970e66bf187cb2b9f4079ef075324..ffe21dab84e87793fe512dc19c4bd0e404011baf 100644
--- a/dumux/material/gstatrandomfield.hh
+++ b/dumux/material/gstatrandomfield.hh
@@ -87,7 +87,7 @@ public:
         fieldType_ = fieldType;
         if (createNew)
         {
-#if !HAVE_GSTAT
+#if !DUMUX_HAVE_GSTAT
             DUNE_THROW(Dune::InvalidStateException, "Requested data field generation with gstat"
               << " but gstat was not found on your system. Set GSTAT_ROOT to the path where gstat "
               << " is installed and pass it to CMake, e.g. through an opts file.");
diff --git a/dumux/parallel/parallel_for.hh b/dumux/parallel/parallel_for.hh
index f54d4e5e39923d8024d0c03b36dfa6f7ba355ea9..32befe762e5691f96433bdf0fd24c71542d35abd 100644
--- a/dumux/parallel/parallel_for.hh
+++ b/dumux/parallel/parallel_for.hh
@@ -16,7 +16,7 @@
 
 #include <dumux/parallel/multithreading.hh>
 
-#if HAVE_CPP_PARALLEL_ALGORITHMS
+#if DUMUX_HAVE_CPP_PARALLEL_ALGORITHMS
 #include <algorithm>
 #include <execution>
 #include <dune/common/rangeutilities.hh>
@@ -59,7 +59,7 @@ private:
     std::size_t count_;
 };
 
-#if HAVE_CPP_PARALLEL_ALGORITHMS
+#if DUMUX_HAVE_CPP_PARALLEL_ALGORITHMS
 // C++ parallel algorithms backend implementation
 template<class FunctorType>
 class ParallelFor<FunctorType, Multithreading::ExecutionBackends::Cpp>
@@ -121,7 +121,7 @@ private:
 #endif // HAVE_KOKKOS
 
 
-#if HAVE_OPENMP
+#if DUMUX_HAVE_OPENMP
 // OpenMP backend implementation
 template<class FunctorType>
 class ParallelFor<FunctorType, Multithreading::ExecutionBackends::OpenMP>
@@ -141,7 +141,7 @@ private:
     FunctorType functor_;
     std::size_t count_;
 };
-#endif // HAVE_OPENMP
+#endif // DUMUX_HAVE_OPENMP
 
 
 } // end namespace Detail
diff --git a/test/discretization/facecentered/staggered/drawgrid.hh b/test/discretization/facecentered/staggered/drawgrid.hh
index f0b3e5e172e51485008b215884ad7895ced27029..f0e238692980825240b2d585891c2f1a39871ae6 100644
--- a/test/discretization/facecentered/staggered/drawgrid.hh
+++ b/test/discretization/facecentered/staggered/drawgrid.hh
@@ -269,7 +269,7 @@ void drawGridGeometry(const GridGeometry& gridGeometry,
                 << ":" << maxCoord[1] << "] NaN notitle" << std::endl;
     plotFile.close();
 
-#if HAVE_GNUPLOT
+#if DUMUX_HAVE_GNUPLOT
     if (executePlot)
     {
         std::string cmd = "gnuplot -p '" + plotFileName + "'";
diff --git a/test/porenetwork/2p/static/main.cc b/test/porenetwork/2p/static/main.cc
index 3230168676f8727644f70142b386d14ebd2a32fd..70acb6effa4566714ab9dbe9064fd5630e1c4143 100644
--- a/test/porenetwork/2p/static/main.cc
+++ b/test/porenetwork/2p/static/main.cc
@@ -254,7 +254,7 @@ int main(int argc, char** argv)
     }
 
     //plot the pc-S curve, if desired
-#ifdef HAVE_GNUPLOT
+#ifdef DUMUX_HAVE_GNUPLOT
     if (getParam<bool>("Problem.PlotPcS"))
     {
         Dumux::GnuplotInterface<Scalar> gnuplot(true);
diff --git a/test/porousmediumflow/1p/isothermal/CMakeLists.txt b/test/porousmediumflow/1p/isothermal/CMakeLists.txt
index ebf3ebb008a90cf0035af39576d0abd89d3304a6..62529bba8bdd3f20c071990fb9be80cdbf5babf2 100644
--- a/test/porousmediumflow/1p/isothermal/CMakeLists.txt
+++ b/test/porousmediumflow/1p/isothermal/CMakeLists.txt
@@ -63,6 +63,6 @@ dumux_add_test(NAME test_1p_gstat
               LABELS porousmediumflow 1p
               SOURCES main.cc
               COMPILE_DEFINITIONS TYPETAG=OnePTestCCTpfa
-              CMAKE_GUARD HAVE_GSTAT
+              CMAKE_GUARD DUMUX_HAVE_GSTAT
               COMMAND ./test_1p_gstat
               CMD_ARGS params_gstat.input)
diff --git a/test/porousmediumflow/1p/rootbenchmark/main.cc b/test/porousmediumflow/1p/rootbenchmark/main.cc
index 6158d4be17a84ba6458d2b11ee5830e04ddb91a8..9620399b9e278d20d45ca8ba38416fdf4c7077fa 100644
--- a/test/porousmediumflow/1p/rootbenchmark/main.cc
+++ b/test/porousmediumflow/1p/rootbenchmark/main.cc
@@ -26,7 +26,7 @@
 
 #include <dumux/assembly/fvassembler.hh>
 
-#if HAVE_GNUPLOT
+#if DUMUX_HAVE_GNUPLOT
 #include <dumux/io/gnuplotinterface.hh>
 #endif
 #include <dumux/io/vtkoutputmodule.hh>
@@ -99,7 +99,7 @@ int main(int argc, char** argv)
     // write more output for benchmark plot
     problem->outputL2Norm(x);
 
-#if HAVE_GNUPLOT
+#if DUMUX_HAVE_GNUPLOT
     // plot with gnuplot
     bool enablePlot = getParam<bool>("Problem.EnablePlot", false);
     if (enablePlot)