Closed mathomp4 closed 2 years ago
There is no option to use namespaces. We have considered the idea of adding namespaced names automatically, but having something working while preserving backwards compatibility (having both MyProject::mylib
and mylib
defined) proved to be tricky, and impossible with older versions of CMake (<3.12 at the time the tests were done).
Adding it as an option to ecbuild_install_project
should be easy enough, if you want to give it a try ;)
ecbuild_add_persistent
, is completely unrelated, it is a tool to generate serialisation code for C++ classes automatically.
There is no option to use namespaces. We have considered the idea of adding namespaced names automatically, but having something working while preserving backwards compatibility (having both
MyProject::mylib
andmylib
defined) proved to be tricky, and impossible with older versions of CMake (<3.12 at the time the tests were done).
We are getting close to making CMake 3.17 almost a necessity, so might work for us 😄
Adding it as an option to
ecbuild_install_project
should be easy enough, if you want to give it a try ;)
Well, I might give it a try. See what happens and what I break... I think I can see where to add it.
A query from someone who doesn't know a lot of deep internal CMake as well as he should. Namely, we currently use ecbuild in a local project and we make a project, libraries, etc. with it. However, I was wondering if there was a way with ecbuild to get the snazzy namespace-like access? A la
MPI::MPI_Fortran
orNetCDF::NetCDF_C
? So I could haveMyLib::profiler
say.Maybe this is automatic, but I didn't see a
NAMESPACE
option toecbuild_add_library
or any of the otherecbuild_
commands we use.I see
ecbuild_add_persistent
has aNAMESPACE
option, but my brief run through the things that use it don't quite match up to examples like this one. And, well, I'm not to sure what thatecbuild_add_persistent
does, so I'm hesitant to try it out. 😄