ecmwf / ecbuild

A CMake-based build system, consisting of a collection of CMake macros and functions that ease the managing of software build systems
https://ecbuild.readthedocs.io
Apache License 2.0
26 stars 25 forks source link

Adding extra CMAKE_BUILD_TYPE? #33

Open mathomp4 opened 3 years ago

mathomp4 commented 3 years ago

A query for the "canonical" ecbuild. We (in GEOS) have a fork of ecbuild that we use in our project. Recently I had to patch our fork because I wanted to add a new CMAKE_BUILD_TYPE and it wasn't one of the allowed types by ecbuild: https://github.com/ecmwf/ecbuild/blob/d4347cf92466c742ef989444b2acbf7c867a338e/cmake/ecbuild_define_build_types.cmake#L51-L59

My question is: is there a better way to do this? I added Aggressive as I was adding "aggressive" flags, but say someone wanted to use the more "official" MinSizeRel (which is in the CMake source). As far as I can tell, they couldn't with ecbuild.

mathomp4 commented 3 years ago

@tlmquintino Just a ping. Do you have a good method of a way to "add" additional CMAKE_BUILD_TYPES to an ecbuild system (extra functions, toolchains, etc.)?