Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiud committed Oct 4, 2023
1 parent 6482757 commit 19279ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,12 @@ set (_PC_FIELDS

set (_PC_HEADERS ucontext.h signal.h)

if (HAVE_UCONTEXT_H AND NOT PC_FROM_UCONTEXT)
if (HAVE_UCONTEXT_H AND NOT DEFINED PC_FROM_UCONTEXT)
foreach (_PC_FIELD ${_PC_FIELDS})
foreach (_PC_HEADER ${_PC_HEADERS})
set (_TMP
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/uctfield.cpp)
file (WRITE ${_TMP} "
#define _GNU_SOURCE 1
#include <${_PC_HEADER}>
int main(void)
{
Expand All @@ -249,14 +248,15 @@ int main(void)
}
")
try_compile (HAVE_PC_FROM_UCONTEXT ${CMAKE_CURRENT_BINARY_DIR} ${_TMP}
COMPILE_DEFINITIONS _GNU_SOURCE=1)
COMPILE_DEFINITIONS -D_GNU_SOURCE)

if (HAVE_PC_FROM_UCONTEXT)
set (PC_FROM_UCONTEXT ${_PC_FIELD} CACHE)
set (PC_FROM_UCONTEXT ${_PC_FIELD} CACHE STRING "")
break ()
endif (HAVE_PC_FROM_UCONTEXT)
endforeach (_PC_HEADER)
endforeach (_PC_FIELD)
endif (HAVE_UCONTEXT_H AND NOT PC_FROM_UCONTEXT)
endif (HAVE_UCONTEXT_H AND NOT DEFINED PC_FROM_UCONTEXT)

set (GOOGLE_NAMESPACE google)
set (_START_GOOGLE_NAMESPACE_ "namespace ${GOOGLE_NAMESPACE} {")
Expand Down
2 changes: 1 addition & 1 deletion src/config.h.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
#cmakedefine LT_OBJDIR

/* How to access the PC from a struct ucontext */
#cmakedefine PC_FROM_UCONTEXT
#cmakedefine PC_FROM_UCONTEXT ${PC_FROM_UCONTEXT}

/* define if we should print file offsets in traces instead of symbolizing. */
#cmakedefine PRINT_UNSYMBOLIZED_STACK_TRACES
Expand Down

0 comments on commit 19279ac

Please sign in to comment.