Skip to content

Commit

Permalink
cmake: allow to disable symbolize
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiud committed Apr 7, 2021
1 parent e51790b commit 9c7cbb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ if (WITH_SYMBOLIZE)
}
]=] HAVE_SYMBOLIZE)

cmake_pop_check_state ()
cmake_pop_check_state ()

if (HAVE_SYMBOLIZE)
set (HAVE_STACKTRACE 1)
Expand All @@ -426,6 +426,9 @@ if (WITH_SYMBOLIZE)
endif (WIN32 OR CYGWIN)
endif (WITH_SYMBOLIZE)

# CMake manages symbolize availability
add_compile_definitions (GLOG_NO_SYMBOLIZE_DETECTION)

check_cxx_source_compiles ("
#include <cstdlib>
#include <time.h>
Expand Down
2 changes: 2 additions & 0 deletions src/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
# define HAVE_STACKTRACE
#endif

#ifndef GLOG_NO_SYMBOLIZE_DETECTION
#ifndef HAVE_SYMBOLIZE
// defined by gcc
#if defined(__ELF__) && defined(OS_LINUX)
Expand All @@ -139,6 +140,7 @@
# define HAVE_SYMBOLIZE
#endif
#endif // !defined(HAVE_SYMBOLIZE)
#endif // !defined(GLOG_NO_SYMBOLIZE_DETECTION)

#ifndef ARRAYSIZE
// There is a better way, but this is good enough for our purpose.
Expand Down

0 comments on commit 9c7cbb9

Please sign in to comment.