cmake: allow to disable symbolize
This commit is contained in:
parent
e51790bf33
commit
39e83581de
@ -416,7 +416,7 @@ if (WITH_SYMBOLIZE)
|
|||||||
}
|
}
|
||||||
]=] HAVE_SYMBOLIZE)
|
]=] HAVE_SYMBOLIZE)
|
||||||
|
|
||||||
cmake_pop_check_state ()
|
cmake_pop_check_state ()
|
||||||
|
|
||||||
if (HAVE_SYMBOLIZE)
|
if (HAVE_SYMBOLIZE)
|
||||||
set (HAVE_STACKTRACE 1)
|
set (HAVE_STACKTRACE 1)
|
||||||
@ -426,6 +426,11 @@ if (WITH_SYMBOLIZE)
|
|||||||
endif (WIN32 OR CYGWIN)
|
endif (WIN32 OR CYGWIN)
|
||||||
endif (WITH_SYMBOLIZE)
|
endif (WITH_SYMBOLIZE)
|
||||||
|
|
||||||
|
# CMake manages symbolize availability. The definition is necessary only when
|
||||||
|
# building the library. Switch to add_compile_definitions once we drop support
|
||||||
|
# for CMake below version 3.12.
|
||||||
|
add_definitions (-DGLOG_NO_SYMBOLIZE_DETECTION)
|
||||||
|
|
||||||
check_cxx_source_compiles ("
|
check_cxx_source_compiles ("
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|||||||
@ -127,6 +127,7 @@
|
|||||||
# define HAVE_STACKTRACE
|
# define HAVE_STACKTRACE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLOG_NO_SYMBOLIZE_DETECTION
|
||||||
#ifndef HAVE_SYMBOLIZE
|
#ifndef HAVE_SYMBOLIZE
|
||||||
// defined by gcc
|
// defined by gcc
|
||||||
#if defined(__ELF__) && defined(OS_LINUX)
|
#if defined(__ELF__) && defined(OS_LINUX)
|
||||||
@ -139,6 +140,7 @@
|
|||||||
# define HAVE_SYMBOLIZE
|
# define HAVE_SYMBOLIZE
|
||||||
#endif
|
#endif
|
||||||
#endif // !defined(HAVE_SYMBOLIZE)
|
#endif // !defined(HAVE_SYMBOLIZE)
|
||||||
|
#endif // !defined(GLOG_NO_SYMBOLIZE_DETECTION)
|
||||||
|
|
||||||
#ifndef ARRAYSIZE
|
#ifndef ARRAYSIZE
|
||||||
// There is a better way, but this is good enough for our purpose.
|
// There is a better way, but this is good enough for our purpose.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user