Skip to content

Commit

Permalink
Unify stack-overflow detection options, remove reference to libsigsegv
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Nov 20, 2017
1 parent a7f7eec commit 15a4868
Showing 1 changed file with 6 additions and 23 deletions.
29 changes: 6 additions & 23 deletions CMakeLists.txt
Expand Up @@ -161,17 +161,17 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
endif()

if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
set(HPX_WITH_THREAD_STACKOVERFLOW_DETECTION_DEFAULT OFF)
set(HPX_WITH_STACKOVERFLOW_DETECTION_DEFAULT OFF)
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UC)
if("${CMAKE_BUILD_TYPE_UC}" STREQUAL "DEBUG")
set(HPX_WITH_THREAD_STACKOVERFLOW_DETECTION_DEFAULT ON)
set(HPX_WITH_STACKOVERFLOW_DETECTION_DEFAULT ON)
endif()
hpx_option(HPX_WITH_THREAD_STACKOVERFLOW_DETECTION
hpx_option(HPX_WITH_STACKOVERFLOW_DETECTION
BOOL
"Enable stackoverflow detection for HPX threads/coroutines. (default: OFF, debug: ON)"
${HPX_WITH_THREAD_STACKOVERFLOW_DETECTION_DEFAULT} ADVANCED)
if(HPX_WITH_THREAD_STACKOVERFLOW_DETECTION)
hpx_add_config_define(HPX_HAVE_THREAD_STACKOVERFLOW_DETECTION)
${HPX_WITH_STACKOVERFLOW_DETECTION_DEFAULT} ADVANCED)
if(HPX_WITH_STACKOVERFLOW_DETECTION)
hpx_add_config_define(HPX_HAVE_STACKOVERFLOW_DETECTION)
endif()
endif()

Expand All @@ -186,11 +186,6 @@ hpx_option(HPX_WITH_HWLOC
"Use Hwloc for hardware topology information and thread pinning. If disabled, performance might be reduced."
ON ADVANCED)

hpx_option(HPX_WITH_STACKOVERFLOW_DETECTION
BOOL
"Enable Stack Overflow Detection (default: OFF)"
OFF ADVANCED)

# Logging configuration
hpx_option(HPX_WITH_LOGGING BOOL
"Build HPX with logging enabled (default: ON)."
Expand Down Expand Up @@ -1520,18 +1515,6 @@ if(HPX_WITH_HWLOC)
hpx_add_config_define(HPX_HAVE_HWLOC)
endif()

hpx_add_config_define(HPX_HAVE_STACKOVERFLOW_DETECTION "\"${HPX_WITH_STACKOVERFLOW_DETECTION}\"")

if(HPX_WITH_STACKOVERFLOW_DETECTION)
find_package(LibSigSegv)
if(NOT LIBSIGSEGV_FOUND)
hpx_error("LibSigSegv could not be found and HPX_WITH_STACKOVERFLOW_DETECTION=ON, please specify LIBSIGSEGV_ROOT to point to the correct location or set HPX_WITH_STACKOVERFLOW_DETECTION to OFF")
endif()
hpx_libraries(${LIBSIGSEGV_LIBRARIES})
include_directories(${LIBSIGSEGV_INCLUDE_DIR})
hpx_add_config_define(HPX_HAVE_STACKOVERFLOW_DETECTION)
endif()

################################################################################
# Enable integration with Intel Amplifier
################################################################################
Expand Down

0 comments on commit 15a4868

Please sign in to comment.