Skip to content

Commit

Permalink
Fix building docs (case.fpp include error) #417 (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
henryleberre authored May 15, 2024
1 parent de3e7a1 commit 56e9f30
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
7 changes: 7 additions & 0 deletions src/common/include/case.fpp
Original file line number Diff line number Diff line change
@@ -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
4 changes: 0 additions & 4 deletions src/pre_process/include/case.fpp

This file was deleted.

3 changes: 0 additions & 3 deletions src/simulation/include/case.fpp

This file was deleted.

12 changes: 3 additions & 9 deletions toolchain/mfc/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 56e9f30

Please sign in to comment.