Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion to Transition Cardinal Project to CMake #896

Open
ahnaf-tahmid-chowdhury opened this issue Jun 5, 2024 · 6 comments
Open

Suggestion to Transition Cardinal Project to CMake #896

ahnaf-tahmid-chowdhury opened this issue Jun 5, 2024 · 6 comments

Comments

@ahnaf-tahmid-chowdhury
Copy link

Description

The Cardinal project currently relies on a Makefile-based build system. While this approach has served us well, I propose transitioning to CMake to improve build management, support for cross-platform development, and integration with modern IDEs.

Proposed Plan

  1. Initial Setup:

    • Create a basic CMakeLists.txt file at the root of the project to start configuring the build process.
    • Gradually convert existing Makefile logic into CMake format, ensuring each step is well-documented and thoroughly tested.
  2. Define Project Structure:

    • Structure the CMake configuration to reflect the logical organization of the project.
  3. Integrate External Dependencies:

    • Use CMake’s find_package() and ExternalProject_Add() commands to handle third-party dependencies like MOOSE, NekRS, OpenMC, etc.
@aprilnovak
Copy link
Collaborator

Hi @ahnaf-tahmid-chowdhury, I'd like to get @milljm's thoughts on this, since he may have some important insights into the make/CMake compatibility (since MOOSE relies on make but OpenMC and NekRS leverage CMake).

@ahnaf-tahmid-chowdhury
Copy link
Author

I noticed that MOOSE uses autotools for configuration. In this context, we can use ExternalProject_Add to build MOOSE if the user requests it. We can also upgrade to autotools, but in that case, I am not very familiar with it, since it is also becoming old nowadays.

@milljm
Copy link
Member

milljm commented Jun 5, 2024

I am flattered, but I don't think I know enough to carry a weighted opinion either way. 😊

I believe top level packages built using CMake are easier to integrate with non CMake projects. And I know we (the MOOSE group) talked about switching to CMake in the past. Although I forget the reasons for it.

Being that @permcody knows more about autotools, I think he should weigh in.

@permcody
Copy link

permcody commented Jun 6, 2024

There are a few Cmake projects that rely on MOOSE these days and work without issue. If it makes sense for Cardinal to change, then we can work with you to give you what you need from our build system. Let us know!

@ahnaf-tahmid-chowdhury
Copy link
Author

We are developing a simulation lab named NukeLab that runs nuclear physics simulations and analyses effortlessly in the cloud. We are using Docker containers to serve different nuclear projects. Since Cardinal has advanced capabilities for working with CAD geometries, we are considering adding this tool to our project.

It seems that building with make takes time, so we are considering using CMake to leverage ninja as well. Additionally, it appears there is no versioning mechanism in place. Therefore, we are hoping to come up with a more robust solution to minimize future maintenance efforts.

@permcody
Copy link

permcody commented Jun 6, 2024

There should be no speed difference between make and Cmake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants