From 08a7e1ae8b0871264603c33e40546bb430878f3e Mon Sep 17 00:00:00 2001
From: Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>
Date: Thu, 16 Jan 2025 10:17:17 +0100
Subject: [PATCH] Remove the Fortran high-level interface from CMake

---
 .gitlab-ci.yml          |  3 +--
 CMakeLists.txt          |  1 -
 examples/CMakeLists.txt | 10 ----------
 src/CMakeLists.txt      | 12 ------------
 4 files changed, 1 insertion(+), 25 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 40ae4354..97852f7c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -197,7 +197,7 @@ include:
 .common_cmake:
   extends: .common
   variables:
-    CMAKE_EXTRA_ARGS: -DMTIME_ENABLE_FORTRAN_HL:BOOL=OFF
+    CMAKE_EXTRA_ARGS:
     # Cmake initializes Fortran compiler flags from FFLAGS:
     FFLAGS: ${FCFLAGS}
   script:
@@ -357,7 +357,6 @@ Generate HTML pages:
       -DCMAKE_C_COMPILER=gcc
       -DCMAKE_Fortran_COMPILER=gfortran
       -DBUILD_TESTING:BOOL=OFF
-      -DMTIME_ENABLE_FORTRAN_HL:BOOL=OFF
       -DMTIME_ENABLE_PYTHON:BOOL=OFF
       -DMTIME_BUILD_EXAMPLES:BOOL=OFF
       -DMTIME_BUILD_DOCS:BOOL=ON
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4630e873..05f6ba3a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,6 @@ project(
 option(BUILD_SHARED_LIBS "Build shared libraries" ON)
 option(BUILD_TESTING "Build tests" ON)
 
-option(MTIME_ENABLE_FORTRAN_HL "Enable the high-level Fortran interface" ON)
 option(MTIME_ENABLE_PYTHON "Enable the Python interface" OFF)
 option(MTIME_BUILD_EXAMPLES "Build examples" ON)
 option(MTIME_BUILD_DOCS "Build documentation" OFF)
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index d0269a41..a5f64b15 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -21,16 +21,6 @@ set(examples_Fortran
     uniq
 )
 
-if(MTIME_ENABLE_FORTRAN_HL)
-  list(
-    APPEND
-    examples_Fortran
-    # cmake-format: sort
-    example_hl
-    iconoce_hl
-  )
-endif()
-
 foreach(example IN LISTS examples_Fortran)
   add_executable(${example} ${example}.f90)
 endforeach()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 75a7a9f5..cea41b00 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -84,18 +84,6 @@ add_library(
   mtime_error_handling.f90
 )
 
-if(MTIME_ENABLE_FORTRAN_HL)
-  target_sources(
-    mtime
-    PRIVATE # cmake-format: sort
-            libmtime_hl.f90
-            mtime_t_datetime.inc
-            mtime_t_event.inc
-            mtime_t_juliandelta.inc
-            mtime_t_timedelta.inc
-  )
-endif()
-
 add_library(mtime::mtime ALIAS mtime)
 
 set(Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
-- 
GitLab