Skip to content

Commit

Permalink
Fix for Mac (erf-model#1843)
Browse files Browse the repository at this point in the history
amrex_probinit is marked as weak attribute.

Disable shared libs
  • Loading branch information
WeiqunZhang authored Oct 4, 2024
1 parent e13cbab commit 16ca031
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: |
cmake \
-B${{runner.workspace}}/ERF/build \
-DBUILD_SHARED_LIBS:BOOL=TRUE \
-DBUILD_SHARED_LIBS:BOOL=FALSE \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
Expand Down
6 changes: 1 addition & 5 deletions CMake/BuildERFExe.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ function(build_erf_lib erf_lib_name)
${SRC_DIR}/Diffusion/ERF_ComputeStrain_N.cpp
${SRC_DIR}/Diffusion/ERF_ComputeStrain_T.cpp
${SRC_DIR}/Diffusion/ERF_ComputeTurbulentViscosity.cpp
${SRC_DIR}/Initialization/ERF_init_bcs.cpp
${SRC_DIR}/Initialization/ERF_init_custom.cpp
${SRC_DIR}/Initialization/ERF_init_from_hse.cpp
${SRC_DIR}/Initialization/ERF_init_from_input_sounding.cpp
Expand Down Expand Up @@ -296,11 +297,6 @@ function(build_erf_exe erf_exe_name)
include(${CMAKE_SOURCE_DIR}/CMake/SetERFCompileFlags.cmake)
set_erf_compile_flags(${erf_exe_name})

target_sources(${erf_exe_name}
PRIVATE
${SRC_DIR}/Initialization/ERF_init_bcs.cpp

)
if(ERF_ENABLE_CUDA)
set(pctargets "${erf_exe_name}")
foreach(tgt IN LISTS pctargets)
Expand Down
4 changes: 2 additions & 2 deletions Source/ERF_prob_common.H
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ protected:
* Function to init the physical bounds of the domain
* and instantiate a Problem derived from ProblemBase
*/
std::unique_ptr<ProblemBase> amrex_probinit (const amrex_real* problo,
const amrex_real* probhi);
extern std::unique_ptr<ProblemBase> amrex_probinit (const amrex_real* problo,
const amrex_real* probhi) AMREX_ATTRIBUTE_WEAK;

#endif

0 comments on commit 16ca031

Please sign in to comment.