fmaker
简易的用于intel oneapi fortran与c项目的编译,适用于小项目 若oneapi又发疯改一堆编译选项,可以自定义设置编译和链接等选项
Getting Started
- write 'maker.py'
from cfmaker import compile_manager, ProjectConfig
config = ProjectConfig(
f_srcs=['src/**'],
c_srcs=['src/**'],
project_build_dir='./build',
f_exe_name='example.exe',
c_lib_name='example.lib',
static_libraries=['example.lib']
)
config.auto_add_intel_mpi()
config.auto_set_cc_options()
config.auto_set_fc_options()
compile_manager(config).make()
- execute 'maker.py'
python maker.py #默认以debug模式编译
python maker.py debug #以debug模式编译
python maker.py release #以release模式编译
python maker.py debug update #更新源文件列表后进行debug模式编译
python maker.py release update #更新源文件列表后进行release模式编译
python maker.py clear #删除中间文件
python maker.py clear rmexe #删除中间文件和exe
Advanced
from cfmaker import inner_flag_opt
config.fc_options_debug = '-g -O0' #设置fortran debug编译选项
#修改输出exe的选项
config.f_flag_exe = inner_flag_opt('/Fe', '', ispath=True, isList=False )
#修改输出include的选项
config.f_flag_include = inner_flag_opt('-I', '', ispath=True, isList=True )
Contributing
pip install build installer
python -m build
Release files for cfmaker 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cfmaker-0.2.0.tar.gz | 12.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cfmaker-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.3 kB
Release files / cfmaker-0.2.0.tar.gz
| Download URL | cfmaker-0.2.0.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75e30b04ea069808dee8d213db713821b72d4135cb0fef6df00c772aa6459306
|
|
BLAKE2b-256 checksum How to use checksums |
9bb319b715f3fd54007a914936a987ccd3ac67df53147c5db23c2c957ad628d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / cfmaker-0.2.0-py3-none-any.whl
| Download URL | cfmaker-0.2.0-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04f4f74a48a2c2da99c55131825d89807bca7c7d526a84c432d1c09c4d02afbb
|
|
BLAKE2b-256 checksum How to use checksums |
b27207747e64a7af3f0e41ea1508e9464a23a67175c19ca12a1a99b0506ca30a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|