-
Notifications
You must be signed in to change notification settings - Fork 16
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
Improve target export #268
Conversation
…SpheralC to use when necessary, removed BLT path export
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
cmake/spheral_cxx-config.cmake.in
Outdated
set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@" CACHE PATH "Spheral C compiler path") | ||
set(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@" CACHE PATH "Spheral C++ compiler path") | ||
set(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@" CACHE PATH "Spheral C++ compiler path") | ||
endif() | ||
set(SPHERAL_ENABLE_MPI @ENABLE_MPI@ CACHE BOOL "") | ||
if(SPHERAL_ENABLE_MPI AND NOT DEFINED MPI_C_COMPILER) | ||
set(MPI_C_COMPILER "@MPI_C_COMPILER@" CACHE PATH "") | ||
set(MPI_CXX_COMPILER "@MPI_CXX_COMPILER@" CACHE PATH "") | ||
set(MPI_Fortran_COMPILER "@MPI_Fortran_COMPILER@" CACHE PATH "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this going to set the compilers for every project that tries to include Spheral in it's CMake system? I think we might want to prefix these variable names with "SPHERAL_" so we aren't unintentionally forcing projects to use our compiler and MPI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was a concern of mine. I originally had it prefixed with SPHERAL but that didn't work because I think those flags needed to be set before spheral_cxx-targets is included. I hoped that guarding the sets with checks for whether they are already defined would be enough to prevent issues for other projects that already have those variables set. That was one of the things I hope Paul can try out.
This fixes issues with target exports when using SpheralC.
Summary
ToDo :
RELEASE_NOTES.md
with notable changes.