Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/common/check_vfproj.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ def get_source_files(src_path, verbose=False):
extensions = ("*.[fF]", "*.[fF]9[05]", "*.inc")
for ext in extensions:
for path in src_path.glob(f"**/{ext}"):
yield path.absolute()
if "generated" not in path.parts:
yield path.absolute()


def get_extra_files(extrafiles_path, src_path, extra_path, verbose=False):
Expand All @@ -36,6 +37,8 @@ def get_msvs_files(vfproj_path, src_path, extra_path=None, verbose=False):
root = tree.getroot()
for f in root.iter("File"):
path = f.attrib["RelativePath"].replace("\\", "/")
if "generated" in path.split("/"):
continue
yield (
(
extra_path
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ dist

mod_temp/
obj_temp/
msvs/generated/
src_temp/
pymake/dependencies/
pymake/dependencies_std/
Expand Down
3 changes: 3 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ if is_parallel_build and build_machine.system() == 'windows'
include_directories: petsc_incdir)
endif

# Tool used to generate templated Fortran sources
fypp = find_program('fypp', required : true)

# build mf6 and libmf6
buildname = get_option('buildname')
subdir('src')
Expand Down
13 changes: 8 additions & 5 deletions msvs/mf6core.vfproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TargetEnvironment="midlTargetAMD64"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPreBuildEventTool" CommandLine="(if not exist &quot;$(ProjectDir)generated&quot; mkdir &quot;$(ProjectDir)generated&quot;) &amp;&amp; $(ProjectDir)..&#92;.pixi&#92;envs&#92;default&#92;Scripts&#92;fypp.EXE -I $(ProjectDir)..&#92;src&#92;include $(ProjectDir)..&#92;src&#92;Utilities&#92;STLContainers&#92;STLVecInt.fypp $(ProjectDir)generated&#92;STLVecInt.f90 &amp;&amp; $(ProjectDir)..&#92;.pixi&#92;envs&#92;default&#92;Scripts&#92;fypp.EXE -I $(ProjectDir)..&#92;src&#92;include $(ProjectDir)..&#92;src&#92;Utilities&#92;STLContainers&#92;STLVecDbl.fypp $(ProjectDir)generated&#92;STLVecDbl.f90"/>
<Tool Name="VFPostBuildEventTool"/>
</Configuration>
<Configuration Name="Release|x64" UseCompiler="ifortCompiler" OutputDirectory="obj_temp\$(ProjectName)\$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="obj_temp\$(ProjectName)\$(PlatformName)\$(ConfigurationName)" ConfigurationType="typeStaticLibrary">
Expand All @@ -22,7 +22,7 @@
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TargetEnvironment="midlTargetAMD64"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPreBuildEventTool" CommandLine="(if not exist &quot;$(ProjectDir)generated&quot; mkdir &quot;$(ProjectDir)generated&quot;) &amp;&amp; $(ProjectDir)..&#92;.pixi&#92;envs&#92;default&#92;Scripts&#92;fypp.EXE -I $(ProjectDir)..&#92;src&#92;include $(ProjectDir)..&#92;src&#92;Utilities&#92;STLContainers&#92;STLVecInt.fypp $(ProjectDir)generated&#92;STLVecInt.f90 &amp;&amp; $(ProjectDir)..&#92;.pixi&#92;envs&#92;default&#92;Scripts&#92;fypp.EXE -I $(ProjectDir)..&#92;src&#92;include $(ProjectDir)..&#92;src&#92;Utilities&#92;STLContainers&#92;STLVecDbl.fypp $(ProjectDir)generated&#92;STLVecDbl.f90"/>
<Tool Name="VFPostBuildEventTool"/>
</Configuration>
<Configuration Name="Debug|Win32" UseCompiler="ifortCompiler" OutputDirectory="obj_temp\$(ProjectName)\$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="obj_temp\$(ProjectName)\$(PlatformName)\$(ConfigurationName)" ConfigurationType="typeStaticLibrary">
Expand All @@ -32,7 +32,7 @@
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPreBuildEventTool" CommandLine="(if not exist &quot;$(ProjectDir)generated&quot; mkdir &quot;$(ProjectDir)generated&quot;) &amp;&amp; $(ProjectDir)..&#92;.pixi&#92;envs&#92;default&#92;Scripts&#92;fypp.EXE -I $(ProjectDir)..&#92;src&#92;include $(ProjectDir)..&#92;src&#92;Utilities&#92;STLContainers&#92;STLVecInt.fypp $(ProjectDir)generated&#92;STLVecInt.f90 &amp;&amp; $(ProjectDir)..&#92;.pixi&#92;envs&#92;default&#92;Scripts&#92;fypp.EXE -I $(ProjectDir)..&#92;src&#92;include $(ProjectDir)..&#92;src&#92;Utilities&#92;STLContainers&#92;STLVecDbl.fypp $(ProjectDir)generated&#92;STLVecDbl.f90"/>
<Tool Name="VFPostBuildEventTool"/>
</Configuration>
<Configuration Name="Release|Win32" UseCompiler="ifortCompiler" OutputDirectory="obj_temp\$(ProjectName)\$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="obj_temp\$(ProjectName)\$(PlatformName)\$(ConfigurationName)" ConfigurationType="typeStaticLibrary">
Expand All @@ -42,7 +42,7 @@
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPreBuildEventTool" CommandLine="(if not exist &quot;$(ProjectDir)generated&quot; mkdir &quot;$(ProjectDir)generated&quot;) &amp;&amp; $(ProjectDir)..&#92;.pixi&#92;envs&#92;default&#92;Scripts&#92;fypp.EXE -I $(ProjectDir)..&#92;src&#92;include $(ProjectDir)..&#92;src&#92;Utilities&#92;STLContainers&#92;STLVecInt.fypp $(ProjectDir)generated&#92;STLVecInt.f90 &amp;&amp; $(ProjectDir)..&#92;.pixi&#92;envs&#92;default&#92;Scripts&#92;fypp.EXE -I $(ProjectDir)..&#92;src&#92;include $(ProjectDir)..&#92;src&#92;Utilities&#92;STLContainers&#92;STLVecDbl.fypp $(ProjectDir)generated&#92;STLVecDbl.f90"/>
<Tool Name="VFPostBuildEventTool"/>
</Configuration>
</Configurations>
Expand Down Expand Up @@ -930,12 +930,15 @@
<File RelativePath="..\src\Utilities\sort.f90"/>
<File RelativePath="..\src\Utilities\Sparse.f90"/>
<File RelativePath="..\src\Utilities\STLStackInt.f90"/>
<File RelativePath="..\src\Utilities\STLVecInt.f90"/>
<File RelativePath="..\src\Utilities\StringList.f90"/>
<File RelativePath="..\src\Utilities\Table.f90"/>
<File RelativePath="..\src\Utilities\TableTerm.f90"/>
<File RelativePath="..\src\Utilities\Timer.f90"/>
<File RelativePath="..\src\Utilities\version.f90"/>
<Filter Name="STLContainers">
<File RelativePath="generated\STLVecInt.f90"/>
<File RelativePath="generated\STLVecDbl.f90"/>
</Filter>
</Filter>
<File RelativePath="..\src\mf6core.f90"/>
<File RelativePath="..\src\mf6lists.f90"/>
Expand Down
26 changes: 26 additions & 0 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ filelock = "*"
flaky = "*"
fortran-language-server = "*"
fprettify = "*"
fypp = "*"
geopandas = "*"
gitpython = "*"
jinja2 = ">=3.1.5,<4"
Expand Down
4 changes: 4 additions & 0 deletions src/Utilities/STLContainers/STLVecDbl.fypp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

#:include "STLVector.fypp"

$:VECTOR_TEMPLATE("Dbl", "real(DP)")
5 changes: 5 additions & 0 deletions src/Utilities/STLContainers/STLVecInt.fypp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

#:include "STLVector.fypp"

$:VECTOR_TEMPLATE("Int", "integer(I4B)")

20 changes: 20 additions & 0 deletions src/Utilities/STLContainers/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
fypp_files = [
'STLVecInt.fypp',
'STLVecDbl.fypp',
]

generated_sources = []

foreach f : fypp_files
generated_sources += custom_target(
f.replace('.fypp', '') + '_gen',
input : f,
output : f.replace('.fypp', '.f90'),
command: [
fypp,
'-I' + meson.project_source_root() / 'src' / 'include',
'@INPUT@',
'@OUTPUT@'
]
)
endforeach
Loading
Loading