Commit 379d65a9 authored by Dorian Guillois's avatar Dorian Guillois
Browse files

Fix find clib header.

parent fcf7d30b
......@@ -58,14 +58,9 @@ elseif (CLIB_FOUND) # Was Centreon Clib detected with pkg-config ?
set(CMAKE_CXX_FLAGS "${CLIB_CFLAGS}")
endif ()
else ()
find_path(CLIB_INCLUDE_DIR "com/centreon/clib/version.hh")
find_path(CLIB_INCLUDE_DIR "com/centreon/clib/version.hh" PATH_SUFFIXES "centreon-clib")
if (NOT CLIB_INCLUDE_DIR)
find_path(CLIB_INCLUDE_DIR "centreon-clib/com/centreon/clib/version.hh")
if (CLIB_INCLUDE_DIR)
set(CLIB_INCLUDE_DIR "${CLIB_INCLUDE_DIR}/centreon-clib")
else ()
message(FATAL_ERROR "Could not find Centreon Clib's headers (try WITH_CENTREON_CLIB_INCLUDE_DIR).")
endif ()
message(FATAL_ERROR "Could not find Centreon Clib's headers (try WITH_CENTREON_CLIB_INCLUDE_DIR).")
endif ()
include_directories("${CLIB_INCLUDE_DIR}")
endif ()
......
......@@ -140,7 +140,7 @@ void check::on_timeout(bool final) {
// Reset timeout task ID.
_timeout = 0;
if (_child == (pid_t)-1 || !_child)
if (_child <= 0)
return ;
if (final) {
......@@ -310,7 +310,7 @@ void check::_internal_copy(check const& c) {
*/
void check::_send_result_and_unregister(result const& r) {
// Kill subprocess.
if (_child != (pid_t)-1 && _child) {
if (_child > 0) {
kill(_child, SIGKILL);
_child = (pid_t)-1;
}
......
......@@ -156,14 +156,9 @@ elseif (CLIB_FOUND) # Was Centreon Clib detected with pkg-config ?
set(CMAKE_CXX_FLAGS "${CLIB_CFLAGS}")
endif ()
else ()
find_path(CLIB_INCLUDE_DIR "com/centreon/clib/version.hh")
find_path(CLIB_INCLUDE_DIR "com/centreon/clib/version.hh" PATH_SUFFIXES "centreon-clib")
if (NOT CLIB_INCLUDE_DIR)
find_path(CLIB_INCLUDE_DIR "centreon-clib/com/centreon/clib/version.hh")
if (CLIB_INCLUDE_DIR)
set(CLIB_INCLUDE_DIR "${CLIB_INCLUDE_DIR}/centreon-clib")
else ()
message(FATAL_ERROR "Could not find Centreon Clib's headers (try WITH_CENTREON_CLIB_INCLUDE_DIR).")
endif ()
message(FATAL_ERROR "Could not find Centreon Clib's headers (try WITH_CENTREON_CLIB_INCLUDE_DIR).")
endif ()
include_directories("${CLIB_INCLUDE_DIR}")
endif ()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment