Skip to content

Commit 0b33f67

Browse files
authored
Merge pull request #4196 from STEllAR-GROUP/osx_build_fixes
minor fixes for building on OSX Darwin
2 parents b6052d9 + 0443f28 commit 0b33f67

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/CMakeLists.txt

+7-3
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,15 @@ endforeach()
325325
foreach(_module ${HPX_LIBS})
326326

327327
set(_module_target hpx_${_module})
328-
if(UNIX OR APPLE)
328+
if(UNIX)
329329
# add the full archive (some are not used directly in libhpx and need to be
330330
# forced into libhpx with this option)
331-
set(_module_target "-Wl,--whole-archive" "${_module_target}" "-Wl,--no-whole-archive")
332-
endif()
331+
if(APPLE)
332+
set(_module_target "-Wl,-all_load" "${_module_target}")
333+
else(APPLE) # not apple, regular linux
334+
set(_module_target "-Wl,--whole-archive" "${_module_target}" "-Wl,--no-whole-archive")
335+
endif(APPLE)
336+
endif(UNIX)
333337

334338
# add module binaries as PRIVATE dependencies to the core hpx library to
335339
# avoid dependent applicatons have to link against those

0 commit comments

Comments
 (0)