mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	Change in cmake scripts that allows 'make' to spawn the provided amount of threads when armadillo, gflags or glog are downloaded and built 'on-the-fly'. Ideally each thread is executed on its own core/CPU, so a multi-core/CPU environment is used to its fullest. This fix allows compilation with e.g. 'make -j4"
git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@465 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
		| @@ -274,9 +274,9 @@ set(GFlags_ROOT_DIR false) | |||||||
| find_package(GFlags) | find_package(GFlags) | ||||||
|  |  | ||||||
| if (NOT GFlags_FOUND) | if (NOT GFlags_FOUND) | ||||||
|      message (" gflags library has not been found.") |      message (STATUS " gflags library has not been found.") | ||||||
|      message (" gflags will be downloaded and built automatically ") |      message (STATUS " gflags will be downloaded and built automatically ") | ||||||
|      message (" when doing 'make'. ") |      message (STATUS " when doing 'make'. ") | ||||||
|      set(gflags_RELEASE 2.0 CACHE STRING "Local gflags release") |      set(gflags_RELEASE 2.0 CACHE STRING "Local gflags release") | ||||||
|      set(gflags_MD5 "5fd4554d2ba84bf222a2fec0870d28df") |      set(gflags_MD5 "5fd4554d2ba84bf222a2fec0870d28df") | ||||||
|       |       | ||||||
| @@ -320,12 +320,12 @@ endif(NOT GFlags_FOUND) | |||||||
|  |  | ||||||
| find_package(GLOG) | find_package(GLOG) | ||||||
| if (NOT GLOG_FOUND OR LOCAL_GFLAGS) | if (NOT GLOG_FOUND OR LOCAL_GFLAGS) | ||||||
|      message (" glog library has not been found") |      message (STATUS " glog library has not been found") | ||||||
|      if(NOT GFlags_FOUND) |      if(NOT GFlags_FOUND) | ||||||
|           message(" or it is likely not linked to gflags.") |           message(STATUS " or it is likely not linked to gflags.") | ||||||
|      endif(NOT GFlags_FOUND) |      endif(NOT GFlags_FOUND) | ||||||
|      message (" glog will be downloaded and built automatically ") |      message (STATUS " glog will be downloaded and built automatically ") | ||||||
|      message (" when doing 'make'. ") |      message (STATUS " when doing 'make'. ") | ||||||
|      set(glog_RELEASE 0.3.3) |      set(glog_RELEASE 0.3.3) | ||||||
|      set(glog_MD5 "a6fd2c22f8996846e34c763422717c18") |      set(glog_MD5 "a6fd2c22f8996846e34c763422717c18") | ||||||
|      if(LOCAL_GFLAGS) |      if(LOCAL_GFLAGS) | ||||||
| @@ -355,6 +355,7 @@ export LIBS=${GFlags_SHARED_LIBS} | |||||||
|      set(GLOG_CONFIGURE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/configure_with_gflags)    |      set(GLOG_CONFIGURE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/configure_with_gflags)    | ||||||
|      ExternalProject_Add( |      ExternalProject_Add( | ||||||
|           glog-${glog_RELEASE} |           glog-${glog_RELEASE} | ||||||
|  |           DEPENDS gflags-${gflags_RELEASE} | ||||||
|           PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} |           PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE} | ||||||
|           URL http://google-glog.googlecode.com/files/glog-${glog_RELEASE}.tar.gz |           URL http://google-glog.googlecode.com/files/glog-${glog_RELEASE}.tar.gz | ||||||
|           DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/download/glog-${glog_RELEASE} |           DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/download/glog-${glog_RELEASE} | ||||||
|   | |||||||
| @@ -22,6 +22,7 @@ set(PVT_LIB_SOURCES | |||||||
|      kml_printer.cc |      kml_printer.cc | ||||||
|      rinex_printer.cc |      rinex_printer.cc | ||||||
|      nmea_printer.cc   |      nmea_printer.cc   | ||||||
|  | #     rtcm_printer.cc   | ||||||
| ) | ) | ||||||
|  |  | ||||||
| include_directories( | include_directories( | ||||||
| @@ -38,3 +39,4 @@ include_directories( | |||||||
|  |  | ||||||
| add_library(pvt_lib ${PVT_LIB_SOURCES}) | add_library(pvt_lib ${PVT_LIB_SOURCES}) | ||||||
| target_link_libraries(pvt_lib ${Boost_LIBRARIES} ${GFlags_LIBS} ${GLOG_LIBRARIES} ${ARMADILLO_LIBRARIES} ) | target_link_libraries(pvt_lib ${Boost_LIBRARIES} ${GFlags_LIBS} ${GLOG_LIBRARIES} ${ARMADILLO_LIBRARIES} ) | ||||||
|  | add_dependencies(input_filter_adapters armadillo-${armadillo_RELEASE} glog-${GLOG_RELEASE}) | ||||||
| @@ -31,3 +31,4 @@ include_directories( | |||||||
| ) | ) | ||||||
|  |  | ||||||
| add_library(channel_fsm ${CHANNEL_FSM_SOURCES}) | add_library(channel_fsm ${CHANNEL_FSM_SOURCES}) | ||||||
|  | add_dependencies(channel_fsm glog-${GLOG_RELEASE}) | ||||||
| @@ -32,3 +32,4 @@ include_directories( | |||||||
| ) | ) | ||||||
|  |  | ||||||
| add_library(conditioner_adapters ${COND_ADAPTER_SOURCES}) | add_library(conditioner_adapters ${COND_ADAPTER_SOURCES}) | ||||||
|  | add_dependencies(conditioner_adapters glog-${GLOG_RELEASE}) | ||||||
| @@ -30,3 +30,4 @@ include_directories( | |||||||
|  |  | ||||||
| add_library(datatype_adapters ${DATATYPE_ADAPTER_SOURCES}) | add_library(datatype_adapters ${DATATYPE_ADAPTER_SOURCES}) | ||||||
| target_link_libraries(datatype_adapters ${GNURADIO_FILTER_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES}) | target_link_libraries(datatype_adapters ${GNURADIO_FILTER_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES}) | ||||||
|  | add_dependencies(datatype_adapters glog-${GLOG_RELEASE}) | ||||||
| @@ -32,3 +32,4 @@ include_directories( | |||||||
|  |  | ||||||
| add_library(input_filter_adapters ${INPUT_FILTER_ADAPTER_SOURCES}) | add_library(input_filter_adapters ${INPUT_FILTER_ADAPTER_SOURCES}) | ||||||
| target_link_libraries(input_filter_adapters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES}) | target_link_libraries(input_filter_adapters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES}) | ||||||
|  | add_dependencies(input_filter_adapters glog-${GLOG_RELEASE}) | ||||||
| @@ -35,3 +35,4 @@ include_directories( | |||||||
|  |  | ||||||
| add_library(obs_gr_blocks ${OBS_GR_BLOCKS_SOURCES} ) | add_library(obs_gr_blocks ${OBS_GR_BLOCKS_SOURCES} ) | ||||||
| target_link_libraries(obs_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES}) | target_link_libraries(obs_gr_blocks ${GNURADIO_RUNTIME_LIBRARIES}) | ||||||
|  | add_dependencies(obs_gr_blocks glog-${GLOG_RELEASE}) | ||||||
| @@ -32,3 +32,4 @@ include_directories( | |||||||
|  |  | ||||||
| add_library(out_adapters ${OUTPUTFILTER_ADAPTER_SOURCES}) | add_library(out_adapters ${OUTPUTFILTER_ADAPTER_SOURCES}) | ||||||
| target_link_libraries(out_adapters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES}) | target_link_libraries(out_adapters ${GNURADIO_RUNTIME_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES}) | ||||||
|  | add_dependencies(out_adapters glog-${GLOG_RELEASE}) | ||||||
| @@ -30,3 +30,4 @@ include_directories( | |||||||
| ) | ) | ||||||
|  |  | ||||||
| add_library(resampler_gr_blocks ${RESAMPLER_GR_BLOCKS_SOURCES}) | add_library(resampler_gr_blocks ${RESAMPLER_GR_BLOCKS_SOURCES}) | ||||||
|  | add_dependencies(resampler_gr_blocks glog-${GLOG_RELEASE}) | ||||||
| @@ -50,3 +50,4 @@ link_directories(${Boost_LIBRARY_DIR}) | |||||||
|  |  | ||||||
| add_library(gnss_system_parameters ${SYSTEM_PARAMETERS_SOURCES}) | add_library(gnss_system_parameters ${SYSTEM_PARAMETERS_SOURCES}) | ||||||
| target_link_libraries(gnss_system_parameters ${Boost_LIBRARIES}) | target_link_libraries(gnss_system_parameters ${Boost_LIBRARIES}) | ||||||
|  | add_dependencies(gnss_system_parameters glog-${GLOG_RELEASE}) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez