[hamradio-commits] [gnss-sdr] 225/303: Regroup CMake options for testing
Carles Fernandez
carles_fernandez-guest at moszumanska.debian.org
Mon Feb 13 22:36:03 UTC 2017
This is an automated email from the git hooks/post-receive script.
carles_fernandez-guest pushed a commit to branch master
in repository gnss-sdr.
commit 71c19cac99912c07a7350dd96a850d078bee9fb8
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date: Tue Jan 10 18:57:38 2017 +0100
Regroup CMake options for testing
-DENABLE_UNIT_TESTING (defaults to ON): Builds unit tests
-DENABLE_SYSTEM_TESTING (defaults to OFF): Builds system tests
-DENABLE_SYSTEM_TESTING_EXTRA (defaults to OFF): Builds extra tools (a
software-defined signal generator and GPSTk) and extra system tests
-DENABLE_OWN_GPSTK (defaults to OFF): forces a local download and builds
GPSTk even if it is already installed in your system.
If ENABLE_SYSTEM_TESTING_EXTRA is set to ON, then ENABLE_SYSTEM_TESTING
is also set to ON automatically.
This commit removes the option ENABLE_SW_GENERATOR
---
CMakeLists.txt | 9 +++++++--
src/tests/CMakeLists.txt | 9 ++++-----
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6088edd..bf4835f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,8 +67,13 @@ if(ENABLE_PACKAGING)
endif(ENABLE_PACKAGING)
# Testing
-option(ENABLE_SYSTEM_TESTING "Builds system tests" OFF)
-option(ENABLE_UNIT_TESTING "Builds unit tests" ON)
+option(ENABLE_UNIT_TESTING "Build unit tests" ON)
+option(ENABLE_SYSTEM_TESTING "Build system tests" OFF)
+option(ENABLE_SYSTEM_TESTING_EXTRA "Download external tools and build extra system tests" OFF)
+if(ENABLE_SYSTEM_TESTING_EXTRA)
+ set(ENABLE_SYSTEM_TESTING ON)
+endif(ENABLE_SYSTEM_TESTING_EXTRA)
+option(ENABLE_OWN_GPSTK "Force to download, build and link GPSTk for system tests, even if it is already installed" OFF)
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 71aae6c..9d12519 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -136,8 +136,7 @@ endif(ENABLE_CUDA)
################################################################################
# Optional generator
################################################################################
-option(ENABLE_OWN_GPSTK "Download, build and link GPSTk for system tests" OFF)
-if(ENABLE_SW_GENERATOR)
+if(ENABLE_SYSTEM_TESTING_EXTRA)
ExternalProject_Add(
gnss-sim
GIT_REPOSITORY https://bitbucket.org/jarribas/gnss-simulator
@@ -186,7 +185,7 @@ if(ENABLE_SW_GENERATOR)
set(GPSTK_BINDIR ${GPSTK_LIBRARY}/../bin/ )
add_definitions(-DGPSTK_BINDIR="${GPSTK_BINDIR}")
endif(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
-endif(ENABLE_SW_GENERATOR)
+endif(ENABLE_SYSTEM_TESTING_EXTRA)
add_definitions(-DTEST_PATH="${CMAKE_SOURCE_DIR}/src/tests/")
@@ -489,7 +488,7 @@ if(ENABLE_SYSTEM_TESTING)
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:ttff>
)
- if(ENABLE_SW_GENERATOR)
+ if(ENABLE_SYSTEM_TESTING_EXTRA)
add_executable(obs_gps_l1_system_test ${CMAKE_CURRENT_SOURCE_DIR}/system-tests/obs_gps_l1_system_test.cc )
if(NOT ${GTEST_DIR_LOCAL})
add_dependencies(obs_gps_l1_system_test gtest-${gtest_RELEASE} )
@@ -507,5 +506,5 @@ if(ENABLE_SYSTEM_TESTING)
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:obs_gps_l1_system_test>
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:obs_gps_l1_system_test>
)
- endif(ENABLE_SW_GENERATOR)
+ endif(ENABLE_SYSTEM_TESTING_EXTRA)
endif(ENABLE_SYSTEM_TESTING)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git
More information about the pkg-hamradio-commits
mailing list