GMLC-TDC / helics-ns3

ns-3 module for integrating with a HELICS co-simulation
GNU General Public License v2.0
3 stars 8 forks source link

Add support for building with CMake #47

Open nightlark opened 2 years ago

nightlark commented 2 years ago

ns-3 merged support for building with CMake on December 1st!

No more waf weirdness! Well, that's probably sticking around for a while, but supporting CMake could make some use cases much easier.

The minimum CMake version we should target is 3.10 to match the minimum version ns-3 allows. For a first pass, helics-ns3 should be able to build as a contrib module like it currently does with the ns-3 build system in charge of the actual build.

Eventually, helics-ns3 should be decoupled from building as a contrib module and should be able to work as a standalone project that uses find_package to locate an already compiled/installed copy of ns-3; this may require some changes to the upstream ns-3 build system to make sure it properly installs compiled ns-3 libraries/headers.

If this works, then package managers (e.g. spack) with ns-3 will work as a way to install ns-3 for building helics-ns3, and helics-ns3 could become a separate spack package that is easy to install and reuse. With the contrib module system this wasn't possible due to contrib modules not being able to build as part of spack compiling ns-3.