mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-09-20 03:29:05 +01:00
9755688d1c
This fixes linker errors in debug builds. When building in debug mode (-DCMAKE_BUILD_TYPE=Debug), folly requires the function "safe_assert_terminate" to be defined. To avoid building and linking against folly, we define our own no-op version of this function.
20 lines
612 B
C++
20 lines
612 B
C++
#include <folly/lang/SafeAssert.h>
|
|
|
|
namespace folly {
|
|
namespace detail {
|
|
|
|
// The FOLLY_SAFE_DCHECK macro is peppered throughout the folly headers. When
|
|
// building in release mode this macro does nothing, but in debug builds it
|
|
// requires safe_assert_terminate() to be defined. To avoid building and
|
|
// linking against folly, we define our own no-op version of this function here.
|
|
template <>
|
|
void safe_assert_terminate<false>(safe_assert_arg const* arg, ...) noexcept {
|
|
}
|
|
|
|
template <>
|
|
void safe_assert_terminate<true>(safe_assert_arg const* arg, ...) noexcept {
|
|
}
|
|
|
|
} // namespace detail
|
|
} // namespace folly
|