Skip to main content

A lightweight compilation tool for Fortran and C projects, primarily targeting the Intel oneAPI compilers, ifort and ifx.

Project description

fmaker

简易的用于intel oneapi fortran与c项目的编译,适用于小项目 若oneapi又发疯改一堆编译选项,可以自定义设置编译和链接等选项

Getting Started

  1. 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()
  1. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cfmaker-0.2.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

cfmaker-0.2.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file cfmaker-0.2.0.tar.gz.

File metadata

  • Download URL: cfmaker-0.2.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for cfmaker-0.2.0.tar.gz
Algorithm Hash digest
SHA256 75e30b04ea069808dee8d213db713821b72d4135cb0fef6df00c772aa6459306
MD5 14de29f3956f502ca92fa2fa22276021
BLAKE2b-256 9bb319b715f3fd54007a914936a987ccd3ac67df53147c5db23c2c957ad628d7

See more details on using hashes here.

File details

Details for the file cfmaker-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cfmaker-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for cfmaker-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 04f4f74a48a2c2da99c55131825d89807bca7c7d526a84c432d1c09c4d02afbb
MD5 895fbb59a9acda537933dc32f3edb4e4
BLAKE2b-256 b27207747e64a7af3f0e41ea1508e9464a23a67175c19ca12a1a99b0506ca30a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page