diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c76e15403..2aeecdd616 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -989,7 +989,11 @@ if(${TARGET} STREQUAL "charm4py") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) add_library(charm SHARED empty.cpp) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib_so) - target_link_libraries(charm ck converse memory-default threads-default ldb-rand "-Llib/ -standalone -whole-archive -c++stl -shared") + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + target_link_libraries(charm ck converse memory-default threads-default ldb-rand "-Llib/ -standalone -all_load -c++stl -shared") + else() + target_link_libraries(charm ck converse memory-default threads-default ldb-rand "-Llib/ -standalone -whole-archive -c++stl -shared") + endif() add_dependencies(charm hwloc) endif() diff --git a/src/scripts/Makefile b/src/scripts/Makefile index 440075b1d0..dc5e1d960d 100644 --- a/src/scripts/Makefile +++ b/src/scripts/Makefile @@ -82,7 +82,7 @@ AMPIC AMPIF: AMPI f90charm: charm++ libcharm: charm++ - cd $(L) ; $(CHARMC) -standalone -whole-archive -c++stl -shared -o libcharm.so $(LIBCHARM_LIBS) + cd $(L) ; $(CHARMC) -standalone -whole-archive -c++stl -shared -o libcharm.$(CMK_SHARED_SUF) $(LIBCHARM_LIBS) charm4py: libcharm