From 054608896ab01b8065ad02794e16611d2837eded Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 7 May 2014 22:08:41 +0200 Subject: [PATCH 01/31] Added warning if GCC is older than 4.7. Fixing detection of GTEST_DIR environment variable --- CMakeLists.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index da52b4e19..8ddc7f824 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,12 +182,23 @@ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "") # Append -O2 optimization flag for Debug builds set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2") +################################################################################ +# Checkout compiler version +################################################################################ + +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) + message(WARNING "Your GCC version is too old and could not support some C++11 features required by GNSS-SDR. GCC version must be at least 4.7") + endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) +endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") ################################################################################ # Googletest - http://code.google.com/p/googletest/ ################################################################################ enable_testing() -set(GTEST_DIR "$ENV{GTEST_DIR}") +if($ENV{GTEST_DIR}) + set(GTEST_DIR $ENV{GTEST_DIR}) +endif($ENV{GTEST_DIR}) if(GTEST_DIR) message(STATUS "GTEST root folder at ${GTEST_DIR}") else() @@ -235,7 +246,7 @@ endif(NOT Boost_FOUND) find_package(Gnuradio) if(NOT GNURADIO_RUNTIME_FOUND) - message(STATUS "cmake cannot find GNU Radio >= 3.7") + message(STATUS "CMake cannot find GNU Radio >= 3.7") if(OS_IS_LINUX) message("Go to http://gnuradio.org/redmine/projects/pybombs/wiki") message("and follow the instructions to install GNU Radio in your system.") From 825a4fc4403a9731768d1db9db95dc709a42f813 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 7 May 2014 23:35:44 +0200 Subject: [PATCH 02/31] Correction of some misspelling --- src/core/receiver/concurrent_map.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/core/receiver/concurrent_map.h b/src/core/receiver/concurrent_map.h index d0734092c..53acae268 100644 --- a/src/core/receiver/concurrent_map.h +++ b/src/core/receiver/concurrent_map.h @@ -15,7 +15,7 @@ * GNSS-SDR is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. + * (at your option) any later version. * * GNSS-SDR is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -44,7 +44,7 @@ template */ class concurrent_map { - typedef typename std::map::iterator Data_iterator; //iterator is ambit dependant + typedef typename std::map::iterator Data_iterator; // iterator is scope dependent private: std::map the_map; boost::mutex the_mutex; @@ -52,15 +52,16 @@ public: void write(int key, Data const& data) { boost::mutex::scoped_lock lock(the_mutex); - Data_iterator data_iter; data_iter = the_map.find(key); if (data_iter != the_map.end()) - { - data_iter->second=data; //update - }else{ - the_map.insert(std::pair(key, data));//insert SILENTLY fails if the item exist in the map!! - } + { + data_iter->second = data; // update + } + else + { + the_map.insert(std::pair(key, data)); // insert SILENTLY fails if the item already exists in the map! + } lock.unlock(); } From 872ed2652777887f84a394eab2b7bd0baf5fb10f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 10 May 2014 02:20:53 +0200 Subject: [PATCH 03/31] Fixes ugly exit when the ephemeris map from SUPL is empty --- src/core/receiver/control_thread.cc | 40 ++++++++++++----------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/src/core/receiver/control_thread.cc b/src/core/receiver/control_thread.cc index 903a115f1..80287823e 100644 --- a/src/core/receiver/control_thread.cc +++ b/src/core/receiver/control_thread.cc @@ -209,8 +209,8 @@ void ControlThread::set_control_queue(boost::shared_ptr control_q */ bool ControlThread::read_assistance_from_XML() { - // return variable (true == succeeded) - bool ret = false; + // return variable (true == succeeded) + bool ret = false; // getting names from the config file, if available std::string eph_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ephemeris_xml", eph_default_xml_filename); std::string utc_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_utc_model.xml", utc_default_xml_filename); @@ -234,8 +234,7 @@ bool ControlThread::read_assistance_from_XML() else { std::cout << "ERROR: SUPL client error reading XML" << std::endl; - std::cout << "Disabling SUPL assistance.." << std::endl; - ret = false; + std::cout << "Disabling SUPL assistance..." << std::endl; } // Only look for {utc, iono, ref time, ref location} if SUPL is enabled bool enable_gps_supl_assistance = configuration_->property("GNSS-SDR.SUPL_gps_enabled", false); @@ -246,48 +245,43 @@ bool ControlThread::read_assistance_from_XML() { LOG(INFO) << "SUPL: Read XML UTC model"; global_gps_utc_model_queue.push(supl_client_acquisition_.gps_utc); - //ret = true; } else { - LOG(ERROR) << "SUPL: couldn't read UTC model XML"; - //ret = false; + LOG(INFO) << "SUPL: couldn't read UTC model XML"; } + // Try to read Iono model from XML if (supl_client_acquisition_.load_iono_xml(iono_xml_filename) == true) { LOG(INFO) << "SUPL: Read XML IONO model"; global_gps_iono_queue.push(supl_client_acquisition_.gps_iono); - //ret = true; } else { - LOG(ERROR) << "SUPL: couldn't read IONO model XML"; - //ret = false; + LOG(INFO) << "SUPL: couldn't read IONO model XML"; } + // Try to read Ref Time from XML if (supl_client_acquisition_.load_ref_time_xml(ref_time_xml_filename) == true) { LOG(INFO) << "SUPL: Read XML Ref Time"; global_gps_ref_time_queue.push(supl_client_acquisition_.gps_time); - //ret = true; } else { - LOG(ERROR) << "SUPL: couldn't read Ref Time XML"; - //ret = false; + LOG(INFO) << "SUPL: couldn't read Ref Time XML"; } + // Try to read Ref Location from XML if (supl_client_acquisition_.load_ref_location_xml(ref_location_xml_filename) == true) { LOG(INFO) << "SUPL: Read XML Ref Location"; global_gps_ref_location_queue.push(supl_client_acquisition_.gps_ref_loc); - //ret = true; } else { - LOG(ERROR) << "SUPL: couldn't read Ref Location XML"; - //ret = false; + LOG(INFO) << "SUPL: couldn't read Ref Location XML"; } } @@ -307,16 +301,16 @@ bool ControlThread::save_assistance_to_XML() std::string ref_time_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_time_xml", ref_time_default_xml_filename); std::string ref_location_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_location_xml", ref_location_default_xml_filename); - std::cout << "SUPL: Try to save GPS ephemeris to XML file " << eph_xml_filename << std::endl; + LOG(INFO) << "SUPL: Try to save GPS ephemeris to XML file " << eph_xml_filename; std::map eph_copy = global_gps_ephemeris_map.get_map_copy(); if (supl_client_ephemeris_.save_ephemeris_map_xml(eph_xml_filename, eph_copy) == true) { - std::cout << "SUPL: Successfully saved ephemeris XML file" << std::endl; + LOG(INFO) << "SUPL: Successfully saved ephemeris XML file"; ret = true; } else { - std::cout << "SUPL: Error while trying to save ephemeris XML file" << std::endl; + LOG(INFO) << "SUPL: Error while trying to save ephemeris XML file. Maybe an empty map?"; ret = false; } // Only try to save {utc, iono, ref time, ref location} if SUPL is enabled @@ -332,7 +326,7 @@ bool ControlThread::save_assistance_to_XML() } else { - LOG(ERROR) << "SUPL: Error while trying to save utc XML file"; + LOG(INFO) << "SUPL: Error while trying to save utc XML file"; //ret = false; } // try to save iono model xml file @@ -344,7 +338,7 @@ bool ControlThread::save_assistance_to_XML() } else { - LOG(ERROR) << "SUPL: Error while trying to save iono XML file"; + LOG(INFO) << "SUPL: Error while trying to save iono XML file"; //ret = false; } // try to save ref time xml file @@ -356,7 +350,7 @@ bool ControlThread::save_assistance_to_XML() } else { - LOG(ERROR) << "SUPL: Error while trying to save ref time XML file"; + LOG(INFO) << "SUPL: Error while trying to save ref time XML file"; //ref = false; } // try to save ref location xml file @@ -368,7 +362,7 @@ bool ControlThread::save_assistance_to_XML() } else { - LOG(ERROR) << "SUPL: Error while trying to save ref location XML file"; + LOG(INFO) << "SUPL: Error while trying to save ref location XML file"; //ret = false; } } From 53b227a0c1663b0ad0e79f54534313234956945a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 11 May 2014 14:50:57 +0200 Subject: [PATCH 04/31] Finding Gflags and Glog if they are installed with Macports. Fixing problems finding Gperftools libraries --- CMakeLists.txt | 6 +++--- cmake/Modules/FindGFlags.cmake | 2 ++ cmake/Modules/FindGLOG.cmake | 10 ++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ddc7f824..9dc3fa4a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -416,10 +416,10 @@ endif(NOT GLOG_FOUND OR LOCAL_GFLAGS) set(GCC_GPERFTOOLS_FLAGS "") find_package(Gperftools) if ( NOT GPERFTOOLS_FOUND ) - message(STATUS "The optional library GPerftools has not been found.") + message(STATUS "The optional library GPerftools has not been found.") else( NOT GPERFTOOLS_FOUND ) - message (STATUS "GPerftools library found." ) - link_libraries(profiler tcmalloc) + message (STATUS "GPerftools library found." ) + link_libraries(${GPERFTOOLS_PROFILER} ${GPERFTOOLS_TCMALLOC}) endif( NOT GPERFTOOLS_FOUND ) list(APPEND CMAKE_CXX_FLAGS ${GCC_GPERFTOOLS_FLAGS}) diff --git a/cmake/Modules/FindGFlags.cmake b/cmake/Modules/FindGFlags.cmake index 9ea60327a..7e392a772 100644 --- a/cmake/Modules/FindGFlags.cmake +++ b/cmake/Modules/FindGFlags.cmake @@ -21,6 +21,7 @@ else (WIN32) FIND_PATH(GFlags_ROOT_DIR libgflags.dylib HINTS + /opt/local/lib /usr/local/lib ) endif (WIN32) @@ -45,6 +46,7 @@ IF(GFlags_ROOT_DIR) FIND_PATH(GFlags_INCLUDE_DIRS gflags/gflags.h HINTS + /opt/local/include /usr/local/include ${GFlags_ROOT_DIR}/src ) diff --git a/cmake/Modules/FindGLOG.cmake b/cmake/Modules/FindGLOG.cmake index 461dc1ffc..bde4b96d9 100644 --- a/cmake/Modules/FindGLOG.cmake +++ b/cmake/Modules/FindGLOG.cmake @@ -23,12 +23,9 @@ endif(MSVC) macro(_FIND_GLOG_LIBRARIES _var) find_library(${_var} - NAMES - ${ARGN} - PATHS - ${LIB_PATHS} - PATH_SUFFIXES - lib + NAMES ${ARGN} + PATHS ${LIB_PATHS} /opt/local/lib + PATH_SUFFIXES lib ) mark_as_advanced(${_var}) endmacro() @@ -53,6 +50,7 @@ else(MSVC) find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h PATHS ${GLOG_ROOT}/include/glog + /opt/local/include/glog # default location in Macports ) endif(MSVC) From d6d90fe4f42c994480c7a2eb1c5da96f6228b403 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 11 May 2014 22:18:54 +0200 Subject: [PATCH 05/31] Gflags and Glog can now be installed via Macports in Mac OS X Mavericks --- README.md | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/README.md b/README.md index a5e1c0ad5..434690997 100644 --- a/README.md +++ b/README.md @@ -348,26 +348,7 @@ $ sudo port upgrade outdated $ sudo port install doxygen +latex $ sudo port install uhd gnuradio $ sudo port install armadillo -~~~~~~ - -Install [Gflags](http://code.google.com/p/gflags/ "Gflags' Homepage") manually from the trunk: - -~~~~~~ -$ svn checkout http://gflags.googlecode.com/svn/trunk gflags-trunk -$ cd gflags-trunk -$ CXXFLAGS="-stdlib=libc++" CC=clang CXX=clang++ ./configure -$ make -$ sudo make install -~~~~~~ - -Install [Glog](http://code.google.com/p/google-glog/ "Glog's Homepage") manually from the subversion repository. Revision 142 is known to work well: - -~~~~~~ -$ svn checkout -r142 http://google-glog.googlecode.com/svn/trunk/ google-glog -$ cd google-glog -$ CXXFLAGS="-stdlib=libc++" CC=clang CXX=clang++ ./configure -$ make -$ sudo make install +$ sudo port install google-glog +gflags ~~~~~~ Finally, you are ready to clone the GNSS-SDR repository and build the software: From 190afb2c32cf0158ef1ab26cd71d827e977c54b6 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 11 May 2014 22:19:53 +0200 Subject: [PATCH 06/31] Updating armadillo version to 4.300.2 --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9dc3fa4a1..3785940ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -523,6 +523,7 @@ if(OS_IS_LINUX) find_library(GFORTRAN NAMES gfortran PATHS /usr/lib /usr/local/lib + /usr/local/lib/i386 /usr/lib/gcc/x86_64-linux-gnu /usr/lib/gcc/i686-linux-gnu /usr/lib/gcc/i386-linux-gnu @@ -618,11 +619,11 @@ if(NOT ARMADILLO_FOUND) BUILD_IN_SOURCE 1 BUILD_COMMAND make UPDATE_COMMAND "" - INSTALL_COMMAND "" + INSTALL_COMMAND "" ) else(OLD_GCC) - set(armadillo_RELEASE 4.100.2) - set(armadillo_MD5 "dd422706778cde656d531b3c3919766e") + set(armadillo_RELEASE 4.300.2) + set(armadillo_MD5 "16c8bf27e989b2eaf6e4096a4c056269") if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}/armadillo-${armadillo_RELEASE}.tar.gz) set(ARMADILLO_PATCH_FILE ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_no.patch) file(WRITE ${ARMADILLO_PATCH_FILE} "") @@ -670,7 +671,7 @@ if(NOT ARMADILLO_FOUND) set(ARMADILLO_INCLUDE_DIRS ${binary_dir}/include ) find_library(lapack NAMES lapack HINTS /usr/lib /usr/local/lib /usr/lib64) find_library(blas NAMES blas HINTS /usr/lib /usr/local/lib /usr/lib64) - set(ARMADILLO_LIBRARIES ${lapack} ${blas} gfortran ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo.a) + set(ARMADILLO_LIBRARIES ${lapack} ${blas} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo.a) set(LOCAL_ARMADILLO true CACHE STRING "Armadillo downloaded and built automatically" FORCE) # Save a copy at the thirdparty folder file(COPY ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE} From 9a4a3443b20c64298745121ab263731341688d11 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 11 May 2014 22:37:43 +0200 Subject: [PATCH 07/31] updating armadillo patch --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3785940ac..65fe38e73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -641,7 +641,7 @@ if(NOT ARMADILLO_FOUND) < set(ARMA_USE_WRAPPER true ) --- > set(ARMA_USE_WRAPPER false) -318c318 +310c310 < add_library( armadillo SHARED \${PROJECT_SOURCE_DIR}/src/wrapper.cpp ) --- > add_library( armadillo STATIC \${PROJECT_SOURCE_DIR}/src/wrapper.cpp ) From 6804f931edf2647a792b8fd4383c318f62b3ce22 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 13 May 2014 01:04:34 +0200 Subject: [PATCH 08/31] Update Armadillo version to 4.300.2 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 434690997..602305189 100644 --- a/README.md +++ b/README.md @@ -72,9 +72,9 @@ $ sudo apt-get install libblas-dev liblapack-dev gfortran # For Debian/Ubuntu/ $ sudo yum install lapack-devel blas-devel gcc-fortran # For Fedora/CentOS/RHEL $ sudo zypper install lapack-devel blas-devel gcc-fortran # For OpenSUSE -$ wget http://sourceforge.net/projects/arma/files/armadillo-4.100.2.tar.gz -$ tar xvfz armadillo-4.100.2.tar.gz -$ cd armadillo-4.100.2 +$ wget http://sourceforge.net/projects/arma/files/armadillo-4.300.2.tar.gz +$ tar xvfz armadillo-4.300.2.tar.gz +$ cd armadillo-4.300.2 $ cmake . $ make $ sudo make install From 0fbea1a25c31fe086b795e3e4531804cb71e063b Mon Sep 17 00:00:00 2001 From: Leonardo Tonetto Date: Tue, 13 May 2014 15:02:45 +0200 Subject: [PATCH 09/31] Cleaning for safety To avoid memory leaks, make sure the supl_ctx_t data structure is initialized and cleaned as well as the connection is closed with the server. Signed-off-by: Carles Fernandez --- src/core/libs/gnss_sdr_supl_client.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core/libs/gnss_sdr_supl_client.cc b/src/core/libs/gnss_sdr_supl_client.cc index 665493db8..a7d374fdc 100644 --- a/src/core/libs/gnss_sdr_supl_client.cc +++ b/src/core/libs/gnss_sdr_supl_client.cc @@ -147,6 +147,7 @@ int gnss_sdr_supl_client::get_assistance(int i_mcc, int i_mns, int i_lac, int i_ mns = i_mns; lac = i_lac; ci = i_ci; + if (supl_ctx_new(&ctx)) {} // clean it before using supl_set_gsm_cell(&ctx, mcc, mns, lac, ci); // PERFORM SUPL COMMUNICATION @@ -161,6 +162,15 @@ int gnss_sdr_supl_client::get_assistance(int i_mcc, int i_mns, int i_lac, int i_ if (err == 0) { read_supl_data(); + if (supl_ctx_free(&ctx)) {} // clean it up before leaving + } + else + { + /* + * If supl_get_assist() fails, the connection remains open + * and the memory/files are not released. + */ + supl_close(&ctx); } delete [] cstr; return err; From 51706f715f4c1fdada1536026f9693944dcd0164 Mon Sep 17 00:00:00 2001 From: Leonardo Tonetto Date: Tue, 13 May 2014 14:58:03 +0200 Subject: [PATCH 10/31] Write assistance data straight to the maps Instead of writing the data downloaded from the assistance servers in the corresponding global queues, write straight to the maps and have it available immediately. Signed-off-by: Carles Fernandez --- src/core/receiver/control_thread.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/receiver/control_thread.cc b/src/core/receiver/control_thread.cc index 80287823e..88674d052 100644 --- a/src/core/receiver/control_thread.cc +++ b/src/core/receiver/control_thread.cc @@ -437,7 +437,7 @@ void ControlThread::init() gps_eph_iter++) { std::cout << "SUPL: Received Ephemeris for GPS SV " << gps_eph_iter->first << std::endl; - global_gps_ephemeris_queue.push(gps_eph_iter->second); + global_gps_ephemeris_map.write(gps_eph_iter->second.i_satellite_PRN, gps_eph_iter->second); } //Save ephemeris to XML file std::string eph_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ephemeris_xml", eph_default_xml_filename); @@ -478,12 +478,12 @@ void ControlThread::init() if (supl_client_ephemeris_.gps_iono.valid == true) { std::cout << "SUPL: Received GPS Iono" << std::endl; - global_gps_iono_queue.push(supl_client_ephemeris_.gps_iono); + global_gps_iono_map.write(0, supl_client_ephemeris_.gps_iono); } if (supl_client_ephemeris_.gps_utc.valid == true) - { + { std::cout << "SUPL: Received GPS UTC Model" << std::endl; - global_gps_utc_model_queue.push(supl_client_ephemeris_.gps_utc); + global_gps_utc_model_map.write(0, supl_client_ephemeris_.gps_utc); } } else @@ -505,17 +505,17 @@ void ControlThread::init() gps_acq_iter++) { std::cout << "SUPL: Received Acquisition assistance for GPS SV " << gps_acq_iter->first << std::endl; - global_gps_acq_assist_queue.push(gps_acq_iter->second); + global_gps_acq_assist_map.write(gps_acq_iter->second.i_satellite_PRN, gps_acq_iter->second); } if (supl_client_acquisition_.gps_ref_loc.valid == true) { std::cout << "SUPL: Received Ref Location (Acquisition Assistance)" << std::endl; - global_gps_ref_location_queue.push(supl_client_acquisition_.gps_ref_loc); + global_gps_ref_location_map.write(0, supl_client_acquisition_.gps_ref_loc); } if (supl_client_acquisition_.gps_time.valid == true) { std::cout << "SUPL: Received Ref Time (Acquisition Assistance)" << std::endl; - global_gps_ref_time_queue.push(supl_client_acquisition_.gps_time); + global_gps_ref_time_map.write(0, supl_client_acquisition_.gps_time); } } else From 71109eec9ef5b1c204d86779c9f6420c974d5292 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 May 2014 01:37:47 +0200 Subject: [PATCH 11/31] Changing some logs from ERROR to WARNING --- src/core/libs/gnss_sdr_supl_client.cc | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/core/libs/gnss_sdr_supl_client.cc b/src/core/libs/gnss_sdr_supl_client.cc index a7d374fdc..92f734d95 100644 --- a/src/core/libs/gnss_sdr_supl_client.cc +++ b/src/core/libs/gnss_sdr_supl_client.cc @@ -393,7 +393,7 @@ bool gnss_sdr_supl_client::save_ephemeris_map_xml(const std::string file_name, s } else { - LOG(ERROR) << "Failed to save Ephemeris, map is empty"; + LOG(WARNING) << "Failed to save Ephemeris, map is empty"; return false; } } @@ -437,7 +437,7 @@ bool gnss_sdr_supl_client::save_utc_map_xml(const std::string file_name, std::ma } else { - LOG(ERROR) << "Failed to save UTC model, map is empty"; + LOG(WARNING) << "Failed to save UTC model, map is empty"; return false; } } @@ -481,7 +481,7 @@ bool gnss_sdr_supl_client::save_iono_map_xml(const std::string file_name, std::m } else { - LOG(ERROR) << "Failed to save IONO model, map is empty"; + LOG(WARNING) << "Failed to save IONO model, map is empty"; return false; } } @@ -525,27 +525,27 @@ bool gnss_sdr_supl_client::save_ref_time_map_xml(const std::string file_name, st } else { - LOG(ERROR) << "Failed to save Ref Time, map is empty"; + LOG(WARNING) << "Failed to save Ref Time, map is empty"; return false; } } bool gnss_sdr_supl_client::load_ref_location_xml(const std::string file_name) { - try - { - std::ifstream ifs(file_name.c_str(), std::ifstream::binary | std::ifstream::in); - boost::archive::xml_iarchive xml(ifs); - xml >> boost::serialization::make_nvp("GNSS-SDR_ref_location_map", this->gps_ref_loc); - ifs.close(); - LOG(INFO) << "Loaded Ref Location data"; - } - catch (std::exception& e) - { - LOG(ERROR) << e.what() << "File: " << file_name; - return false; - } - return true; + try + { + std::ifstream ifs(file_name.c_str(), std::ifstream::binary | std::ifstream::in); + boost::archive::xml_iarchive xml(ifs); + xml >> boost::serialization::make_nvp("GNSS-SDR_ref_location_map", this->gps_ref_loc); + ifs.close(); + LOG(INFO) << "Loaded Ref Location data"; + } + catch (std::exception& e) + { + LOG(ERROR) << e.what() << "File: " << file_name; + return false; + } + return true; } bool gnss_sdr_supl_client::save_ref_location_map_xml(const std::string file_name, std::map ref_location_map) @@ -569,7 +569,7 @@ bool gnss_sdr_supl_client::save_ref_location_map_xml(const std::string file_name } else { - LOG(ERROR) << "Failed to save Ref Location, map is empty"; + LOG(WARNING) << "Failed to save Ref Location, map is empty"; return false; } } From 6f0d018acb3297ff8fd6fc9cffeb2e9bb7cc4b80 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 14 May 2014 01:42:10 +0200 Subject: [PATCH 12/31] Adding Leonardo Tonetto to the list of authors --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 479642451..8ce238627 100644 --- a/AUTHORS +++ b/AUTHORS @@ -42,6 +42,7 @@ David Pubill david.pubill@cttc.cat Developer Mara Branzanti mara.branzanti@gmail.com Developer Marc Molina marc.molina.pena@gmail.com Developer Daniel Fehr daniel.co@bluewin.ch Developer +Leonardo Tonetto tonetto.dev@gmail.com Contributor Ignacio Paniego ignacio.paniego@gmail.com Web design Eva Puchol eva.puchol@gmail.com Web developer Carlos Paniego carpanie@hotmail.com Artwork From f064ce4d4cc153bb6bf6e9aeb0590c3a8920e30e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 15 May 2014 01:15:57 +0200 Subject: [PATCH 13/31] Fixing an error in a constant value --- src/core/system_parameters/MATH_CONSTANTS.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/system_parameters/MATH_CONSTANTS.h b/src/core/system_parameters/MATH_CONSTANTS.h index b8eeabb92..8e106b084 100644 --- a/src/core/system_parameters/MATH_CONSTANTS.h +++ b/src/core/system_parameters/MATH_CONSTANTS.h @@ -79,7 +79,7 @@ const double TWO_N43 = (1.136868377216160e-013); //!< 2^-43 const double TWO_N46 = (1.4210854715202e-014); //!< 2^-46 const double TWO_N50 = (8.881784197001252e-016); //!< 2^-50 -const double TWO_N51 = (4.44089209850063e+016); //!< 2^-51 +const double TWO_N51 = (4.44089209850063e-016); //!< 2^-51 const double TWO_N55 = (2.775557561562891e-017); //!< 2^-55 const double TWO_N59 = (1.73472347597681e-018); //!< 2^-59 From 1518e5ac5d969d2642243f4429c353d70c473db8 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 16 May 2014 19:16:36 +0200 Subject: [PATCH 14/31] Update Armadillo version and other minor cleaning --- CMakeLists.txt | 6 +++--- src/core/system_parameters/MATH_CONSTANTS.h | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 65fe38e73..ebd10fea9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -622,8 +622,8 @@ if(NOT ARMADILLO_FOUND) INSTALL_COMMAND "" ) else(OLD_GCC) - set(armadillo_RELEASE 4.300.2) - set(armadillo_MD5 "16c8bf27e989b2eaf6e4096a4c056269") + set(armadillo_RELEASE 4.300.3) + set(armadillo_MD5 "cdcd41961c3b06ac8cef9645c38bdf50") # cdcd41961c3b06ac8cef9645c38bdf50 if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}/armadillo-${armadillo_RELEASE}.tar.gz) set(ARMADILLO_PATCH_FILE ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_no.patch) file(WRITE ${ARMADILLO_PATCH_FILE} "") @@ -641,7 +641,7 @@ if(NOT ARMADILLO_FOUND) < set(ARMA_USE_WRAPPER true ) --- > set(ARMA_USE_WRAPPER false) -310c310 +312c312 < add_library( armadillo SHARED \${PROJECT_SOURCE_DIR}/src/wrapper.cpp ) --- > add_library( armadillo STATIC \${PROJECT_SOURCE_DIR}/src/wrapper.cpp ) diff --git a/src/core/system_parameters/MATH_CONSTANTS.h b/src/core/system_parameters/MATH_CONSTANTS.h index 8e106b084..83a27c9b8 100644 --- a/src/core/system_parameters/MATH_CONSTANTS.h +++ b/src/core/system_parameters/MATH_CONSTANTS.h @@ -5,7 +5,7 @@ * * ------------------------------------------------------------------------- * - * Copyright (C) 2010-2013 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2014 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver @@ -15,7 +15,7 @@ * GNSS-SDR is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. + * (at your option) any later version. * * GNSS-SDR is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -51,14 +51,14 @@ const double TWO_P32 = (4294967296.0); //!< 2^32 this is too big for const double TWO_P56 = (7.205759403792794e+016); //!< 2^56 const double TWO_P57 = (1.441151880758559e+017); //!< 2^57 -const double TWO_N2 = (0.25); //!< 2^-2 +const double TWO_N2 = (0.25); //!< 2^-2 const double TWO_N5 = (0.03125); //!< 2^-5 -const double TWO_N8 = (0.00390625); //!< 2^-8 -const double TWO_N9 = (0.001953125); //!< 2^-9 +const double TWO_N8 = (0.00390625); //!< 2^-8 +const double TWO_N9 = (0.001953125); //!< 2^-9 const double TWO_N11 = (4.882812500000000e-004); //!< 2^-11 -const double TWO_N14 = (0.00006103515625); //!< 2^-14 -const double TWO_N15 = (0.00003051757813); //!< 2^-15 +const double TWO_N14 = (0.00006103515625); //!< 2^-14 +const double TWO_N15 = (0.00003051757813); //!< 2^-15 const double TWO_N16 = (0.0000152587890625); //!< 2^-16 const double TWO_N19 = (1.907348632812500e-006); //!< 2^-19 const double TWO_N20 = (9.536743164062500e-007); //!< 2^-20 From ca4b8e232cb8caf73f28d842701ce145aaac4536 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 18 May 2014 12:53:16 +0200 Subject: [PATCH 15/31] Fixes automatic building of GFlags and Glog when clang is used (e.g. MacOS X) --- CMakeLists.txt | 91 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 74 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ebd10fea9..fb18d24ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -306,6 +306,28 @@ if (NOT GFlags_FOUND OR LOCAL_GLOG) message (STATUS " when doing 'make'. ") set(gflags_RELEASE 2.0 CACHE STRING "Local gflags release") set(gflags_MD5 "5fd4554d2ba84bf222a2fec0870d28df") + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/tmp/configure_osx +"#!/bin/sh +export CXXFLAGS=\"-stdlib=libc++\" +export CC=clang +export CXX=clang++ +${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags/gflags-${gflags_RELEASE}/configure") + file(COPY ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/tmp/configure_osx + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE} + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ + GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + set(CONF_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/configure_osx) + else("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/tmp/configure_linux +"#!/bin/sh +${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags/gflags-${gflags_RELEASE}/configure") + file(COPY ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/tmp/configure_linux + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE} + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ + GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + set(CONF_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/configure_linux) + endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") ExternalProject_Add( gflags-${gflags_RELEASE} @@ -315,7 +337,7 @@ if (NOT GFlags_FOUND OR LOCAL_GLOG) URL_MD5 ${gflags_MD5} SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags/gflags-${gflags_RELEASE} BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE} - CONFIGURE_COMMAND /configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE} + CONFIGURE_COMMAND ${CONF_SCRIPT} --prefix=${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE} BUILD_COMMAND make UPDATE_COMMAND "" PATCH_COMMAND "" @@ -357,7 +379,22 @@ if (NOT GLOG_FOUND OR LOCAL_GFLAGS) set(glog_RELEASE 0.3.3) set(glog_MD5 "a6fd2c22f8996846e34c763422717c18") if(LOCAL_GFLAGS) - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags +"#!/bin/sh +export CPPFLAGS=-I${GFlags_INCLUDE_DIRS} +export LDFLAGS=-L${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/.libs +export LIBS=${GFlags_SHARED_LIBS} +export CXXFLAGS=\"-stdlib=libc++\" +export CC=clang +export CXX=clang++ +../../thirdparty/glog/glog-${glog_RELEASE}/configure") + file(COPY ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ + GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + else("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags "#!/bin/sh export CPPFLAGS=-I${GFlags_INCLUDE_DIRS} export LDFLAGS=-L${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/.libs @@ -367,6 +404,7 @@ export LIBS=${GFlags_SHARED_LIBS} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") else(LOCAL_GFLAGS) file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags "#!/bin/sh @@ -381,21 +419,39 @@ export LIBS=${GFlags_SHARED_LIBS} endif(LOCAL_GFLAGS) set(GLOG_CONFIGURE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/configure_with_gflags) - ExternalProject_Add( - glog-${glog_RELEASE} - DEPENDS gflags-${gflags_RELEASE} - PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} - URL http://google-glog.googlecode.com/files/glog-${glog_RELEASE}.tar.gz - DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/download/glog-${glog_RELEASE} - URL_MD5 ${glog_MD5} - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE} - BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} - CONFIGURE_COMMAND ${GLOG_CONFIGURE} --prefix= - BUILD_COMMAND make - UPDATE_COMMAND "" - PATCH_COMMAND "" - INSTALL_COMMAND "" - ) + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + ExternalProject_Add( + glog-${glog_RELEASE} + DEPENDS gflags-${gflags_RELEASE} + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} + SVN_REPOSITORY http://google-glog.googlecode.com/svn/trunk + SVN_REVISION -r "142" + DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/download/glog-${glog_RELEASE} + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE} + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} + CONFIGURE_COMMAND ${GLOG_CONFIGURE} --prefix= + BUILD_COMMAND make + UPDATE_COMMAND "" + PATCH_COMMAND "" + INSTALL_COMMAND "" + ) + else("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + ExternalProject_Add( + glog-${glog_RELEASE} + DEPENDS gflags-${gflags_RELEASE} + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} + URL http://google-glog.googlecode.com/files/glog-${glog_RELEASE}.tar.gz + DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/download/glog-${glog_RELEASE} + URL_MD5 ${glog_MD5} + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE} + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} + CONFIGURE_COMMAND ${GLOG_CONFIGURE} --prefix= + BUILD_COMMAND make + UPDATE_COMMAND "" + PATCH_COMMAND "" + INSTALL_COMMAND "" + ) + endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # Set up variables set(GLOG_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${glog_RELEASE}/src/ @@ -409,6 +465,7 @@ endif(NOT GLOG_FOUND OR LOCAL_GFLAGS) + ################################################################################ # GPerftools - http://code.google.com/p/gperftools/ ################################################################################ From e9ac845084afd8036e8c1b9e18473aaa9b7b0f15 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 25 May 2014 13:03:50 +0200 Subject: [PATCH 16/31] Fix CMake script for detecting Python --- drivers/gr-gn3s/cmake/Modules/GrPython.cmake | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/gr-gn3s/cmake/Modules/GrPython.cmake b/drivers/gr-gn3s/cmake/Modules/GrPython.cmake index 791114e05..395faffa5 100644 --- a/drivers/gr-gn3s/cmake/Modules/GrPython.cmake +++ b/drivers/gr-gn3s/cmake/Modules/GrPython.cmake @@ -36,11 +36,11 @@ if(PYTHON_EXECUTABLE) else(PYTHON_EXECUTABLE) #use the built-in find script - find_package(PythonInterp) + find_package(PythonInterp 2) #and if that fails use the find program routine if(NOT PYTHONINTERP_FOUND) - find_program(PYTHON_EXECUTABLE NAMES python python2.7 python2.6 python2.5) + find_program(PYTHON_EXECUTABLE NAMES python python2 python2.7 python2.6 python2.5) if(PYTHON_EXECUTABLE) set(PYTHONINTERP_FOUND TRUE) endif(PYTHON_EXECUTABLE) @@ -48,8 +48,15 @@ else(PYTHON_EXECUTABLE) endif(PYTHON_EXECUTABLE) +if (CMAKE_CROSSCOMPILING) + set(QA_PYTHON_EXECUTABLE "/usr/bin/python") +else (CMAKE_CROSSCOMPILING) + set(QA_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) +endif(CMAKE_CROSSCOMPILING) + #make the path to the executable appear in the cmake gui set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter") +set(QA_PYTHON_EXECUTABLE ${QA_PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter for QA tests") #make sure we can use -B with python (introduced in 2.6) if(PYTHON_EXECUTABLE) @@ -185,7 +192,7 @@ function(GR_PYTHON_INSTALL) file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} pyexe_native) if (CMAKE_CROSSCOMPILING) - set(pyexe_native /usr/bin/env python) + set(pyexe_native "/usr/bin/env python") endif() foreach(pyfile ${GR_PYTHON_INSTALL_PROGRAMS}) @@ -200,8 +207,9 @@ function(GR_PYTHON_INSTALL) add_custom_command( OUTPUT ${pyexefile} DEPENDS ${pyfile} COMMAND ${PYTHON_EXECUTABLE} -c - \"open('${pyexefile}', 'w').write('\#!${pyexe_native}\\n'+open('${pyfile}').read())\" + "open('${pyexefile}','w').write('\#!${pyexe_native}\\n'+open('${pyfile}').read())" COMMENT "Shebangin ${pyfile_name}" + VERBATIM ) #on windows, python files need an extension to execute From 571248f3f21db48b03152987b21a7d09853380a7 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 25 May 2014 13:23:54 +0200 Subject: [PATCH 17/31] Update Armadillo version to 4.300.6 --- CMakeLists.txt | 4 ++-- README.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fb18d24ab..bb4037744 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -679,8 +679,8 @@ if(NOT ARMADILLO_FOUND) INSTALL_COMMAND "" ) else(OLD_GCC) - set(armadillo_RELEASE 4.300.3) - set(armadillo_MD5 "cdcd41961c3b06ac8cef9645c38bdf50") # cdcd41961c3b06ac8cef9645c38bdf50 + set(armadillo_RELEASE 4.300.6) + set(armadillo_MD5 "f9ff49e0a804c3f64e539885808a988f") if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}/armadillo-${armadillo_RELEASE}.tar.gz) set(ARMADILLO_PATCH_FILE ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_no.patch) file(WRITE ${ARMADILLO_PATCH_FILE} "") diff --git a/README.md b/README.md index 602305189..b6a928b4c 100644 --- a/README.md +++ b/README.md @@ -72,9 +72,9 @@ $ sudo apt-get install libblas-dev liblapack-dev gfortran # For Debian/Ubuntu/ $ sudo yum install lapack-devel blas-devel gcc-fortran # For Fedora/CentOS/RHEL $ sudo zypper install lapack-devel blas-devel gcc-fortran # For OpenSUSE -$ wget http://sourceforge.net/projects/arma/files/armadillo-4.300.2.tar.gz -$ tar xvfz armadillo-4.300.2.tar.gz -$ cd armadillo-4.300.2 +$ wget http://sourceforge.net/projects/arma/files/armadillo-4.300.6.tar.gz +$ tar xvfz armadillo-4.300.6.tar.gz +$ cd armadillo-4.300.6 $ cmake . $ make $ sudo make install From 31b4738d3929e197a87c7308b8c0631cf9a17961 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 28 May 2014 20:24:29 +0200 Subject: [PATCH 18/31] Fixing detection of GTEST_DIR environment variable --- CMakeLists.txt | 5 +++-- src/tests/CMakeLists.txt | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb4037744..02e74ae83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -196,9 +196,10 @@ endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # Googletest - http://code.google.com/p/googletest/ ################################################################################ enable_testing() -if($ENV{GTEST_DIR}) +if(EXISTS $ENV{GTEST_DIR}) set(GTEST_DIR $ENV{GTEST_DIR}) -endif($ENV{GTEST_DIR}) + message("++++++++++++++++++HEllo") +endif(EXISTS $ENV{GTEST_DIR}) if(GTEST_DIR) message(STATUS "GTEST root folder at ${GTEST_DIR}") else() diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 3208ff8c1..744ac0a24 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -18,9 +18,9 @@ set(GTEST_DIR_LOCAL "$ENV{GTEST_DIR}") if(NOT GTEST_DIR_LOCAL) - set(GTEST_DIR_LOCAL false) + set(GTEST_DIR_LOCAL false CACHE STRING "Gtest downloaded and built automatically" FORCE) else() - set(GTEST_DIR_LOCAL true) + set(GTEST_DIR_LOCAL true CACHE STRING "Gtest already downloaded" FORCE) endif(NOT GTEST_DIR_LOCAL) From 36a587762b0fca114d654e21c680a9f0ced860c6 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 28 May 2014 22:02:11 +0200 Subject: [PATCH 19/31] Fixing detection of GTEST_DIR variable when defined with -DGTEST_DIR=... --- CMakeLists.txt | 1 - src/tests/CMakeLists.txt | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 02e74ae83..dd39c12d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,7 +198,6 @@ endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") enable_testing() if(EXISTS $ENV{GTEST_DIR}) set(GTEST_DIR $ENV{GTEST_DIR}) - message("++++++++++++++++++HEllo") endif(EXISTS $ENV{GTEST_DIR}) if(GTEST_DIR) message(STATUS "GTEST root folder at ${GTEST_DIR}") diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 744ac0a24..58f730476 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -16,7 +16,14 @@ # along with GNSS-SDR. If not, see . # + +if(EXISTS $ENV{GTEST_DIR}) + set(GTEST_DIR_LOCAL $ENV{GTEST_DIR}) +endif(EXISTS $ENV{GTEST_DIR}) set(GTEST_DIR_LOCAL "$ENV{GTEST_DIR}") +if(GTEST_DIR) + set(GTEST_DIR_LOCAL ${GTEST_DIR}) +endif(GTEST_DIR) if(NOT GTEST_DIR_LOCAL) set(GTEST_DIR_LOCAL false CACHE STRING "Gtest downloaded and built automatically" FORCE) else() From 027fcaa5ccd625c8cc5a2472d856973e4173acdb Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 28 May 2014 22:12:29 +0200 Subject: [PATCH 20/31] Do not force cache of GTEST_DIR_LOCAL so the user can chose either define it or not from cmake commandline --- src/tests/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 58f730476..568ee181e 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -20,14 +20,13 @@ if(EXISTS $ENV{GTEST_DIR}) set(GTEST_DIR_LOCAL $ENV{GTEST_DIR}) endif(EXISTS $ENV{GTEST_DIR}) -set(GTEST_DIR_LOCAL "$ENV{GTEST_DIR}") if(GTEST_DIR) set(GTEST_DIR_LOCAL ${GTEST_DIR}) endif(GTEST_DIR) if(NOT GTEST_DIR_LOCAL) - set(GTEST_DIR_LOCAL false CACHE STRING "Gtest downloaded and built automatically" FORCE) + set(GTEST_DIR_LOCAL false CACHE STRING "Gtest downloaded and built automatically") else() - set(GTEST_DIR_LOCAL true CACHE STRING "Gtest already downloaded" FORCE) + set(GTEST_DIR_LOCAL true CACHE STRING "Gtest already downloaded") endif(NOT GTEST_DIR_LOCAL) From 8f334df645c7fbdfea6d8e0a20944b1f7d080a49 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 30 May 2014 19:07:01 +0200 Subject: [PATCH 21/31] Added FATAL_ERROR if gcc version is not at least 4.7, providing a pointer on how to upgrade to Ubuntu 12.04 users --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dd39c12d5..6852d4bb3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,7 +188,13 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2") if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) - message(WARNING "Your GCC version is too old and could not support some C++11 features required by GNSS-SDR. GCC version must be at least 4.7") + message(STATUS "Your GCC version is too old and does not support some C++11 features required by GNSS-SDR. GCC version must be at least 4.7") + if(${LINUX_DISTRIBUTION} MATCHES "Ubuntu") + if(${LINUX_VER} MATCHES "12.04") + message(STATUS "For instructions on how to upgrade GCC, check http://askubuntu.com/a/271561") + endif(${LINUX_VER} MATCHES "12.04") + endif(${LINUX_DISTRIBUTION} MATCHES "Ubuntu") + message(FATAL_ERROR "Fatal error: GCC >= 4.7 required.") endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") From 2a591bf79c21bcecc9805b740ca594def1c654d5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 31 May 2014 11:18:24 +0200 Subject: [PATCH 22/31] Automatic building of Armadillo 3.x if gcc 4.6 was used is no longer needed, so always download the latest version. Added a flag to compile it with the same compiler than gnss-sdr is being built. --- CMakeLists.txt | 93 +++++++++++++++----------------------------------- 1 file changed, 27 insertions(+), 66 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6852d4bb3..19fddb1bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -645,57 +645,17 @@ if(NOT ARMADILLO_FOUND) endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") message(FATAL_ERROR "The patch command is required to download and build armadillo") endif(NOT PATCH_EXECUTABLE) - set(OLD_GCC false) - if(CMAKE_COMPILER_IS_GNUCC) - execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) - if(GCC_VERSION VERSION_EQUAL 4.6 OR GCC_VERSION VERSION_LESS 4.6) - set(OLD_GCC true) - endif(GCC_VERSION VERSION_EQUAL 4.6 OR GCC_VERSION VERSION_LESS 4.6) - endif(CMAKE_COMPILER_IS_GNUCC) - - if(OLD_GCC) - set(armadillo_RELEASE 3.920.2) - set(armadillo_MD5 "3d0396513e2802c08152f50e18b4a1cd") - if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}/armadillo-${armadillo_RELEASE}.tar.gz) - set(ARMADILLO_PATCH_FILE ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_no.patch) - file(WRITE ${ARMADILLO_PATCH_FILE} "") - else(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}/armadillo-${armadillo_RELEASE}.tar.gz) - set(ARMADILLO_PATCH_FILE ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_staticlib.patch) - file(WRITE ${ARMADILLO_PATCH_FILE} -"35c35 -< set(ARMA_USE_WRAPPER true ) ---- -> set(ARMA_USE_WRAPPER false) -323c323 -< add_library( armadillo SHARED src/wrap_libs ) ---- -> add_library( armadillo STATIC src/wrap_libs ) -") - endif(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}/armadillo-${armadillo_RELEASE}.tar.gz) - ExternalProject_Add( - armadillo-${armadillo_RELEASE} - PREFIX ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE} - URL http://sourceforge.net/projects/arma/files/armadillo-${armadillo_RELEASE}.tar.gz - DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE} - URL_MD5 ${armadillo_MD5} - PATCH_COMMAND patch -N /CMakeLists.txt ${ARMADILLO_PATCH_FILE} - BUILD_IN_SOURCE 1 - BUILD_COMMAND make - UPDATE_COMMAND "" - INSTALL_COMMAND "" - ) - else(OLD_GCC) - set(armadillo_RELEASE 4.300.6) - set(armadillo_MD5 "f9ff49e0a804c3f64e539885808a988f") - if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}/armadillo-${armadillo_RELEASE}.tar.gz) - set(ARMADILLO_PATCH_FILE ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_no.patch) - file(WRITE ${ARMADILLO_PATCH_FILE} "") - set(ARMADILLO_PATCH_FILE2 ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_no2.patch) - file(WRITE ${ARMADILLO_PATCH_FILE2} "") - else(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}/armadillo-${armadillo_RELEASE}.tar.gz) - set(ARMADILLO_PATCH_FILE ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_staticlib.patch) - set(ARMADILLO_PATCH_FILE2 ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_enable_lapack.patch) - file(WRITE ${ARMADILLO_PATCH_FILE} + set(armadillo_RELEASE 4.300.6) + set(armadillo_MD5 "f9ff49e0a804c3f64e539885808a988f") + if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}/armadillo-${armadillo_RELEASE}.tar.gz) + set(ARMADILLO_PATCH_FILE ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_no.patch) + file(WRITE ${ARMADILLO_PATCH_FILE} "") + set(ARMADILLO_PATCH_FILE2 ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_no2.patch) + file(WRITE ${ARMADILLO_PATCH_FILE2} "") + else(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}/armadillo-${armadillo_RELEASE}.tar.gz) + set(ARMADILLO_PATCH_FILE ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_staticlib.patch) + set(ARMADILLO_PATCH_FILE2 ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_enable_lapack.patch) + file(WRITE ${ARMADILLO_PATCH_FILE} "30c30 < set(ARMA_USE_LAPACK false) --- @@ -709,26 +669,27 @@ if(NOT ARMADILLO_FOUND) --- > add_library( armadillo STATIC \${PROJECT_SOURCE_DIR}/src/wrapper.cpp ) ") - file(WRITE ${ARMADILLO_PATCH_FILE2} + file(WRITE ${ARMADILLO_PATCH_FILE2} "12c12 < // #define ARMA_USE_LAPACK --- > #define ARMA_USE_LAPACK ") - endif(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}/armadillo-${armadillo_RELEASE}.tar.gz) - ExternalProject_Add( - armadillo-${armadillo_RELEASE} - PREFIX ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE} - URL http://sourceforge.net/projects/arma/files/armadillo-${armadillo_RELEASE}.tar.gz - DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE} - URL_MD5 ${armadillo_MD5} - PATCH_COMMAND patch -N /CMakeLists.txt ${ARMADILLO_PATCH_FILE} && patch -N /include/armadillo_bits/config.hpp ${ARMADILLO_PATCH_FILE2} - BUILD_IN_SOURCE 1 - BUILD_COMMAND make - UPDATE_COMMAND "" - INSTALL_COMMAND "" - ) - endif(OLD_GCC) + endif(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}/armadillo-${armadillo_RELEASE}.tar.gz) + ExternalProject_Add( + armadillo-${armadillo_RELEASE} + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE} + URL http://sourceforge.net/projects/arma/files/armadillo-${armadillo_RELEASE}.tar.gz + DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE} + URL_MD5 ${armadillo_MD5} + PATCH_COMMAND patch -N /CMakeLists.txt ${ARMADILLO_PATCH_FILE} && patch -N /include/armadillo_bits/config.hpp ${ARMADILLO_PATCH_FILE2} + CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} + BUILD_IN_SOURCE 1 + BUILD_COMMAND make + UPDATE_COMMAND "" + INSTALL_COMMAND "" + ) + # Set up variables ExternalProject_Get_Property(armadillo-${armadillo_RELEASE} binary_dir) set(ARMADILLO_INCLUDE_DIRS ${binary_dir}/include ) From c8ee78bea31c0a3dfc2fe08c66f224d3113157bb Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 31 May 2014 12:31:04 +0200 Subject: [PATCH 23/31] Recommend libopenblas-dev package to Ubuntu/Debian users --- CMakeLists.txt | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 19fddb1bd..e4941c976 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -579,7 +579,7 @@ if(OS_IS_LINUX) if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") message(" sudo yum install blas-devel") else(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") - message(" sudo apt-get install libblas-dev") + message(" sudo apt-get install libopenblas-dev") endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") message(FATAL_ERROR "BLAS is required to build gnss-sdr") endif(NOT BLAS) diff --git a/README.md b/README.md index b6a928b4c..1771832c0 100644 --- a/README.md +++ b/README.md @@ -68,9 +68,9 @@ In case you do not want to use PyBOMBS and prefer to build and install GNU Radio #### Install the [Armadillo](http://arma.sourceforge.net/ "Armadillo's Homepage") C++ linear algebra library: ~~~~~~ -$ sudo apt-get install libblas-dev liblapack-dev gfortran # For Debian/Ubuntu/LinuxMint -$ sudo yum install lapack-devel blas-devel gcc-fortran # For Fedora/CentOS/RHEL -$ sudo zypper install lapack-devel blas-devel gcc-fortran # For OpenSUSE +$ sudo apt-get install libopenblas-dev liblapack-dev gfortran # For Debian/Ubuntu/LinuxMint +$ sudo yum install lapack-devel blas-devel gcc-fortran # For Fedora/CentOS/RHEL +$ sudo zypper install lapack-devel blas-devel gcc-fortran # For OpenSUSE $ wget http://sourceforge.net/projects/arma/files/armadillo-4.300.6.tar.gz $ tar xvfz armadillo-4.300.6.tar.gz From 6052bdc0c88182aeaa3f32ec3e965d08e3a8c447 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 1 Jun 2014 11:02:02 +0200 Subject: [PATCH 24/31] Updating Armadillo version to 4.300.8 --- CMakeLists.txt | 4 ++-- README.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4941c976..bee7e9718 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -645,8 +645,8 @@ if(NOT ARMADILLO_FOUND) endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") message(FATAL_ERROR "The patch command is required to download and build armadillo") endif(NOT PATCH_EXECUTABLE) - set(armadillo_RELEASE 4.300.6) - set(armadillo_MD5 "f9ff49e0a804c3f64e539885808a988f") + set(armadillo_RELEASE 4.300.8) + set(armadillo_MD5 "7274feb04dc319dce2dc8ed17d647a56") if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}/armadillo-${armadillo_RELEASE}.tar.gz) set(ARMADILLO_PATCH_FILE ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_no.patch) file(WRITE ${ARMADILLO_PATCH_FILE} "") diff --git a/README.md b/README.md index 1771832c0..ba779d533 100644 --- a/README.md +++ b/README.md @@ -72,9 +72,9 @@ $ sudo apt-get install libopenblas-dev liblapack-dev gfortran # For Debian/Ubu $ sudo yum install lapack-devel blas-devel gcc-fortran # For Fedora/CentOS/RHEL $ sudo zypper install lapack-devel blas-devel gcc-fortran # For OpenSUSE -$ wget http://sourceforge.net/projects/arma/files/armadillo-4.300.6.tar.gz -$ tar xvfz armadillo-4.300.6.tar.gz -$ cd armadillo-4.300.6 +$ wget http://sourceforge.net/projects/arma/files/armadillo-4.300.8.tar.gz +$ tar xvfz armadillo-4.300.8.tar.gz +$ cd armadillo-4.300.8 $ cmake . $ make $ sudo make install From 92bf0472de2add812b84f5c86ac7f66fced1adb6 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 1 Jun 2014 11:08:10 +0200 Subject: [PATCH 25/31] Added requirement of GCC 4.7 or newer --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ba779d533..6f77ebfa9 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This section describes how to set up the compilation environment in GNU/Linux or GNU/Linux ---------- -Tested distributions: Ubuntu 12.04, 12.10, 13.04, 13.10 and 14.04 (32 and 64 bits), Debian 6.0.6 and 7.2, Fedora 18, 19 and 20 and openSUSE 13.1 (newer versions should work, too). +Tested distributions: Ubuntu 12.04, 12.10, 13.04, 13.10 and 14.04 (32 and 64 bits), Debian 6.0.6 and 7.2, Fedora 18, 19 and 20 and openSUSE 13.1 (newer versions should work, too). You will need GCC 4.7 or newer. ### Install GNU Radio: From b2e85053b47b99da50bbcdf792ba8ab0836ef3d6 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 7 Jun 2014 00:12:50 +0200 Subject: [PATCH 26/31] do not link to blas so armadillo can use the faster openblas if found in the system --- CMakeLists.txt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bee7e9718..2af122fcd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -572,7 +572,9 @@ if(OS_IS_LINUX) endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") message(FATAL_ERROR "LAPACK is required to build gnss-sdr") endif(NOT LAPACK) - find_library(BLAS blas) + if(NOT BLAS) + find_library(BLAS blas) + endif(NOT BLAS) if(NOT BLAS) message(" The BLAS library has not been found.") message(" You can try to install it by typing:") @@ -660,10 +662,6 @@ if(NOT ARMADILLO_FOUND) < set(ARMA_USE_LAPACK false) --- > set(ARMA_USE_LAPACK true) -36c36 -< set(ARMA_USE_WRAPPER true ) ---- -> set(ARMA_USE_WRAPPER false) 312c312 < add_library( armadillo SHARED \${PROJECT_SOURCE_DIR}/src/wrapper.cpp ) --- @@ -693,9 +691,8 @@ if(NOT ARMADILLO_FOUND) # Set up variables ExternalProject_Get_Property(armadillo-${armadillo_RELEASE} binary_dir) set(ARMADILLO_INCLUDE_DIRS ${binary_dir}/include ) - find_library(lapack NAMES lapack HINTS /usr/lib /usr/local/lib /usr/lib64) - find_library(blas NAMES blas HINTS /usr/lib /usr/local/lib /usr/lib64) - set(ARMADILLO_LIBRARIES ${lapack} ${blas} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo.a) + find_library(LAPACK NAMES lapack HINTS /usr/lib /usr/local/lib /usr/lib64) + set(ARMADILLO_LIBRARIES ${LAPACK} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo.a) set(LOCAL_ARMADILLO true CACHE STRING "Armadillo downloaded and built automatically" FORCE) # Save a copy at the thirdparty folder file(COPY ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE} From c85efa7473d9fedefd84681c7e98b2600c54041e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 7 Jun 2014 10:23:32 +0200 Subject: [PATCH 27/31] Cosmetic changes --- CMakeLists.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2af122fcd..5c535a3ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -559,6 +559,9 @@ endif(DOXYGEN_FOUND) ################################################################################ if(OS_IS_LINUX) + ############################################# + # Check that LAPACK is found in the system + ############################################# find_library(LAPACK lapack) if(NOT LAPACK) message(" The LAPACK library has not been found.") @@ -572,9 +575,10 @@ if(OS_IS_LINUX) endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") message(FATAL_ERROR "LAPACK is required to build gnss-sdr") endif(NOT LAPACK) - if(NOT BLAS) - find_library(BLAS blas) - endif(NOT BLAS) + ############################################# + # Check that BLAS is found in the system + ############################################# + find_library(BLAS blas) if(NOT BLAS) message(" The BLAS library has not been found.") message(" You can try to install it by typing:") @@ -585,6 +589,9 @@ if(OS_IS_LINUX) endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") message(FATAL_ERROR "BLAS is required to build gnss-sdr") endif(NOT BLAS) + ############################################# + # Check that GFORTRAN is found in the system + ############################################# find_library(GFORTRAN NAMES gfortran PATHS /usr/lib /usr/local/lib From fabf623c4384dd85085eb07e1fcfcd44f6c7b62e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 10 Jun 2014 00:14:18 +0200 Subject: [PATCH 28/31] Require at least Boost 1.45, so boost:filesystem::temp_directory_path() can be used. It is useful on Mac OS X, where the log folder is not at /tmp. Boost 1.45 was released on Nov 9th, 2010, so it is unlikely that any user is using something older. --- CMakeLists.txt | 1 - src/main/main.cc | 13 +++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c535a3ee..9311f26e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -230,7 +230,6 @@ if(GNURADIO_INSTALL_PREFIX) endif(EXISTS "${GNURADIO_INSTALL_PREFIX}/lib/libboost_thread-mt.so") endif(GNURADIO_INSTALL_PREFIX) set(Boost_ADDITIONAL_VERSIONS - "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44" "1.45.0" "1.45" "1.46.0" "1.46" "1.48.0" "1.48" "1.49.0" "1.49" "1.50.0" "1.50" "1.51.0" "1.51" "1.53.0" "1.53" "1.54.0" "1.54" "1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59" diff --git a/src/main/main.cc b/src/main/main.cc index 81904bd88..d3a89024f 100644 --- a/src/main/main.cc +++ b/src/main/main.cc @@ -134,14 +134,11 @@ int main(int argc, char** argv) google::InitGoogleLogging(argv[0]); if (FLAGS_log_dir.empty()) { - // temp_directory_path() is only available from - // Boost 1.45. Ubuntu 10.10 and Debian 6.0.6 ships with 1.42 - std::cout << "Logging will be done at " - //<< boost::filesystem::temp_directory_path() - << "/tmp" - << std::endl - << "Use gnss-sdr --log_dir=/path/to/log to change that." - << std::endl; + std::cout << "Logging will be done at " + << boost::filesystem::temp_directory_path() + << std::endl + << "Use gnss-sdr --log_dir=/path/to/log to change that." + << std::endl; } else { From b2f3ecd72ee769741a3088fdd2b42996a9871a16 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 20 Jun 2014 03:34:19 +0200 Subject: [PATCH 29/31] Fixes many warnings in CMake 3.0. When glog or armadillo are present in the system, glog_RELEASE/armadillo_RELEASE are not defined and several add_dependencies were adding non-existing targets (glog-${glog_RELEASE}). This commit creates imported logical targets when those libraries are already present, so the warnings disappear. --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9311f26e4..f8da872ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -374,6 +374,7 @@ endif(NOT GFlags_FOUND OR LOCAL_GLOG) ################################################################################ find_package(GLOG) +set(glog_RELEASE 0.3.3) if (NOT GLOG_FOUND OR LOCAL_GFLAGS) message (STATUS " glog library has not been found") if(NOT GFlags_FOUND) @@ -466,6 +467,9 @@ export LIBS=${GFlags_SHARED_LIBS} ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}glog.a ) set(LOCAL_GLOG true CACHE STRING "Glog downloaded and built automatically" FORCE) +else(NOT GLOG_FOUND OR LOCAL_GFLAGS) + add_library(glog-${glog_RELEASE} UNKNOWN IMPORTED) + set_property(TARGET glog-${glog_RELEASE} PROPERTY IMPORTED_LOCATION "${GLOG_LIBRARIES}") endif(NOT GLOG_FOUND OR LOCAL_GFLAGS) @@ -704,6 +708,10 @@ if(NOT ARMADILLO_FOUND) file(COPY ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE} DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo ) +else(NOT ARMADILLO_FOUND) + set(armadillo_RELEASE ${ARMADILLO_VERSION_STRING}) + add_library(armadillo-${armadillo_RELEASE} UNKNOWN IMPORTED) + set_property(TARGET armadillo-${armadillo_RELEASE} PROPERTY IMPORTED_LOCATION "${ARMADILLO_LIBRARIES}") endif(NOT ARMADILLO_FOUND) From 7d9458cfdd8ee74d9be69350fe56b4ed09d73e1f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 26 Jun 2014 01:04:41 +0200 Subject: [PATCH 30/31] Update Armadillo version to 4.300.9 --- CMakeLists.txt | 4 ++-- README.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f8da872ac..8736a4242 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -657,8 +657,8 @@ if(NOT ARMADILLO_FOUND) endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") message(FATAL_ERROR "The patch command is required to download and build armadillo") endif(NOT PATCH_EXECUTABLE) - set(armadillo_RELEASE 4.300.8) - set(armadillo_MD5 "7274feb04dc319dce2dc8ed17d647a56") + set(armadillo_RELEASE 4.300.9) + set(armadillo_MD5 "d51d1beb2a335f3002702d112c4814f3") if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/download/armadillo-${armadillo_RELEASE}/armadillo-${armadillo_RELEASE}.tar.gz) set(ARMADILLO_PATCH_FILE ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/armadillo_no.patch) file(WRITE ${ARMADILLO_PATCH_FILE} "") diff --git a/README.md b/README.md index 6f77ebfa9..f6b0ed6d4 100644 --- a/README.md +++ b/README.md @@ -72,9 +72,9 @@ $ sudo apt-get install libopenblas-dev liblapack-dev gfortran # For Debian/Ubu $ sudo yum install lapack-devel blas-devel gcc-fortran # For Fedora/CentOS/RHEL $ sudo zypper install lapack-devel blas-devel gcc-fortran # For OpenSUSE -$ wget http://sourceforge.net/projects/arma/files/armadillo-4.300.8.tar.gz -$ tar xvfz armadillo-4.300.8.tar.gz -$ cd armadillo-4.300.8 +$ wget http://sourceforge.net/projects/arma/files/armadillo-4.300.9.tar.gz +$ tar xvfz armadillo-4.300.9.tar.gz +$ cd armadillo-4.300.9 $ cmake . $ make $ sudo make install From 8531a758ea22c00ae375d692fc473ecaaf5b7cd9 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 28 Jun 2014 03:55:57 +0200 Subject: [PATCH 31/31] Includes header files at add_libraries(...), which makes IDEs such as Xcode to display them --- src/algorithms/PVT/adapters/CMakeLists.txt | 8 +++++--- src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt | 8 +++++--- src/algorithms/PVT/libs/CMakeLists.txt | 7 ++++--- src/algorithms/acquisition/adapters/CMakeLists.txt | 8 +++++--- .../acquisition/gnuradio_blocks/CMakeLists.txt | 9 +++++---- src/algorithms/channel/adapters/CMakeLists.txt | 8 +++++--- src/algorithms/channel/libs/CMakeLists.txt | 8 +++++--- src/algorithms/conditioner/adapters/CMakeLists.txt | 8 +++++--- .../data_type_adapter/adapters/CMakeLists.txt | 8 +++++--- src/algorithms/input_filter/adapters/CMakeLists.txt | 8 +++++--- .../input_filter/gnuradio_blocks/CMakeLists.txt | 8 +++++--- src/algorithms/libs/CMakeLists.txt | 8 +++++--- src/algorithms/observables/adapters/CMakeLists.txt | 8 +++++--- .../observables/gnuradio_blocks/CMakeLists.txt | 8 +++++--- src/algorithms/output_filter/adapters/CMakeLists.txt | 8 +++++--- src/algorithms/resampler/adapters/CMakeLists.txt | 8 +++++--- .../resampler/gnuradio_blocks/CMakeLists.txt | 9 ++++++--- .../signal_generator/adapters/CMakeLists.txt | 9 +++++---- .../signal_generator/gnuradio_blocks/CMakeLists.txt | 9 +++++---- src/algorithms/signal_source/adapters/CMakeLists.txt | 9 +++++---- .../signal_source/gnuradio_blocks/CMakeLists.txt | 8 +++++--- .../telemetry_decoder/adapters/CMakeLists.txt | 8 +++++--- .../telemetry_decoder/gnuradio_blocks/CMakeLists.txt | 8 +++++--- src/algorithms/telemetry_decoder/libs/CMakeLists.txt | 8 +++++--- src/algorithms/tracking/adapters/CMakeLists.txt | 8 +++++--- src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt | 8 +++++--- src/algorithms/tracking/libs/CMakeLists.txt | 8 +++++--- src/core/libs/CMakeLists.txt | 10 ++++++---- src/core/receiver/CMakeLists.txt | 10 ++++++---- src/core/system_parameters/CMakeLists.txt | 10 ++++++---- src/utils/front-end-cal/CMakeLists.txt | 4 +++- 31 files changed, 156 insertions(+), 98 deletions(-) diff --git a/src/algorithms/PVT/adapters/CMakeLists.txt b/src/algorithms/PVT/adapters/CMakeLists.txt index e9c5682cb..a7a57fe2b 100644 --- a/src/algorithms/PVT/adapters/CMakeLists.txt +++ b/src/algorithms/PVT/adapters/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,5 +34,7 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(pvt_adapters ${PVT_ADAPTER_SOURCES}) +file(GLOB PVT_ADAPTER_HEADERS "*.h") +add_library(pvt_adapters ${PVT_ADAPTER_SOURCES} ${PVT_ADAPTER_HEADERS}) +source_group(Headers FILES ${PVT_ADAPTER_HEADERS}) target_link_libraries(pvt_adapters pvt_gr_blocks ${ARMADILLO_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES}) diff --git a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt index 131fddc55..25bee736d 100644 --- a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -33,5 +33,7 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(pvt_gr_blocks ${PVT_GR_BLOCKS_SOURCES}) +file(GLOB PVT_GR_BLOCKS_HEADERS "*.h") +add_library(pvt_gr_blocks ${PVT_GR_BLOCKS_SOURCES} ${PVT_GR_BLOCKS_HEADERS}) +source_group(Headers FILES ${PVT_GR_BLOCKS_HEADERS}) target_link_libraries(pvt_gr_blocks pvt_lib ${ARMADILLO_LIBRARIES}) diff --git a/src/algorithms/PVT/libs/CMakeLists.txt b/src/algorithms/PVT/libs/CMakeLists.txt index fccec3fe2..0f5418d0c 100644 --- a/src/algorithms/PVT/libs/CMakeLists.txt +++ b/src/algorithms/PVT/libs/CMakeLists.txt @@ -5,7 +5,7 @@ # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -36,7 +36,8 @@ include_directories( ${GFlags_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS} ) - -add_library(pvt_lib ${PVT_LIB_SOURCES}) +file(GLOB PVT_LIB_HEADERS "*.h") +add_library(pvt_lib ${PVT_LIB_SOURCES} ${PVT_LIB_HEADERS}) +source_group(Headers FILES ${PVT_LIB_HEADERS}) add_dependencies(pvt_lib armadillo-${armadillo_RELEASE} glog-${glog_RELEASE}) target_link_libraries(pvt_lib ${Boost_LIBRARIES} ${GFlags_LIBS} ${GLOG_LIBRARIES} ${ARMADILLO_LIBRARIES}) diff --git a/src/algorithms/acquisition/adapters/CMakeLists.txt b/src/algorithms/acquisition/adapters/CMakeLists.txt index 26877803c..f113b64f8 100644 --- a/src/algorithms/acquisition/adapters/CMakeLists.txt +++ b/src/algorithms/acquisition/adapters/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -56,5 +56,7 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(acq_adapters ${ACQ_ADAPTER_SOURCES}) +file(GLOB ACQ_ADAPTER_HEADERS "*.h") +add_library(acq_adapters ${ACQ_ADAPTER_SOURCES} ${ACQ_ADAPTER_HEADERS}) +source_group(Headers FILES ${ACQ_ADAPTER_HEADERS}) target_link_libraries(acq_adapters gnss_sp_libs acq_gr_blocks ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES}) diff --git a/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt b/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt index c3c1135b6..659cfc520 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -60,7 +60,8 @@ if(OPENCL_FOUND) endif(OS_IS_MACOSX) endif(OPENCL_FOUND) - -add_library(acq_gr_blocks ${ACQ_GR_BLOCKS_SOURCES}) +file(GLOB ACQ_GR_BLOCKS_HEADERS "*.h") +add_library(acq_gr_blocks ${ACQ_GR_BLOCKS_SOURCES} ${ACQ_GR_BLOCKS_HEADERS}) +source_group(Headers FILES ${ACQ_GR_BLOCKS_HEADERS}) target_link_libraries(acq_gr_blocks gnss_sp_libs gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_FFT_LIBRARIES} ${VOLK_LIBRARIES} ${OPT_LIBRARIES}) diff --git a/src/algorithms/channel/adapters/CMakeLists.txt b/src/algorithms/channel/adapters/CMakeLists.txt index f065d91f3..09c8a1529 100644 --- a/src/algorithms/channel/adapters/CMakeLists.txt +++ b/src/algorithms/channel/adapters/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -29,5 +29,7 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(channel_adapters ${CHANNEL_ADAPTER_SOURCES}) +file(GLOB CHANNEL_ADAPTER_HEADERS "*.h") +add_library(channel_adapters ${CHANNEL_ADAPTER_SOURCES} ${CHANNEL_ADAPTER_HEADERS}) +source_group(Headers FILES ${CHANNEL_ADAPTER_HEADERS}) target_link_libraries(channel_adapters channel_fsm ${GNURADIO_RUNTIME_LIBRARIES} ${Boost_LIBRARIES}) diff --git a/src/algorithms/channel/libs/CMakeLists.txt b/src/algorithms/channel/libs/CMakeLists.txt index c16cefc31..d6695b8ec 100644 --- a/src/algorithms/channel/libs/CMakeLists.txt +++ b/src/algorithms/channel/libs/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -30,5 +30,7 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(channel_fsm ${CHANNEL_FSM_SOURCES}) +file(GLOB CHANNEL_FSM_HEADERS "*.h") +add_library(channel_fsm ${CHANNEL_FSM_SOURCES} ${CHANNEL_FSM_HEADERS}) +source_group(Headers FILES ${CHANNEL_FSM_HEADERS}) add_dependencies(channel_fsm glog-${glog_RELEASE}) \ No newline at end of file diff --git a/src/algorithms/conditioner/adapters/CMakeLists.txt b/src/algorithms/conditioner/adapters/CMakeLists.txt index 16d815336..af1d593d5 100644 --- a/src/algorithms/conditioner/adapters/CMakeLists.txt +++ b/src/algorithms/conditioner/adapters/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,5 +34,7 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(conditioner_adapters ${COND_ADAPTER_SOURCES}) +file(GLOB COND_ADAPTER_HEADERS "*.h") +add_library(conditioner_adapters ${COND_ADAPTER_SOURCES} ${COND_ADAPTER_HEADERS}) +source_group(Headers FILES ${COND_ADAPTER_HEADERS}) add_dependencies(conditioner_adapters glog-${glog_RELEASE}) \ No newline at end of file diff --git a/src/algorithms/data_type_adapter/adapters/CMakeLists.txt b/src/algorithms/data_type_adapter/adapters/CMakeLists.txt index fc0f9abcd..e5afda6ce 100644 --- a/src/algorithms/data_type_adapter/adapters/CMakeLists.txt +++ b/src/algorithms/data_type_adapter/adapters/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +28,8 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(datatype_adapters ${DATATYPE_ADAPTER_SOURCES}) +file(GLOB DATATYPE_ADAPTER_HEADERS "*.h") +add_library(datatype_adapters ${DATATYPE_ADAPTER_SOURCES} ${DATATYPE_ADAPTER_HEADERS}) +source_group(Headers FILES ${DATATYPE_ADAPTER_HEADERS}) add_dependencies(datatype_adapters glog-${glog_RELEASE}) target_link_libraries(datatype_adapters ${GNURADIO_FILTER_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES}) diff --git a/src/algorithms/input_filter/adapters/CMakeLists.txt b/src/algorithms/input_filter/adapters/CMakeLists.txt index 6d4303991..09d7200cb 100644 --- a/src/algorithms/input_filter/adapters/CMakeLists.txt +++ b/src/algorithms/input_filter/adapters/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -32,6 +32,8 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(input_filter_adapters ${INPUT_FILTER_ADAPTER_SOURCES}) +file(GLOB INPUT_FILTER_ADAPTER_HEADERS "*.h") +add_library(input_filter_adapters ${INPUT_FILTER_ADAPTER_SOURCES} ${INPUT_FILTER_ADAPTER_HEADERS}) +source_group(Headers FILES ${INPUT_FILTER_ADAPTER_HEADERS}) add_dependencies(input_filter_adapters glog-${glog_RELEASE}) target_link_libraries(input_filter_adapters input_filter_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES}) diff --git a/src/algorithms/input_filter/gnuradio_blocks/CMakeLists.txt b/src/algorithms/input_filter/gnuradio_blocks/CMakeLists.txt index c5bc8d227..544ec29dd 100644 --- a/src/algorithms/input_filter/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/input_filter/gnuradio_blocks/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,5 +28,7 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(input_filter_gr_blocks ${INPUT_FILTER_GR_BLOCKS_SOURCES}) +file(GLOB INPUT_FILTER_GR_BLOCKS_HEADERS "*.h") +add_library(input_filter_gr_blocks ${INPUT_FILTER_GR_BLOCKS_SOURCES} ${INPUT_FILTER_GR_BLOCKS_HEADERS}) +source_group(Headers FILES ${INPUT_FILTER_GR_BLOCKS_HEADERS}) target_link_libraries(input_filter_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES}) \ No newline at end of file diff --git a/src/algorithms/libs/CMakeLists.txt b/src/algorithms/libs/CMakeLists.txt index 857a923a4..5a01e8a0d 100644 --- a/src/algorithms/libs/CMakeLists.txt +++ b/src/algorithms/libs/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -59,7 +59,9 @@ if(OPENCL_FOUND) endif(OS_IS_MACOSX) endif(OPENCL_FOUND) -add_library(gnss_sp_libs ${GNSS_SPLIBS_SOURCES}) +file(GLOB GNSS_SPLIBS_HEADERS "*.h") +add_library(gnss_sp_libs ${GNSS_SPLIBS_SOURCES} ${GNSS_SPLIBS_HEADERS}) +source_group(Headers FILES ${GNSS_SPLIBS_HEADERS}) target_link_libraries(gnss_sp_libs ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES} diff --git a/src/algorithms/observables/adapters/CMakeLists.txt b/src/algorithms/observables/adapters/CMakeLists.txt index 6a724753f..af524f108 100644 --- a/src/algorithms/observables/adapters/CMakeLists.txt +++ b/src/algorithms/observables/adapters/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -33,5 +33,7 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(obs_adapters ${OBS_ADAPTER_SOURCES}) +file(GLOB OBS_ADAPTER_HEADERS "*.h") +add_library(obs_adapters ${OBS_ADAPTER_SOURCES} ${OBS_ADAPTER_HEADERS}) +source_group(Headers FILES ${OBS_ADAPTER_HEADERS}) target_link_libraries(obs_adapters obs_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES}) diff --git a/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt b/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt index 9dcdba1b3..8833bb407 100644 --- a/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -33,6 +33,8 @@ include_directories( ${GFlags_INCLUDE_DIRS} ) -add_library(obs_gr_blocks ${OBS_GR_BLOCKS_SOURCES} ) +file(GLOB OBS_GR_BLOCKS_HEADERS "*.h") +add_library(obs_gr_blocks ${OBS_GR_BLOCKS_SOURCES} ${OBS_GR_BLOCKS_HEADERS}) +source_group(Headers FILES ${OBS_GR_BLOCKS_HEADERS}) add_dependencies(obs_gr_blocks glog-${glog_RELEASE}) target_link_libraries(obs_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES}) diff --git a/src/algorithms/output_filter/adapters/CMakeLists.txt b/src/algorithms/output_filter/adapters/CMakeLists.txt index b119efb3e..d52dfb3a7 100644 --- a/src/algorithms/output_filter/adapters/CMakeLists.txt +++ b/src/algorithms/output_filter/adapters/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -30,6 +30,8 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(out_adapters ${OUTPUTFILTER_ADAPTER_SOURCES}) +file(GLOB OUTPUTFILTER_ADAPTER_HEADERS "*.h") +add_library(out_adapters ${OUTPUTFILTER_ADAPTER_SOURCES} ${OUTPUTFILTER_ADAPTER_HEADERS}) +source_group(Headers FILES ${OUTPUTFILTER_ADAPTER_HEADERS}) add_dependencies(out_adapters glog-${glog_RELEASE}) target_link_libraries(out_adapters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES}) diff --git a/src/algorithms/resampler/adapters/CMakeLists.txt b/src/algorithms/resampler/adapters/CMakeLists.txt index c5a634f5d..dbcbb83e5 100644 --- a/src/algorithms/resampler/adapters/CMakeLists.txt +++ b/src/algorithms/resampler/adapters/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,5 +27,7 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(resampler_adapters ${RESAMPLER_ADAPTER_SOURCES}) +file(GLOB RESAMPLER_ADAPTER_HEADERS "*.h") +add_library(resampler_adapters ${RESAMPLER_ADAPTER_SOURCES} ${RESAMPLER_ADAPTER_HEADERS}) +source_group(Headers FILES ${RESAMPLER_ADAPTER_HEADERS}) target_link_libraries(resampler_adapters resampler_gr_blocks) diff --git a/src/algorithms/resampler/gnuradio_blocks/CMakeLists.txt b/src/algorithms/resampler/gnuradio_blocks/CMakeLists.txt index ba389abb8..574de3b35 100644 --- a/src/algorithms/resampler/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/resampler/gnuradio_blocks/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -29,5 +29,8 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(resampler_gr_blocks ${RESAMPLER_GR_BLOCKS_SOURCES}) +#file(GLOB RESAMPLER_GR_BLOCKS_HEADERS "*.h") +file(GLOB RESAMPLER_GR_BLOCKS_HEADERS "*_cc.h") +add_library(resampler_gr_blocks ${RESAMPLER_GR_BLOCKS_SOURCES} ${RESAMPLER_GR_BLOCKS_HEADERS}) +source_group(Headers FILES ${RESAMPLER_GR_BLOCKS_HEADERS}) add_dependencies(resampler_gr_blocks glog-${glog_RELEASE}) \ No newline at end of file diff --git a/src/algorithms/signal_generator/adapters/CMakeLists.txt b/src/algorithms/signal_generator/adapters/CMakeLists.txt index 426c1a374..5a07cf31f 100644 --- a/src/algorithms/signal_generator/adapters/CMakeLists.txt +++ b/src/algorithms/signal_generator/adapters/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -30,8 +30,9 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(signal_generator_adapters ${SIGNAL_GENERATOR_ADAPTER_SOURCES}) - +file(GLOB SIGNAL_GENERATOR_ADAPTER_HEADERS "*.h") +add_library(signal_generator_adapters ${SIGNAL_GENERATOR_ADAPTER_SOURCES} ${SIGNAL_GENERATOR_ADAPTER_HEADERS}) +source_group(Headers FILES ${SIGNAL_GENERATOR_ADAPTER_HEADERS}) target_link_libraries(signal_generator_adapters gnss_sp_libs signal_generator_blocks ${GNURADIO_RUNTIME_LIBRARIES} diff --git a/src/algorithms/signal_generator/gnuradio_blocks/CMakeLists.txt b/src/algorithms/signal_generator/gnuradio_blocks/CMakeLists.txt index aed81ed4f..f0ab9a988 100644 --- a/src/algorithms/signal_generator/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/signal_generator/gnuradio_blocks/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -29,8 +29,9 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(signal_generator_blocks ${SIGNAL_GENERATOR_BLOCK_SOURCES}) - +file(GLOB SIGNAL_GENERATOR_BLOCK_HEADERS "*.h") +add_library(signal_generator_blocks ${SIGNAL_GENERATOR_BLOCK_SOURCES} ${SIGNAL_GENERATOR_BLOCK_HEADERS}) +source_group(Headers FILES ${SIGNAL_GENERATOR_BLOCK_HEADERS}) target_link_libraries(signal_generator_blocks gnss_system_parameters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_FFT_LIBRARIES} diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt index a60e99696..269ad0fc4 100644 --- a/src/algorithms/signal_source/adapters/CMakeLists.txt +++ b/src/algorithms/signal_source/adapters/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -132,8 +132,9 @@ if(ARCH_64BITS) add_definitions(-DARCH_64BITS=1) endif(ARCH_64BITS) -add_library(signal_source_adapters ${SIGNAL_SOURCE_ADAPTER_SOURCES}) - +file(GLOB SIGNAL_SOURCE_ADAPTER_HEADERS "*.h") +add_library(signal_source_adapters ${SIGNAL_SOURCE_ADAPTER_SOURCES} ${SIGNAL_SOURCE_ADAPTER_HEADERS}) +source_group(Headers FILES ${SIGNAL_SOURCE_ADAPTER_HEADERS}) target_link_libraries(signal_source_adapters signal_source_gr_blocks ${Boost_LIBRARIES} ${GNURADIO_PMT_LIBRARIES} diff --git a/src/algorithms/signal_source/gnuradio_blocks/CMakeLists.txt b/src/algorithms/signal_source/gnuradio_blocks/CMakeLists.txt index 94f2e6cf8..3d785ec0b 100644 --- a/src/algorithms/signal_source/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/signal_source/gnuradio_blocks/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,5 +28,7 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(signal_source_gr_blocks ${SIGNAL_SOURCE_GR_BLOCKS_SOURCES}) +file(GLOB SIGNAL_SOURCE_GR_BLOCKS_HEADERS "*.h") +add_library(signal_source_gr_blocks ${SIGNAL_SOURCE_GR_BLOCKS_SOURCES} ${SIGNAL_SOURCE_GR_BLOCKS_HEADERS}) +source_group(Headers FILES ${SIGNAL_SOURCE_GR_BLOCKS_HEADERS}) target_link_libraries(signal_source_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES}) \ No newline at end of file diff --git a/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt b/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt index 8bcfe7c5a..f680aa297 100644 --- a/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt +++ b/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,5 +34,7 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(telemetry_decoder_adapters ${TELEMETRY_DECODER_ADAPTER_SOURCES}) +file(GLOB TELEMETRY_DECODER_ADAPTER_HEADERS "*.h") +add_library(telemetry_decoder_adapters ${TELEMETRY_DECODER_ADAPTER_SOURCES} ${TELEMETRY_DECODER_ADAPTER_HEADERS}) +source_group(Headers FILES ${TELEMETRY_DECODER_ADAPTER_HEADERS}) target_link_libraries(telemetry_decoder_adapters telemetry_decoder_gr_blocks) diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt b/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt index 5b50bfa6e..987530e7b 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -33,5 +33,7 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(telemetry_decoder_gr_blocks ${TELEMETRY_DECODER_GR_BLOCKS_SOURCES}) +file(GLOB TELEMETRY_DECODER_GR_BLOCKS_HEADERS "*.h") +add_library(telemetry_decoder_gr_blocks ${TELEMETRY_DECODER_GR_BLOCKS_SOURCES} ${TELEMETRY_DECODER_GR_BLOCKS_HEADERS}) +source_group(Headers FILES ${TELEMETRY_DECODER_GR_BLOCKS_HEADERS}) target_link_libraries(telemetry_decoder_gr_blocks telemetry_decoder_lib gnss_system_parameters) diff --git a/src/algorithms/telemetry_decoder/libs/CMakeLists.txt b/src/algorithms/telemetry_decoder/libs/CMakeLists.txt index fdd6292d5..a039e76f4 100644 --- a/src/algorithms/telemetry_decoder/libs/CMakeLists.txt +++ b/src/algorithms/telemetry_decoder/libs/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -32,5 +32,7 @@ include_directories( ${GFlags_INCLUDE_DIRS} ) -add_library(telemetry_decoder_lib ${TELEMETRY_DECODER_LIB_SOURCES}) +file(GLOB TELEMETRY_DECODER_LIB_HEADERS "*.h") +add_library(telemetry_decoder_lib ${TELEMETRY_DECODER_LIB_SOURCES} ${TELEMETRY_DECODER_LIB_HEADERS}) +source_group(Headers FILES ${TELEMETRY_DECODER_LIB_HEADERS}) target_link_libraries(telemetry_decoder_lib gnss_system_parameters) \ No newline at end of file diff --git a/src/algorithms/tracking/adapters/CMakeLists.txt b/src/algorithms/tracking/adapters/CMakeLists.txt index 5c82a8464..13bda92f2 100644 --- a/src/algorithms/tracking/adapters/CMakeLists.txt +++ b/src/algorithms/tracking/adapters/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -39,5 +39,7 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(tracking_adapters ${TRACKING_ADAPTER_SOURCES}) +file(GLOB TRACKING_ADAPTER_HEADERS "*.h") +add_library(tracking_adapters ${TRACKING_ADAPTER_SOURCES} ${TRACKING_ADAPTER_HEADERS}) +source_group(Headers FILES ${TRACKING_ADAPTER_HEADERS}) target_link_libraries(tracking_adapters tracking_gr_blocks gnss_sp_libs) diff --git a/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt b/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt index 3d9473667..c1338bc1e 100644 --- a/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -38,5 +38,7 @@ include_directories( ${GNURADIO_RUNTIME_INCLUDE_DIRS} ) -add_library(tracking_gr_blocks ${TRACKING_GR_BLOCKS_SOURCES}) +file(GLOB TRACKING_GR_BLOCKS_HEADERS "*.h") +add_library(tracking_gr_blocks ${TRACKING_GR_BLOCKS_SOURCES} ${TRACKING_GR_BLOCKS_HEADERS}) +source_group(Headers FILES ${TRACKING_GR_BLOCKS_HEADERS}) target_link_libraries(tracking_gr_blocks tracking_lib ${GNURADIO_RUNTIME_LIBRARIES} gnss_sp_libs ${Boost_LIBRARIES} ) diff --git a/src/algorithms/tracking/libs/CMakeLists.txt b/src/algorithms/tracking/libs/CMakeLists.txt index 223e7af14..136b1b938 100644 --- a/src/algorithms/tracking/libs/CMakeLists.txt +++ b/src/algorithms/tracking/libs/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -36,5 +36,7 @@ include_directories( ${VOLK_INCLUDE_DIRS} ) -add_library(tracking_lib ${TRACKING_LIB_SOURCES}) +file(GLOB TRACKING_LIB_HEADERS "*.h") +add_library(tracking_lib ${TRACKING_LIB_SOURCES} ${TRACKING_LIB_HEADERS}) +source_group(Headers FILES ${TRACKING_LIB_HEADERS}) target_link_libraries(tracking_lib ${VOLK_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES}) \ No newline at end of file diff --git a/src/core/libs/CMakeLists.txt b/src/core/libs/CMakeLists.txt index 27aa0a3a4..fdf1c24d7 100644 --- a/src/core/libs/CMakeLists.txt +++ b/src/core/libs/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -36,5 +36,7 @@ include_directories( ${Boost_INCLUDE_DIRS} ) -add_library(rx_core_lib ${CORE_LIBS_SOURCES}) -target_link_libraries (rx_core_lib supl_library) +file(GLOB CORE_LIBS_HEADERS "*.h") +add_library(rx_core_lib ${CORE_LIBS_SOURCES} ${CORE_LIBS_HEADERS}) +source_group(Headers FILES ${CORE_LIBS_HEADERS}) +target_link_libraries(rx_core_lib supl_library) diff --git a/src/core/receiver/CMakeLists.txt b/src/core/receiver/CMakeLists.txt index 840275471..2b54995c2 100644 --- a/src/core/receiver/CMakeLists.txt +++ b/src/core/receiver/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -105,8 +105,10 @@ else(OPENCL_FOUND) add_definitions(-DOPENCL_BLOCKS=0) endif(OPENCL_FOUND) - -add_library(gnss_rx ${GNSS_RECEIVER_SOURCES}) +file(GLOB GNSS_RECEIVER_HEADERS "*.h") +file(GLOB GNSS_RECEIVER_INTERFACE_HEADERS "../interfaces/*.h") +add_library(gnss_rx ${GNSS_RECEIVER_SOURCES} ${GNSS_RECEIVER_HEADERS} ${GNSS_RECEIVER_INTERFACE_HEADERS}) +source_group(Headers FILES ${GNSS_RECEIVER_HEADERS} ${GNSS_RECEIVER_INTERFACE_HEADERS}) target_link_libraries(gnss_rx ${Boost_LIBRARIES} ${ARMADILLO_LIBRARIES} diff --git a/src/core/system_parameters/CMakeLists.txt b/src/core/system_parameters/CMakeLists.txt index c4ec759bf..671971128 100644 --- a/src/core/system_parameters/CMakeLists.txt +++ b/src/core/system_parameters/CMakeLists.txt @@ -1,11 +1,11 @@ -# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors) # # This file is part of GNSS-SDR. # # GNSS-SDR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or -# at your option) any later version. +# (at your option) any later version. # # GNSS-SDR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -38,6 +38,7 @@ set(SYSTEM_PARAMETERS_SOURCES sbas_telemetry_data.cc ) + include_directories( $(CMAKE_CURRENT_SOURCE_DIR) ${CMAKE_SOURCE_DIR}/src/core/receiver @@ -47,8 +48,9 @@ include_directories( ) link_directories(${Boost_LIBRARY_DIR}) - -add_library(gnss_system_parameters ${SYSTEM_PARAMETERS_SOURCES}) +file(GLOB SYSTEM_PARAMETERS_HEADERS "*.h") +add_library(gnss_system_parameters ${SYSTEM_PARAMETERS_SOURCES} ${SYSTEM_PARAMETERS_HEADERS}) +source_group(Headers FILES ${SYSTEM_PARAMETERS_HEADERS}) add_dependencies(gnss_system_parameters glog-${glog_RELEASE}) target_link_libraries(gnss_system_parameters ${Boost_LIBRARIES}) diff --git a/src/utils/front-end-cal/CMakeLists.txt b/src/utils/front-end-cal/CMakeLists.txt index d823ea31c..aa82e9fe5 100644 --- a/src/utils/front-end-cal/CMakeLists.txt +++ b/src/utils/front-end-cal/CMakeLists.txt @@ -43,7 +43,9 @@ if(RTLSDR_DRIVER) ${Boost_INCLUDE_DIRS} ) - add_library(front_end_cal_lib ${FRONT_END_CAL_SOURCES}) + file(GLOB FRONT_END_CAL_HEADERS "*.h") + add_library(front_end_cal_lib ${FRONT_END_CAL_SOURCES} ${FRONT_END_CAL_HEADERS}) + source_group(Headers FILES ${FRONT_END_CAL_HEADERS}) target_link_libraries(front_end_cal_lib ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES}