CMakeLists: use HAVE_LIBEXECINFO only after actually checking for it

So far, the check that actually sets HAVE_LIBEXECINFO was executed after
it was already used to add dependencies.
This commit is contained in:
Julian Brost 2020-10-27 15:31:39 +01:00
parent 24f6283362
commit cdfcef4d63

View File

@ -203,10 +203,6 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/lib ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/lib
) )
if(HAVE_LIBEXECINFO)
list(APPEND base_DEPS execinfo)
endif()
if(UNIX OR CYGWIN) if(UNIX OR CYGWIN)
list(APPEND base_OBJS $<TARGET_OBJECTS:execvpe>) list(APPEND base_OBJS $<TARGET_OBJECTS:execvpe>)
endif() endif()
@ -365,6 +361,7 @@ check_include_file_cxx(cxxabi.h HAVE_CXXABI_H)
if(HAVE_LIBEXECINFO) if(HAVE_LIBEXECINFO)
set(HAVE_BACKTRACE_SYMBOLS TRUE) set(HAVE_BACKTRACE_SYMBOLS TRUE)
list(APPEND base_DEPS execinfo)
endif() endif()
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")