-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Switching build system to Meson
- Loading branch information
Showing
13 changed files
with
89 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"mesonbuild.configureOnOpen": true, | ||
"C_Cpp.default.compileCommands": "builddir/vscode_compile_commands.json", | ||
"cmake.configureOnOpen": false | ||
"cmake.configureOnOpen": false, | ||
"C_Cpp.default.configurationProvider": "mesonbuild.mesonbuild" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
old_path = path | ||
path = join_paths(path, 'brenner') | ||
|
||
brenner_sources = [ | ||
'brenner.f90', | ||
'brenner_scr.f90' | ||
join_paths(path, 'brenner.f90'), | ||
join_paths(path, 'brenner_scr.f90') | ||
] | ||
|
||
incdirs = include_directories('../../..', '../../../support') | ||
|
||
potentials_brenner = static_library( | ||
'brenner', | ||
brenner_sources, | ||
include_directories: incdirs, | ||
link_with: [atomistica_supplib, atomistica_corelib], | ||
dependencies: atomistica_dependencies, | ||
install: true # needed, otherwise it is not copied to wheel | ||
) | ||
all_potentials_sources += brenner_sources | ||
|
||
all_potentials_sources += brenner_sources | ||
path = old_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,9 @@ | ||
old_path = path | ||
path = join_paths(path, 'juslin') | ||
|
||
juslin_sources = [ | ||
'juslin.f90', | ||
'juslin_scr.f90' | ||
join_paths(path, 'juslin.f90'), | ||
join_paths(path, 'juslin_scr.f90') | ||
] | ||
|
||
incdirs = include_directories('../../..', '../../../support') | ||
|
||
potentials_juslin = static_library( | ||
'juslin', | ||
juslin_sources, | ||
include_directories: incdirs, | ||
link_with: [atomistica_supplib, atomistica_corelib], | ||
dependencies: atomistica_dependencies, | ||
install: true # needed, otherwise it is not copied to wheel | ||
) | ||
|
||
all_potentials_sources += juslin_sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,9 @@ | ||
old_path = path | ||
path = join_paths(path, 'kumagai') | ||
|
||
kumagai_sources = [ | ||
'kumagai.f90', | ||
'kumagai_scr.f90' | ||
join_paths(path, 'kumagai.f90'), | ||
join_paths(path, 'kumagai_scr.f90') | ||
] | ||
|
||
incdirs = include_directories('../../..', '../../../support') | ||
|
||
potentials_kumagai = static_library( | ||
'kumagai', | ||
kumagai_sources, | ||
include_directories: incdirs, | ||
link_with: [atomistica_supplib, atomistica_corelib], | ||
dependencies: atomistica_dependencies, | ||
install: true # needed, otherwise it is not copied to wheel | ||
) | ||
|
||
all_potentials_sources += kumagai_sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
old_path = path | ||
path = join_paths(path, 'bop') | ||
|
||
subdir('brenner') | ||
subdir('juslin') | ||
subdir('kumagai') | ||
subdir('rebo2') | ||
subdir('tersoff') | ||
subdir('tersoff') | ||
|
||
path = old_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,10 @@ | ||
old_path = path | ||
path = join_paths(path, 'rebo2') | ||
|
||
rebo2_sources = [ | ||
'rebo2_default_tables.f90', | ||
'rebo2.f90', | ||
'rebo2_scr.f90' | ||
join_paths(path, 'rebo2_default_tables.f90'), | ||
join_paths(path, 'rebo2.f90'), | ||
join_paths(path, 'rebo2_scr.f90') | ||
] | ||
|
||
incdirs = include_directories('../../..', '../../../support') | ||
|
||
potentials_rebo2 = static_library( | ||
'rebo2', | ||
rebo2_sources, | ||
include_directories: incdirs, | ||
link_with: [atomistica_supplib, atomistica_corelib], | ||
dependencies: atomistica_dependencies, | ||
install: true # needed, otherwise it is not copied to wheel | ||
) | ||
|
||
all_potentials_sources += rebo2_sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,9 @@ | ||
old_path = path | ||
path = join_paths(path, 'tersoff') | ||
|
||
tersoff_sources = [ | ||
'tersoff.f90', | ||
'tersoff_scr.f90' | ||
join_paths(path, 'tersoff.f90'), | ||
join_paths(path, 'tersoff_scr.f90') | ||
] | ||
|
||
incdirs = include_directories('../../..', '../../../support') | ||
|
||
potentials_tersoff = static_library( | ||
'tersoff', | ||
tersoff_sources, | ||
include_directories: incdirs, | ||
link_with: [atomistica_supplib, atomistica_corelib], | ||
dependencies: atomistica_dependencies, | ||
install: true # needed, otherwise it is not copied to wheel | ||
) | ||
|
||
all_potentials_sources += tersoff_sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,22 @@ | ||
old_path = path | ||
path = join_paths(path, 'coulomb') | ||
|
||
coulomb_sources = [ | ||
'coulomb_short_gamma.f90', | ||
'cutoff_coulomb.f90', | ||
'damp_short_gamma.f90', | ||
'direct_coulomb.f90', | ||
'gaussian_charges.f90', | ||
'pme_kernel.f90', | ||
'pme.f90', | ||
'slater_charges.f90' | ||
join_paths(path, 'coulomb_short_gamma.f90'), | ||
join_paths(path, 'cutoff_coulomb.f90'), | ||
join_paths(path, 'damp_short_gamma.f90'), | ||
join_paths(path, 'direct_coulomb.f90'), | ||
join_paths(path, 'gaussian_charges.f90'), | ||
join_paths(path, 'pme_kernel.f90'), | ||
join_paths(path, 'pme.f90'), | ||
join_paths(path, 'slater_charges.f90') | ||
] | ||
|
||
if not atomistica_with_fftw3 | ||
coulomb_sources += [ | ||
'fft3-public.f', | ||
'fft_wrap.f', | ||
join_paths(path, 'fft3-public.f'), | ||
join_paths(path, 'fft_wrap.f') | ||
] | ||
endif | ||
|
||
incdirs = include_directories('../..', '../../support') | ||
|
||
potentials_coulomb = static_library( | ||
'coulomb', | ||
coulomb_sources, | ||
include_directories: incdirs, | ||
link_with: [atomistica_supplib, atomistica_corelib], | ||
dependencies: atomistica_dependencies, | ||
install: true # needed, otherwise it is not copied to wheel | ||
) | ||
|
||
all_potentials_sources += coulomb_sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
old_path = path | ||
path = join_paths(path, 'dispersion') | ||
|
||
dispersion_sources = [ | ||
'dispdftd3.f90' | ||
join_paths(path, 'dispdftd3.f90'), | ||
] | ||
|
||
incdirs = include_directories('../..', '../../support') | ||
|
||
potentials_dispersion = static_library( | ||
'dispersion', | ||
dispersion_sources, | ||
include_directories: incdirs, | ||
link_with: [atomistica_supplib, atomistica_corelib], | ||
dependencies: atomistica_dependencies, | ||
install: true # needed, otherwise it is not copied to wheel | ||
) | ||
all_potentials_sources += dispersion_sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,9 @@ | ||
eam_sources = [ | ||
'tabulated_eam.f90', | ||
'tabulated_alloy_eam.f90' | ||
] | ||
|
||
incdirs = include_directories('../..', '../../support') | ||
old_path = path | ||
path = join_paths(path, 'eam') | ||
|
||
potentials_eam = static_library( | ||
'eam', | ||
eam_sources, | ||
include_directories: incdirs, | ||
link_with: [atomistica_supplib, atomistica_corelib], | ||
dependencies: atomistica_dependencies, | ||
install: true # needed, otherwise it is not copied to wheel | ||
) | ||
juslin_sources = [ | ||
join_paths(path, 'tabulated_eam.f90'), | ||
join_paths(path, 'tabulated_alloy_eam.f90') | ||
] | ||
|
||
potentials_sources += eam_sources | ||
all_potentials_sources += juslin_sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
old_path = path | ||
path = join_paths(path, 'pair') | ||
|
||
pair_sources = [ | ||
'born_mayer.f90', | ||
'double_harmonic.f90', | ||
'harmonic.f90', | ||
'lj_cut.f90', | ||
'r6.f90', | ||
join_paths(path, 'born_mayer.f90'), | ||
join_paths(path, 'double_harmonic.f90'), | ||
join_paths(path, 'harmonic.f90'), | ||
join_paths(path, 'lj_cut.f90'), | ||
join_paths(path, 'r6.f90') | ||
] | ||
|
||
incdirs = include_directories('../..', '../../support') | ||
juslin_sources = [ | ||
join_paths(path, 'dispdftd3.f90'), | ||
] | ||
|
||
potentials_pair = static_library( | ||
'pair', | ||
pair_sources, | ||
include_directories: incdirs, | ||
link_with: [atomistica_supplib, atomistica_corelib], | ||
dependencies: atomistica_dependencies, | ||
install: true # needed, otherwise it is not copied to wheel | ||
) | ||
all_potentials_sources += pair_sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#! /usr/bin/env python | ||
|
||
# | ||
# Parse all .f90 files in a certain directory (and subdirectories thereof) | ||
# and scan metadata. | ||
# | ||
|
||
import sys | ||
|
||
from meta import scanmeta | ||
|
||
if __name__ == '__main__': | ||
for fn in sys.argv[1:]: | ||
metadata = scanmeta(fn) |