Skip to content

Commit

Permalink
Merge pull request #3412 from NK-Nikunj/cmake_patch
Browse files Browse the repository at this point in the history
Fixes linking with libhpx_wrap error with BSD and Windows based systems
  • Loading branch information
msimberg committed Aug 16, 2018
2 parents be06a49 + f2dfc99 commit 43c0b69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/HPX_SetupTarget.cmake
Expand Up @@ -189,10 +189,11 @@ function(hpx_setup_target target)

if(NOT target_NOLIBS)
if(HPX_WITH_DYNAMIC_HPX_MAIN AND ("${_type}" STREQUAL "EXECUTABLE"))
set(hpx_libs hpx_wrap)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
set(hpx_libs hpx_wrap)
set_target_properties(${target} PROPERTIES LINK_FLAGS "-Wl,-wrap=main")
elseif(APPLE)
set(hpx_libs hpx_wrap)
set_target_properties(${target} PROPERTIES LINK_FLAGS "-Wl,-e,_initialize_main")
endif()
endif()
Expand Down

0 comments on commit 43c0b69

Please sign in to comment.