1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 12:10:34 +00:00
This commit is contained in:
Carles Fernandez 2019-10-04 14:47:13 +02:00
commit 5efb676226
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
3 changed files with 18 additions and 18 deletions

View File

@ -401,8 +401,8 @@ set(GNSSSDR_PROTOBUF_MIN_VERSION "3.0.0")
################################################################################
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.2")
set(GNSSSDR_GLOG_LOCAL_VERSION "0.4.0")
set(GNSSSDR_ARMADILLO_LOCAL_VERSION "9.700.x")
set(GNSSSDR_GTEST_LOCAL_VERSION "1.8.1")
set(GNSSSDR_ARMADILLO_LOCAL_VERSION "10.100.x")
set(GNSSSDR_GTEST_LOCAL_VERSION "1.10.0")
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
set(GNSSSDR_GPSTK_LOCAL_VERSION "2.12")
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.17")

View File

@ -220,9 +220,9 @@ $ sudo apt-get install libblas-dev liblapack-dev # For Debian/Ubuntu/Linux
$ sudo yum install lapack-devel blas-devel # For Fedora/CentOS/RHEL
$ sudo zypper install lapack-devel blas-devel # For OpenSUSE
$ sudo pacman -S blas lapack # For Arch Linux
$ wget http://sourceforge.net/projects/arma/files/armadillo-9.700.2.tar.xz
$ tar xvfz armadillo-9.700.2.tar.xz
$ cd armadillo-9.700.2
$ wget https://sourceforge.net/projects/arma/files/armadillo-9.700.3.tar.xz
$ tar xvfz armadillo-9.700.3.tar.xz
$ cd armadillo-9.700.3
$ cmake .
$ make
$ sudo make install
@ -264,9 +264,9 @@ $ sudo ldconfig
#### Build the [Google C++ Testing Framework](https://github.com/google/googletest "Googletest Homepage"), also known as Google Test:
~~~~~~
$ wget https://github.com/google/googletest/archive/release-1.8.1.zip
$ unzip release-1.8.1.zip
$ cd googletest-release-1.8.1
$ wget https://github.com/google/googletest/archive/v1.10.x.zip
$ unzip v1.10.x.zip
$ cd googletest-1.10.x
$ cmake -DINSTALL_GTEST=OFF -DBUILD_GMOCK=OFF .
$ make
~~~~~~
@ -274,10 +274,10 @@ $ make
Please **DO NOT install** Google Test (do *not* type `sudo make install`). Every user needs to compile his tests using the same compiler flags used to compile the installed Google Test libraries; otherwise he may run into undefined behaviors (i.e. the tests can behave strangely and may even crash for no obvious reasons). The reason is that C++ has this thing called the One-Definition Rule: if two C++ source files contain different definitions of the same class/function/variable, and you link them together, you violate the rule. The linker may or may not catch the error (in many cases it is not required by the C++ standard to catch the violation). If it does not, you get strange run-time behaviors that are unexpected and hard to debug. If you compile Google Test and your test code using different compiler flags, they may see different definitions of the same class/function/variable (e.g. due to the use of `#if` in Google Test). Therefore, for your sanity, we recommend to avoid installing pre-compiled Google Test libraries. Instead, each project should compile Google Test itself such that it can be sure that the same flags are used for both Google Test and the tests. The building system of GNSS-SDR does the compilation and linking of googletest to its own tests; it is only required that you tell the system where the googletest folder that you downloaded resides. Just add to your `$HOME/.bashrc` file the following line:
~~~~~~
export GTEST_DIR=/home/username/googletest-release-1.8.1/googletest
export GTEST_DIR=/home/username/googletest-1.10.x
~~~~~~
changing `/home/username/googletest-release-1.8.1/googletest` by the actual directory where you built googletest.
changing `/home/username/googletest-1.10.x` by the actual directory where you unpacked googletest.

View File

@ -48,7 +48,7 @@ if(NOT GOOGLETEST_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.2)
ExternalProject_Add(gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
GIT_REPOSITORY https://github.com/google/googletest
GIT_TAG release-${GNSSSDR_GTEST_LOCAL_VERSION}
GIT_TAG v1.10.x
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
CMAKE_ARGS ${GTEST_COMPILER} -DINSTALL_GTEST=OFF -DBUILD_GMOCK=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -Dgtest_hide_internal_symbols=ON ${TOOLCHAIN_ARG}
@ -59,14 +59,14 @@ if(NOT GOOGLETEST_FOUND)
else()
ExternalProject_Add(gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
GIT_REPOSITORY https://github.com/google/googletest
GIT_TAG release-${GNSSSDR_GTEST_LOCAL_VERSION}
GIT_TAG v1.10.x
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
CMAKE_ARGS ${GTEST_COMPILER} -DINSTALL_GTEST=OFF -DBUILD_GMOCK=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -Dgtest_hide_internal_symbols=ON ${TOOLCHAIN_ARG}
UPDATE_COMMAND ""
PATCH_COMMAND ""
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
INSTALL_COMMAND ""
)
endif()
@ -78,9 +78,9 @@ if(NOT GOOGLETEST_FOUND)
add_dependencies(GTest::GTest gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
set_target_properties(GTest::GTest PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${binary_dir}/googletest/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LOCATION "${binary_dir}/lib/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/include"
INTERFACE_LINK_LIBRARIES "${binary_dir}/googletest/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
INTERFACE_LINK_LIBRARIES "${binary_dir}/lib/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
set_target_properties(GTest::GTest PROPERTIES
INTERFACE_LINK_LIBRARIES Threads::Threads
@ -91,9 +91,9 @@ if(NOT GOOGLETEST_FOUND)
add_dependencies(GTest::Main gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
set_target_properties(GTest::Main PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${binary_dir}/googletest/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LOCATION "${binary_dir}/lib/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/include"
INTERFACE_LINK_LIBRARIES "${binary_dir}/googletest/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
INTERFACE_LINK_LIBRARIES "${binary_dir}/lib/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
)
endif()
else()