From ab0035d1a15939e5fdb5b965b464d567327e72a4 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 7 Feb 2019 09:34:32 +0100 Subject: [PATCH 1/2] Reorder link targets --- src/main/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt index 603890a73..0008ae648 100644 --- a/src/main/CMakeLists.txt +++ b/src/main/CMakeLists.txt @@ -25,9 +25,9 @@ target_link_libraries(gnss-sdr Boost::system Gflags::gflags Glog::glog + Threads::Threads gnss_rx gnss_sdr_flags - Threads::Threads ) # Disable internal logging From 3ddbef49ba15d4348d0bfb598ee62498a406f2ea Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 7 Feb 2019 19:26:09 +0100 Subject: [PATCH 2/2] Fix gtest includes --- src/tests/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 6800c1e2b..476d1c7d8 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -85,6 +85,7 @@ if(NOT ${GTEST_DIR_LOCAL}) endif() if(NOT TARGET GTest::GTest) + file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/include) add_library(GTest::GTest STATIC IMPORTED) add_dependencies(GTest::GTest gtest-${GNSSSDR_GTEST_LOCAL_VERSION}) set_target_properties(GTest::GTest PROPERTIES @@ -114,20 +115,19 @@ else() add_library(gtest STATIC ${LIBGTEST_DEV_DIR}/googletest/src/gtest-all.cc) target_include_directories(gtest PUBLIC - ${LIBGTEST_DEV_DIR}/googletest/include - ${LIBGTEST_DEV_DIR}/googletest + ${GTEST_INCLUDE_DIRECTORIES} ) add_library(gtest_main STATIC ${LIBGTEST_DEV_DIR}/googletest/src/gtest_main.cc) target_include_directories(gtest_main PUBLIC - ${LIBGTEST_DEV_DIR}/googletest/include + ${GTEST_INCLUDE_DIRECTORIES} ) if(NOT TARGET GTest::GTest) add_library(GTest::GTest STATIC IMPORTED) add_dependencies(GTest::GTest gtest) set_target_properties(GTest::GTest PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - INTERFACE_INCLUDE_DIRECTORIES "${LIBGTEST_DEV_DIR}/googletest/include" + INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIRS}" INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX}" IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX}" ) @@ -140,7 +140,7 @@ else() add_dependencies(GTest::Main gtest_main) set_target_properties(GTest::Main PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - INTERFACE_INCLUDE_DIRECTORIES "${LIBGTEST_DEV_DIR}/googletest/include" + INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIRS}" INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX}" IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX}" )