mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-19 17:47:41 +00:00
Enabling run_tests build. If the variable GTEST_DIR exists, it builds the executable run_tests. 'make install' will copy the executable at the install/ folder.
Improved doxygen detection. Now 'make doc' will build the documentation at the docs/ folder if doxygen is available. git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@296 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
@@ -19,6 +19,5 @@
|
||||
add_subdirectory(algorithms)
|
||||
add_subdirectory(core)
|
||||
add_subdirectory(main)
|
||||
|
||||
#add_subdirectory(tests)
|
||||
add_subdirectory(tests)
|
||||
#add_subdirectory(utils)
|
||||
|
@@ -17,35 +17,40 @@
|
||||
#
|
||||
|
||||
set(GTEST_DIR $ENV{GTEST_DIR})
|
||||
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_DIR}/include ${GTEST_DIR} ${GTEST_DIR}/src)
|
||||
|
||||
#add_library(gtest ${GTEST_DIR}/src/gtest-all.cc ${GTEST_DIR}/src/gtest_main.cc)
|
||||
|
||||
|
||||
include_directories(
|
||||
${GTEST_INCLUDE_DIRECTORIES}
|
||||
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
${CMAKE_SOURCE_DIR}/src/core/receiver
|
||||
${CMAKE_SOURCE_DIR}/src/core/libs
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/resampler/gnuradio_blocks
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/input_filter/adapters
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/adapters
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/output_filter/adapters
|
||||
${GLOG_INCLUDE_DIRS}
|
||||
${GFlags_INCLUDE_DIRS}
|
||||
${GNURADIO_CORE_INCLUDE_DIRS}
|
||||
${GNURADIO_GRUEL_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
add_executable(run_tests ${CMAKE_CURRENT_SOURCE_DIR}/test_main.cc)
|
||||
target_link_libraries(run_tests ${Boost_LIBRARIES} glog gflags gtest gnss_sp_libs gnss_rx)
|
||||
|
||||
install(TARGETS run_tests
|
||||
DESTINATION ${CMAKE_SOURCE_DIR}/install
|
||||
)
|
||||
if(GTEST_DIR)
|
||||
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_DIR}/include ${GTEST_DIR} ${GTEST_DIR}/src)
|
||||
add_library(gtest ${GTEST_DIR}/src/gtest-all.cc ${GTEST_DIR}/src/gtest_main.cc)
|
||||
include_directories(
|
||||
${GTEST_INCLUDE_DIRECTORIES}
|
||||
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
${CMAKE_SOURCE_DIR}/src/core/receiver
|
||||
${CMAKE_SOURCE_DIR}/src/core/libs
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/libs
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/resampler/gnuradio_blocks
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/input_filter/adapters
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/adapters
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks
|
||||
${CMAKE_SOURCE_DIR}/src/algorithms/output_filter/adapters
|
||||
${GLOG_INCLUDE_DIRS}
|
||||
${GFlags_INCLUDE_DIRS}
|
||||
${GNURADIO_CORE_INCLUDE_DIRS}
|
||||
${GNURADIO_GRUEL_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
)
|
||||
add_executable(run_tests ${CMAKE_CURRENT_SOURCE_DIR}/test_main.cc)
|
||||
target_link_libraries(run_tests ${Boost_LIBRARIES} glog gflags gtest gnss_sp_libs gnss_rx)
|
||||
add_dependencies(run_tests googletest)
|
||||
#add_test(tests_gnss ${CMAKE_SOURCE_DIR}/install/run_tests)
|
||||
install(TARGETS run_tests DESTINATION ${CMAKE_SOURCE_DIR}/install)
|
||||
else()
|
||||
message (" ################################ ")
|
||||
message (" Googletest not found! ")
|
||||
message (" ################################ ")
|
||||
message (" GNSS-SDR test system is based on Googletest, which has not been found ")
|
||||
message (" Tests will not be build. Please download Googletest source code ")
|
||||
message (" and define the environment variable GTEST_DIR pointing to its root folder")
|
||||
endif(GTEST_DIR)
|
Reference in New Issue
Block a user