8000 Add files to configure with CMake by claudioperez · Pull Request #11 · sanjayg0/feappv · GitHub
[go: up one dir, main page]

Skip to content

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

0