Commit e95cc575 authored by David Boucher's avatar David Boucher
Browse files

fix(cmake): unit tests did not compile

parent 1df68b36
...@@ -46,12 +46,12 @@ add_subdirectory(ssh) ...@@ -46,12 +46,12 @@ add_subdirectory(ssh)
# Testing. # Testing.
option(WITH_TESTING "Build unit tests." OFF) option(WITH_TESTING "Build unit tests." OFF)
if (WITH_TESTING) if (WITH_TESTING)
find_package(gtest REQUIRED) find_package(GTest REQUIRED)
include_directories(${gtest_INCLUDE_DIRS}) include_directories(${GTest_INCLUDE_DIRS})
include_directories(/usr/lib64/perl5/CORE) include_directories(/usr/lib64/perl5/CORE)
link_directories(${gtest_LIB_DIRS}) link_directories(${GTest_LIB_DIRS})
include_directories(${CMAKE_SOURCE_DIR}/perl/inc) include_directories(${CMAKE_SOURCE_DIR}/perl/inc)
include_directories(${CMAKE_SOURCE_DIR}/ssh/inc) include_directories(${CMAKE_SOURCE_DIR}/ssh/inc)
...@@ -87,5 +87,5 @@ if (WITH_TESTING) ...@@ -87,5 +87,5 @@ if (WITH_TESTING)
${CMAKE_SOURCE_DIR}/ssh/test/sessions.cc ${CMAKE_SOURCE_DIR}/ssh/test/sessions.cc
) )
target_link_libraries(ut ${gtest_LIBS} ${CLIB_LIBRARIES} ${PERL_LIBRARIES} ${fmt_LIBS} ${spdlog_LIBS} ${LIBSSH2_LIBRARIES}) target_link_libraries(ut ${GTest_LIBS} ${CLIB_LIBRARIES} ${PERL_LIBRARIES} ${fmt_LIBS} ${spdlog_LIBS} ${LIBSSH2_LIBRARIES})
endif (WITH_TESTING) endif (WITH_TESTING)
...@@ -19,8 +19,7 @@ else ...@@ -19,8 +19,7 @@ else
fi fi
cd build cd build
conan remote add centreon https://api.bintray.com/conan/centreon/centreon conan install ..
conan install --remote centreon ..
CXXFLAGS="-Wall -Wextra" "$cmake" -DCMAKE_BUILD_TYPE=Debug -DWITH_TESTING=On -DWITH_PREFIX_BINARY=/usr/lib64/centreon-connector/ $* .. CXXFLAGS="-Wall -Wextra" "$cmake" -DCMAKE_BUILD_TYPE=Debug -DWITH_TESTING=On -DWITH_PREFIX_BINARY=/usr/lib64/centreon-connector/ $* ..
......
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