chipsalliance / fasm

FPGA Assembly (FASM) Parser and Generator
https://fasm.readthedocs.io
Apache License 2.0
90 stars 30 forks source link

Improve the cmake flag configuration #51

Open mithro opened 3 years ago

mithro commented 3 years ago

The cmake file needs some improvement.

It should add;

This is related to #50.

Originally posted by @mithro in https://github.com/SymbiFlow/fasm/pull/48#r570760958

mithro commented 3 years ago

Notes from @litghost ;


https://github.com/SymbiFlow/fasm/pull/48/files#r571089908

https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options?view=msvc-160


https://github.com/SymbiFlow/fasm/pull/48/files#r571092177

https://en.cppreference.com/w/cpp/language/attributes/fallthrough

If ANTLR could emit [[fallthrough]], -Wimplicit-fallthrough=0 is not required.


https://github.com/SymbiFlow/fasm/pull/48/files#r571093017

PIC support might be possible via: https://cmake.org/cmake/help/v3.0/prop_tgt/POSITION_INDEPENDENT_CODE.html

https://cmake.org/cmake/help/latest/module/CheckPIESupported.html#module:CheckPIESupported


https://github.com/SymbiFlow/fasm/pull/48/files#r571097079

CMake has explicit C++ standard select support: https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html

GitHub
WIP: Add GitHub Actions which publish to PyPI by mithro · Pull Request #48 · SymbiFlow/fasm
This pull request will add a GitHub Action which builds the fasm packages, including binary wheels for Linux, Mac and Windows and then upload them to PyPI. WIP -- TODO; Have auto-incrementing ver...
MSVC Compiler Options
Learn more about: Compiler Options
GitHub
WIP: Add GitHub Actions which publish to PyPI by mithro · Pull Request #48 · SymbiFlow/fasm
This pull request will add a GitHub Action which builds the fasm packages, including binary wheels for Linux, Mac and Windows and then upload them to PyPI. WIP -- TODO; Have auto-incrementing ver...
C++ attribute: fallthrough (since C++17) - cppreference.com
GitHub
WIP: Add GitHub Actions which publish to PyPI by mithro · Pull Request #48 · SymbiFlow/fasm
This pull request will add a GitHub Action which builds the fasm packages, including binary wheels for Linux, Mac and Windows and then upload them to PyPI. WIP -- TODO; Have auto-incrementing ver...
POSITION_INDEPENDENT_CODE — CMake 3.0.2 Documentation
CheckPIESupported — CMake 3.19.5 Documentation
GitHub
WIP: Add GitHub Actions which publish to PyPI by mithro · Pull Request #48 · SymbiFlow/fasm
This pull request will add a GitHub Action which builds the fasm packages, including binary wheels for Linux, Mac and Windows and then upload them to PyPI. WIP -- TODO; Have auto-incrementing ver...
CXX_STANDARD — CMake 3.19.5 Documentation