Skip to content
9 changes: 9 additions & 0 deletions var/spack/repos/builtin/packages/mapl/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,12 @@ def patch(self):
subprocess.check_output(nc_pc_cmd, encoding="utf8").strip()
filter_file("(target_link_libraries[^)]+PUBLIC )", \
r'\1 %s '%nc_flags, "pfio/CMakeLists.txt")

def setup_build_environment(self, env):
# esma_cmake, an internal dependency of mapl, is
# looking for the cmake argument -DBASEDIR, and
# if it doesn't find it, it's looking for an
# environment variable with the same name. This
# name is common and used all over the place,
# and if it is set it breaks the mapl build.
env.unset("BASEDIR")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oops. Sorry about this, @climbfuji. I added that code because users here didn't want to always pass in -DBASEDIR on the CMake line. I don't mind doing it, but users liked being able to do cmake -B build and all works.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Not a problem at all, just wondering if we could use a safer name going forward, for example GEOS_BASEDIR or something like that?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Well, if/when we go to Spack, we won't need it, so that's nice. Unfortunately, BASEDIR is pretty much embedded into the foundations of GEOS. Build system, run script, etc.