Skip to content

Commit ea0df9b

Browse files
authored
Merge pull request #268 from LLNL/bugfix/improve_target_export
Improve target export
2 parents 5d5063e + 4212e80 commit ea0df9b

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

RELEASE_NOTES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Notable changes include:
1111
State and StateDerivatives object).
1212

1313
* Build changes / improvements:
14-
*
14+
* Improved the target export functionality.
1515

1616
* Bug Fixes / improvements:
1717
* Fixed bug with ConstantBoundary in the presence of porosity with the new porosity models introduced in v2024.01.00.

cmake/spheral_cxx-config.cmake.in

+21-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,29 @@
44
if(NOT axom_DIR)
55
set(axom_DIR "@axom_DIR@" CACHE PATH "")
66
endif()
7-
set(SPHERAL_BLT_DIR "@SPHERAL_BLT_DIR@")
87
set(SPHERAL_CXX_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
98
set(SPHERAL_CXX_INCLUDE_DIRS "${SPHERAL_CXX_INSTALL_PREFIX}/include")
9+
if(NOT @ENABLE_CXXONLY@ AND NOT TARGET Python3)
10+
set(python_DIR "@python_DIR@")
11+
set(Python_EXECUTABLE ${python_DIR}/bin/python3)
12+
set(Python3_EXECUTABLE ${python_DIR}/bin/python3)
13+
find_package(Python3 COMPONENTS Interpreter Development)
14+
set(PYTHON_EXE ${Python3_EXECUTABLE})
15+
endif()
16+
17+
# Guard these assignments to not interfere with projects that use Spheral and SpheralC as TPLs
18+
if(SPHERALC_STANDALONE)
19+
set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@" CACHE PATH "Spheral C compiler path")
20+
set(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@" CACHE PATH "Spheral C++ compiler path")
21+
set(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@" CACHE PATH "Spheral C++ compiler path")
22+
set(ENABLE_MPI @ENABLE_MPI@ CACHE BOOL "")
23+
if(SPHERAL_ENABLE_MPI)
24+
set(MPI_C_COMPILER "@MPI_C_COMPILER@" CACHE PATH "")
25+
set(MPI_CXX_COMPILER "@MPI_CXX_COMPILER@" CACHE PATH "")
26+
set(MPI_Fortran_COMPILER "@MPI_Fortran_COMPILER@" CACHE PATH "")
27+
endif()
28+
endif()
29+
1030
if(NOT TARGET axom)
1131
find_package(axom REQUIRED QUIET NO_DEFAULT_PATH PATHS ${axom_DIR} ${axom_DIR}/lib ${axom_DIR}/lib/cmake)
1232
endif()

0 commit comments

Comments
 (0)