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

Moving src/External #414

Merged
merged 10 commits into from
Jul 12, 2024
Merged

Moving src/External #414

merged 10 commits into from
Jul 12, 2024

Conversation

mabruzzo
Copy link
Contributor

Pull request summary

This PR moves the location of the external files out of src/External into the newly-created root-level external/pngwriter directory.

Detailed Description

This change is mostly cosmetic.

  • It adopts a slightly more standard directory layout (at least among cmake-built projects). The build-directory will also have slightly nicer organization as we start adding some automatic dependency-management support.
  • It also synergizes well with the changes introduced in CMake Refactoring - Laying Foundations for (optional) Automatic Dependency Management #413 -- that introduce a distinction between Enzo-E/Cello source files and source files for external dependencies (for the purpose of applying compiler options).

I also removed external/pngwriter/external.dir

Finally, I made a few minor tweaks to external/pngwriter/CMakeLists.txt so that it looks and acts a little more like a CMakeLists.txt file of a standalone project.

This is a major change or addition (that needs 2 reviewers): no

mabruzzo added 7 commits June 17, 2024 09:27
The idea is to decouple the minimum set of required fortran flags to get
Enzo-E to compile from any other fortran-flags specified in the
machine-files.

This isn't used quite yet
As part of this commit, I needed to removed the flags from the existing
machine files.
I now returns a list of compilation flags (wrapped in appropriate
generator expressions)
It was moved to earlier in the file. The idea is to insolate compilation
of "vendored dependencies" from the arbitrary flags that users specify
for building Enzo-E/Cello.

In practice, this doesn't matter right now. But in the future, it could
matter a lot more! For example a dependency could entirely break when,
-> using unsafe-floating point optimizations...
-> using compiler-flags to properly handle Enzo-E's fortran dialect
The purpose of these variables is to act similarly to the standard
``CMAKE_<LANG>_FLAGS`` variables, but only affect the source files
directly used by Cello/Enzo-E. (The whole idea is to explicitly avoid
is this new set of variables won't affect any external dependencies that
is being compiled as a part of this build)
@mabruzzo mabruzzo force-pushed the move-src/External branch from d111db0 to 2c85225 Compare June 17, 2024 13:27
@gregbryan gregbryan requested a review from jobordner June 24, 2024 17:33
@gregbryan
Copy link
Contributor

This looks good to me -- I left a few minor comments.

set(CMAKE_Fortran_FLAGS "-ffixed-line-length-132" CACHE STRING "Default Fortran flags")

# the minimal set of required flags to successfully compile with this Fortran
# compiler are handled internally (if those flags don't work, please update
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may not be immediately clear to someone trying to compile what "internal" means here (I assume this refers to RequiredFortranCompileOptions.cmake or similar) -- maybe point to docs or somewhere to give user some help?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's right. I'll try to address that in #413 (due to an oversight on my part, some of the commits were mixed between the 2 PRs -- I thought I had removed the commits of #413 from this branch, but it looks like I messed up and some were merged in)

@bwoshea bwoshea merged commit 3f0190a into enzo-project:main Jul 12, 2024
7 checks passed
@mabruzzo
Copy link
Contributor Author

Thanks @bwoshea for taking the lead on patching this up. I was a little distracted over the past few days

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