From 0780e52982926e593fda05d9770e340e65a8d577 Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Wed, 19 Oct 2022 10:35:40 +0200
Subject: [PATCH] [cmake] Renamed option to OGS_BUILD_WHEEL.

---
 Applications/CLI/CMakeLists.txt                        |  4 ++--
 CMakeLists.txt                                         |  2 +-
 CMakePresets.json                                      |  2 +-
 .../Python/CMakeLists.txt                              |  4 ++--
 Tests/CMakeLists.txt                                   | 10 +++++-----
 scripts/cmake/PythonSetup.cmake                        |  2 +-
 scripts/cmake/test/OgsTest.cmake                       |  2 +-
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/Applications/CLI/CMakeLists.txt b/Applications/CLI/CMakeLists.txt
index e9fe130b2eb..2e44ec2997f 100644
--- a/Applications/CLI/CMakeLists.txt
+++ b/Applications/CLI/CMakeLists.txt
@@ -1,4 +1,4 @@
-if(OGS_USE_PYTHON AND NOT OGS_WHEEL_BUILD)
+if(OGS_USE_PYTHON AND NOT OGS_BUILD_WHEEL)
     # Troubleshooting: If you get linker errors, such as   ogs.cpp:(.text+0xb4):
     # undefined reference to `_Py_ZeroStruct' it could be that OGS is compiled
     # with the wrong Python version. I (Ch. Leh.) observed the following: The
@@ -48,7 +48,7 @@ if(OGS_USE_PYTHON AND NOT OGS_WHEEL_BUILD)
     )
 endif()
 
-if(NOT OGS_WHEEL_BUILD)
+if(NOT OGS_BUILD_WHEEL)
     ogs_add_executable(ogs ogs.cpp CommandLineArgumentParser.cpp)
 
     target_link_libraries(
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 88d392ab0f7..68714ee21a1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,7 @@ project(OGS-6)
 
 option(OGS_USE_PYTHON "Interface with Python" ON)
 option(OGS_BUILD_PYTHON_MODULE "Should the OGS Python module be built?" ON)
-option(OGS_WHEEL_BUILD "Build Python wheels of OGS" OFF)
+option(OGS_BUILD_WHEEL "Build Python wheels of OGS" OFF)
 
 include(CMakeDependentOption)
 include(scripts/cmake/UseCompilerCache.cmake)
diff --git a/CMakePresets.json b/CMakePresets.json
index 67c0c66361e..ff3d11d58f0 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -197,7 +197,7 @@
         "OGS_BUILD_HDF5": "ON",
         "OGS_USE_PYTHON": "ON",
         "OGS_BUILD_PYTHON_MODULE": "ON",
-        "OGS_WHEEL_BUILD": "ON",
+        "OGS_BUILD_WHEEL": "ON",
         "OGS_BUILD_TESTING": "OFF",
         "OGS_INSTALL_DEPENDENCIES": "OFF",
         "OGS_USE_PIP": "OFF",
diff --git a/ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt b/ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt
index 629333554a7..eac165877cf 100644
--- a/ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt
+++ b/ProcessLib/BoundaryConditionAndSourceTerm/Python/CMakeLists.txt
@@ -44,10 +44,10 @@ target_include_directories(
 target_link_libraries(
     ProcessLibBoundaryConditionAndSourceTermPython
     PUBLIC BaseLib MathLib MeshLib NumLib
-           $<IF:$<BOOL:${OGS_WHEEL_BUILD}>,pybind11::module,pybind11::embed>
+           $<IF:$<BOOL:${OGS_BUILD_WHEEL}>,pybind11::module,pybind11::embed>
 )
 
-if(OGS_WHEEL_BUILD)
+if(OGS_BUILD_WHEEL)
     target_link_options(
         ProcessLibBoundaryConditionAndSourceTermPython PUBLIC
         $<$<CXX_COMPILER_ID:AppleClang>:-undefined dynamic_lookup>
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 83b27a73b72..5948eab753b 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -24,7 +24,7 @@ append_source_files(TEST_SOURCES GeoLib/IO)
 append_source_files(TEST_SOURCES MaterialLib)
 append_source_files(TEST_SOURCES MathLib)
 append_source_files(TEST_SOURCES MeshLib)
-if(NOT OGS_WHEEL_BUILD)
+if(NOT OGS_BUILD_WHEEL)
     append_source_files(TEST_SOURCES ApplicationsLib)
 endif()
 append_source_files(TEST_SOURCES MeshGeoToolsLib)
@@ -37,7 +37,7 @@ set_source_files_properties(
 set(TEST_SOURCES ${TEST_SOURCES} ${TEST_SOURCES_NUMLIB})
 append_source_files(TEST_SOURCES ParameterLib)
 
-if(NOT OGS_WHEEL_BUILD)
+if(NOT OGS_BUILD_WHEEL)
     append_source_files(TEST_SOURCES ProcessLib)
     if(OGS_BUILD_PROCESS_TH2M)
         append_source_files(TEST_SOURCES ProcessLib/TH2M)
@@ -72,7 +72,7 @@ ogs_add_executable(testrunner ${TEST_SOURCES})
 
 target_link_libraries(
     testrunner
-    PRIVATE $<$<NOT:$<BOOL:${OGS_WHEEL_BUILD}>>:ApplicationsLib>
+    PRIVATE $<$<NOT:$<BOOL:${OGS_BUILD_WHEEL}>>:ApplicationsLib>
             ApplicationsFileIO
             autocheck
             gmock
@@ -83,8 +83,8 @@ target_link_libraries(
             MeshLib
             NumLib
             ParameterLib
-            $<$<NOT:$<BOOL:${OGS_WHEEL_BUILD}>>:ProcessLib>
-            $<$<NOT:$<BOOL:${OGS_WHEEL_BUILD}>>:Processes>
+            $<$<NOT:$<BOOL:${OGS_BUILD_WHEEL}>>:ProcessLib>
+            $<$<NOT:$<BOOL:${OGS_BUILD_WHEEL}>>:Processes>
             TestInfoLib
             VTK::FiltersGeneral
             VTK::FiltersSources
diff --git a/scripts/cmake/PythonSetup.cmake b/scripts/cmake/PythonSetup.cmake
index 95e3fedcc31..ffaabcfaa74 100644
--- a/scripts/cmake/PythonSetup.cmake
+++ b/scripts/cmake/PythonSetup.cmake
@@ -40,7 +40,7 @@ else()
 endif()
 
 set(_python_componets Interpreter)
-if(OGS_USE_PYTHON AND NOT OGS_WHEEL_BUILD)
+if(OGS_USE_PYTHON AND NOT OGS_BUILD_WHEEL)
     list(APPEND _python_componets Development.Embed)
 endif()
 if(OGS_BUILD_PYTHON_MODULE)
diff --git a/scripts/cmake/test/OgsTest.cmake b/scripts/cmake/test/OgsTest.cmake
index ae910e3e878..31e766979cb 100644
--- a/scripts/cmake/test/OgsTest.cmake
+++ b/scripts/cmake/test/OgsTest.cmake
@@ -4,7 +4,7 @@ function(OgsTest)
         return()
     endif()
 
-    if (OGS_WHEEL_BUILD)
+    if(OGS_BUILD_WHEEL)
         return()
     endif()
 
-- 
GitLab