From 56e9f300ed34e4c90191c969763c5131b7054404 Mon Sep 17 00:00:00 2001 From: Henry Le Berre Date: Wed, 15 May 2024 13:59:43 +0200 Subject: [PATCH] Fix building docs (case.fpp include error) #417 (#418) --- src/common/include/case.fpp | 7 +++++++ src/pre_process/include/case.fpp | 4 ---- src/simulation/include/case.fpp | 3 --- toolchain/mfc/case.py | 12 +++--------- 4 files changed, 10 insertions(+), 16 deletions(-) create mode 100644 src/common/include/case.fpp delete mode 100644 src/pre_process/include/case.fpp delete mode 100644 src/simulation/include/case.fpp diff --git a/src/common/include/case.fpp b/src/common/include/case.fpp new file mode 100644 index 0000000000..ad2e0b1a94 --- /dev/null +++ b/src/common/include/case.fpp @@ -0,0 +1,7 @@ +! This file exists so that Fypp can be run without generating case.fpp files for +! each target. This is useful when generating documentation, for example. This +! should also let MFC be built with CMake directly, without invoking mfc.sh. + +! For pre-process. +#:def analytical() +#:enddef diff --git a/src/pre_process/include/case.fpp b/src/pre_process/include/case.fpp deleted file mode 100644 index 1f3f32d6f4..0000000000 --- a/src/pre_process/include/case.fpp +++ /dev/null @@ -1,4 +0,0 @@ -! By default, no analytical patches are defined. - -#:def analytical() -#:enddef diff --git a/src/simulation/include/case.fpp b/src/simulation/include/case.fpp deleted file mode 100644 index b75ab91527..0000000000 --- a/src/simulation/include/case.fpp +++ /dev/null @@ -1,3 +0,0 @@ -! This file was generated by MFC. It is only used if the --case-optimization -! option is passed to ./mfc.sh run or test, enabling a GPU-oriented optimization -! that hard-codes certain case parameters from the input file. diff --git a/toolchain/mfc/case.py b/toolchain/mfc/case.py index 2c0356a733..fc8cc3acad 100644 --- a/toolchain/mfc/case.py +++ b/toolchain/mfc/case.py @@ -182,21 +182,15 @@ def __get_sim_fpp(self, print: bool) -> str: return """\ ! This file is purposefully empty. It is only important for builds that make use ! of --case-optimization. -""" - - def __get_post_fpp(self, _) -> str: - return """\ -! This file is purposefully empty for all post-process builds. """ def get_fpp(self, target, print = True) -> str: def _default(_) -> str: - return "" + return "! This file is purposefully empty." result = { - "pre_process" : self.__get_pre_fpp, - "simulation" : self.__get_sim_fpp, - "post_process" : self.__get_post_fpp, + "pre_process" : self.__get_pre_fpp, + "simulation" : self.__get_sim_fpp, }.get(build.get_target(target).name, _default)(print) return result