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

Add files to configure with CMake #11

Open
wants to merge 68 commits into
base: devel
Choose a base branch
from

Conversation

claudioperez
Copy link

This pull request adds some CMake scripts I put together a while ago. CMake is becoming a defacto standard in the scientific computing ecosystem. Some advantages of using CMake include:

  • Integration with new libraries Because many new libraries in the scientific computing ecosystem are migrating to CMake-based builds, using it can greatly simplify integration of these tools as project dependencies.
  • Quarantined builds: When building with the newly added CMake scripts, builds are automatically quarantined so that no files are created in source directories. Instead, all build artifacts (*.o files, etc.) are contained under a root-level build folder. With make alone, it can quickly become very cumbersome to implement quarantined builds.
  • Dependency resolution: CMake can significantly simplify the configuration of builds and dependency resolution.
  • Consistent workflow: CMake facilitates using a single workflow for building. The following commands should work on any operating system:
    # Configure once with:
    mkdir ./build
    cmake -S . -B ./build
    # Compile with 8 parallel jobs
    cmake --build ./build -j8

Notes:

  • These changes only introduce an alternative build method and will have no impact on the existing make build. Things will continue to work exactly as they always have.
  • With the exception of .gitignore, no preexisting files have been modified. Only new files are introduced.

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

Successfully merging this pull request may close these issues.

3 participants