mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-31 00:23:42 +02:00
Working ninja
This commit is contained in:
parent
c63f2117cf
commit
fbed320e83
@ -12,7 +12,8 @@ The script to create the dependency file (aka `build.ninja`) is
|
||||
* If you only want the binaries (for production workflow) use the flag
|
||||
`--production` in when calling this script. It's quicker
|
||||
* Else if you are a developer and you want to be able to compile specific
|
||||
modules use: `--development`
|
||||
modules use: `--development`. It will create for you the `build.ninja` in each
|
||||
module
|
||||
|
||||
## Compilation Flags
|
||||
|
||||
@ -23,12 +24,7 @@ used. You can edit these files to modify the compiling options.
|
||||
|
||||
## Example to create the Ninja file
|
||||
|
||||
`qp_create_ninja.py --production $QP_ROOT/config/ifort.cfg`
|
||||
|
||||
# WARNING
|
||||
|
||||
For now you need to execute this command if you add a `irp.f` or `EZFIO.cfg`
|
||||
file or modify the `NEED_CHILDREN_MODULE`!
|
||||
`qp_create_ninja.py create --production $QP_ROOT/config/ifort.cfg`
|
||||
|
||||
## Compiling
|
||||
|
||||
@ -37,5 +33,6 @@ elsewhere). The compilation will take approximately 3 min.
|
||||
|
||||
If you have set the `--developement` flag in a specific module you can go in
|
||||
the corresponding module directory and run `ninja` to build only this module.
|
||||
You can type `ninja all` in a module for compiling all the submodule
|
||||
|
||||
Finally, go in `$QP_ROOT/ocaml` and type `make`
|
||||
|
@ -247,11 +247,7 @@ def ninja_ezfio_build(l_ezfio_config, l_util):
|
||||
l_ezfio_from_cfg = [i.ez_config.abs for i in l_util.itervalues()]
|
||||
|
||||
str_ = " ".join(l_ezfio_config + l_ezfio_from_cfg)
|
||||
|
||||
ezfio_make_config = join(QP_ROOT_EZFIO, "make.config")
|
||||
l_string = ["build {0} {1}: build_ezfio {2}".format(EZFIO_LIB,
|
||||
ezfio_make_config,
|
||||
str_), ""]
|
||||
l_string = ["build {0}: build_ezfio {1}".format(EZFIO_LIB, str_), ""]
|
||||
|
||||
return l_string
|
||||
|
||||
@ -381,8 +377,7 @@ def ninja_irpf90_make_rule():
|
||||
# c m d #
|
||||
# ~#~#~ #
|
||||
|
||||
l_cmd = ["cd $module", "rm -rf IRPF90_temp IRPF90_man"
|
||||
] + l_flag + ["irpf90 $include_dir $IRPF90_FLAGS"]
|
||||
l_cmd = ["cd $module"] + l_flag + ["irpf90 $include_dir $IRPF90_FLAGS"]
|
||||
|
||||
# ~#~#~#~#~#~ #
|
||||
# s t r i n g #
|
||||
@ -559,7 +554,7 @@ def ninja_binaries_rule():
|
||||
# c m d #
|
||||
# ~#~#~ #
|
||||
|
||||
l_cmd = ["cd $module/IRPF90_temp", "ninja $out"]
|
||||
l_cmd = ["cd $module/IRPF90_temp", "ninja $out && touch $out"]
|
||||
|
||||
# ~#~#~#~#~#~ #
|
||||
# s t r i n g #
|
||||
@ -653,15 +648,18 @@ def ninja_dot_tree_build(path_module):
|
||||
def create_ninja_module(path_module):
|
||||
path_ninja_root = join(QP_ROOT, "build.ninja")
|
||||
|
||||
l_string = [
|
||||
"rule update_ninja_common", " command = qp_create_ninja.py update",
|
||||
"", "rule make_local_binaries",
|
||||
" command = ninja -f {0} module_{1}".format(path_ninja_root,
|
||||
path_module.rel), ""
|
||||
]
|
||||
l_string = ["rule update_ninja_common",
|
||||
" command = qp_create_ninja.py update", ""]
|
||||
|
||||
l_string += ["rule make_local_binaries",
|
||||
" command = ninja -j 1 -f {0} module_{1}".format(
|
||||
path_ninja_root, path_module.rel),
|
||||
" description = Compile only {0}".format(path_module.rel),
|
||||
""]
|
||||
|
||||
l_string += ["rule make_all_binaries",
|
||||
" command = ninja -f {0}".format(path_ninja_root), ""]
|
||||
" command = ninja -j 1 -f {0}".format(path_ninja_root),
|
||||
" description = Compile all the module", ""]
|
||||
|
||||
l_string += ["build dumy_target: update_ninja_common", "",
|
||||
"build all: make_all_binaries dumy_target", "",
|
||||
|
@ -20,3 +20,8 @@ default: Huckel
|
||||
type: double precision
|
||||
doc: Calculated HF energy
|
||||
interface: output
|
||||
|
||||
[energy_sdfsdf]
|
||||
type: double precision
|
||||
doc: Calculated HF energy
|
||||
interface: output
|
||||
|
Loading…
Reference in New Issue
Block a user