Skip to content

Commit 91622b8

Browse files
committed
fypp everything
1 parent c98d0a7 commit 91622b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+125
-132
lines changed

.github/file-filter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
fortran_src: &fortran_src
55
- '**/*.f90'
6-
- '**/*.fpp'
6+
- '**/*.fypp'
77

88
python_src: &python_src
99
- '**/*.py'

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ yarn.lock
55
.venv/
66
/build/
77
.vscode/
8-
src/*/include/case.fpp
8+
src/*/include/case.fypp
99
src/*/autogen/
1010

1111
*.swo

CMakeLists.txt

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -253,48 +253,48 @@ endif()
253253
#
254254
# * Locate all source files for <target> of the type
255255
#
256-
# src/[<target>,common]/[.,include]/*.[f90,fpp].
256+
# src/[<target>,common]/[.,include]/*.[f90,fypp].
257257
#
258-
# * For each .fpp file found with filepath <dirpath>/<filename>.fpp, using a
258+
# * For each .fypp file found with filepath <dirpath>/<filename>.fypp, using a
259259
# custom command, instruct CMake how to generate a file with path
260260
#
261261
# src/<target>/fypp/<filename>.f90
262262
#
263-
# by running Fypp on <dirpath>/<filename>.fpp. It is important to understand
263+
# by running Fypp on <dirpath>/<filename>.fypp. It is important to understand
264264
# that this does not actually run the pre-processor. Rather, it instructs
265265
# CMake what to do when it finds a src/<target>/fypp/<filename>.f90 path
266266
# in the source list for a target. Thus, an association is made from an .f90
267-
# file to its corresponding .fpp file (if applicable) even though the
268-
# generation is of the form .fpp -> .f90.
267+
# file to its corresponding .fypp file (if applicable) even though the
268+
# generation is of the form .fypp -> .f90.
269269
#
270-
# This design has one limitation: If an .fpp file depends on another, for
270+
# This design has one limitation: If an .fypp file depends on another, for
271271
# example if it '#:include's it and uses a macro defined in it, then the
272-
# dependency will not be tracked. A modification to the .fpp file it depends
273-
# on will not trigger a re-run of Fypp on the .fpp file that depends on it.
272+
# dependency will not be tracked. A modification to the .fypp file it depends
273+
# on will not trigger a re-run of Fypp on the .fypp file that depends on it.
274274
# As a compromise, both in speed and complexity, all .f90 files generated
275-
# from .fpp files are re-generated not only when their corresponding .fpp
275+
# from .fypp files are re-generated not only when their corresponding .fypp
276276
# file is modified, but also when any file with filepath of the form
277277
#
278-
# src/[<target>,common]/include/*.fpp
278+
# src/[<target>,common]/include/*.fypp
279279
#
280-
# is modified. This is a reasonable compromise as modifications to .fpp files
280+
# is modified. This is a reasonable compromise as modifications to .fypp files
281281
# in the include directories will be rare - by design. Other approaches would
282-
# have required a more complex CMakeLists.txt file (perhaps parsing the .fpp
282+
# have required a more complex CMakeLists.txt file (perhaps parsing the .fypp
283283
# files to determine their dependencies) or the endurment of longer
284-
# compilation times (by way of re-running Fypp on all .fpp files every time
284+
# compilation times (by way of re-running Fypp on all .fypp files every time
285285
# one of them is modified).
286286
#
287-
# .fpp files in src/common are treated as if they were in src/<target> (not
287+
# .fypp files in src/common are treated as if they were in src/<target> (not
288288
# pre-processed to src/common/fypp/) so as not to clash with other targets'
289-
# .fpp files (this has caused problems in the past).
289+
# .fypp files (this has caused problems in the past).
290290
#
291291
# * Export, in the variable <target>_SRCs, a list of all source files (.f90)
292-
# that would compile to produce <target>. If <target> includes .fpp files,
292+
# that would compile to produce <target>. If <target> includes .fypp files,
293293
# then the list will include the paths to the corresponding .f90 files that
294-
# Fypp would generate from the .fpp files.
294+
# Fypp would generate from the .fypp files.
295295
#
296296
# This design allows us to be flexible in our use of Fypp as we don't have to
297-
# worry about running the pre-processor on .fpp files when we create executables
297+
# worry about running the pre-processor on .fypp files when we create executables
298298
# and generate documentation. Instead, we can simply include the list of .f90
299299
# files that will eventually be used to compile <target>.
300300

@@ -316,31 +316,31 @@ macro(HANDLE_SOURCES target useCommon)
316316
endif()
317317

318318
# Gather:
319-
# * src/[<target>,(common)]/*.fpp]
320-
# * (if any) <build>/modules/<target>/*.fpp
321-
file(GLOB ${target}_FPPs CONFIGURE_DEPENDS "${${target}_DIR}/*.fpp"
322-
"${CMAKE_BINARY_DIR}/modules/${target}/*.fpp")
319+
# * src/[<target>,(common)]/*.fypp]
320+
# * (if any) <build>/modules/<target>/*.fypp
321+
file(GLOB ${target}_FYPPs CONFIGURE_DEPENDS "${${target}_DIR}/*.fypp"
322+
"${CMAKE_BINARY_DIR}/modules/${target}/*.fypp")
323323
if (${useCommon})
324-
file(GLOB common_FPPs CONFIGURE_DEPENDS "${common_DIR}/*.fpp")
325-
list(APPEND ${target}_FPPs ${common_FPPs})
324+
file(GLOB common_FYPPs CONFIGURE_DEPENDS "${common_DIR}/*.fypp")
325+
list(APPEND ${target}_FYPPs ${common_FYPPs})
326326
endif()
327327

328328
# Gather:
329-
# * src/[<target>,common]/include/*.fpp
330-
# * (if any) <build>/include/<target>/*.fpp
331-
file(GLOB ${target}_incs CONFIGURE_DEPENDS "${${target}_DIR}/include/*.fpp"
332-
"${CMAKE_BINARY_DIR}/include/${target}/*.fpp")
329+
# * src/[<target>,common]/include/*.fypp
330+
# * (if any) <build>/include/<target>/*.fypp
331+
file(GLOB ${target}_incs CONFIGURE_DEPENDS "${${target}_DIR}/include/*.fypp"
332+
"${CMAKE_BINARY_DIR}/include/${target}/*.fypp")
333333

334334
if (${useCommon})
335-
file(GLOB common_incs CONFIGURE_DEPENDS "${common_DIR}/include/*.fpp")
335+
file(GLOB common_incs CONFIGURE_DEPENDS "${common_DIR}/include/*.fypp")
336336
list(APPEND ${target}_incs ${common_incs})
337337
endif()
338338

339-
# /path/to/*.fpp (used by <target>) -> <build>/fypp/<target>/*.f90
339+
# /path/to/*.fypp (used by <target>) -> <build>/fypp/<target>/*.f90
340340
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/fypp/${target}")
341-
foreach(fpp ${${target}_FPPs})
342-
cmake_path(GET fpp FILENAME fpp_filename)
343-
set(f90 "${CMAKE_BINARY_DIR}/fypp/${target}/${fpp_filename}.f90")
341+
foreach(fypp ${${target}_FYPPs})
342+
cmake_path(GET fypp FILENAME fypp_filename)
343+
set(f90 "${CMAKE_BINARY_DIR}/fypp/${target}/${fypp_filename}.f90")
344344

345345
add_custom_command(
346346
OUTPUT ${f90}
@@ -356,9 +356,9 @@ macro(HANDLE_SOURCES target useCommon)
356356
-D chemistry=False
357357
--line-numbering
358358
--no-folding
359-
"${fpp}" "${f90}"
360-
DEPENDS "${fpp};${${target}_incs}"
361-
COMMENT "Preprocessing (Fypp) ${fpp_filename}"
359+
"${fypp}" "${f90}"
360+
DEPENDS "${fypp};${${target}_incs}"
361+
COMMENT "Preprocessing (Fypp) ${fypp_filename}"
362362
VERBATIM
363363
)
364364

docs/documentation/case.md

Lines changed: 2 additions & 2 deletions

misc/fpp_to_fypp.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
for file in $(find src -type f | grep -Ev 'autogen' | grep -E '\.fpp$'); do
3+
for file in $(find src -type f | grep -Ev 'autogen' | grep -E '\.fypp$'); do
44
echo "$file"
5-
mv "$file" "$(echo "$file" | sed s/\.fpp/\.fypp/)"
5+
mv "$file" "$(echo "$file" | sed s/\.fypp/\.fypp/)"
66
done

src/common/include/case.fpp

Lines changed: 0 additions & 7 deletions
This file was deleted.
File renamed without changes.

src/common/m_checker_common.fpp renamed to src/common/m_checker_common.fypp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
!!@file m_checker_common.f90
33
!!@brief Contains module m_checker_common
44

5-
#:include 'macros.fpp'
5+
#:include 'macros.fypp'
66

77
!> @brief The purpose of the module is to check for compatible input files for.
88
!! inputs common to pre-processing, post-processing and simulation

src/common/m_chemistry.fpp renamed to src/common/m_chemistry.fypp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
!! @brief Contains module m_chemistry
44
!! @author Henry Le Berre <[email protected]>
55

6-
#:include 'macros.fpp'
7-
#:include 'case.fpp'
6+
#:include 'macros.fypp'
7+
#:include 'case.fypp'
88

99
module m_chemistry
1010

File renamed without changes.

0 commit comments

Comments
 (0)