mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	make cmakelint happy
This commit is contained in:
		
							
								
								
									
										114
									
								
								CMakeLists.txt
									
									
									
									
									
								
							
							
						
						
									
										114
									
								
								CMakeLists.txt
									
									
									
									
									
								
							| @@ -3356,19 +3356,19 @@ endif() | ||||
| # Check signal sources related to FPGA only. | ||||
| ##################################################################### | ||||
| if(ENABLE_MAX2771 AND NOT ENABLE_FPGA) | ||||
| 	message(STATUS "The SPIdev driver is enabled, but the FPGA is not enabled. The FPGA is required when using the SPIdev driver.") | ||||
| 	if(ENABLE_PACKAGING) | ||||
| 		set(ENABLE_MAX2771 OFF) | ||||
| 	else() | ||||
| 		message(FATAL_ERROR "ENABLE_MAX2771 can only be set when ENABLE_FPGA is also set.") | ||||
|     message(STATUS "The SPIdev driver is enabled, but the FPGA is not enabled. The FPGA is required when using the SPIdev driver.") | ||||
|     if(ENABLE_PACKAGING) | ||||
|         set(ENABLE_MAX2771 OFF) | ||||
|     else() | ||||
|         message(FATAL_ERROR "ENABLE_MAX2771 can only be set when ENABLE_FPGA is also set.") | ||||
|     endif() | ||||
| endif() | ||||
| if(ENABLE_DMA_PROXY AND NOT ENABLE_FPGA) | ||||
| 	message(STATUS "The DMA Proxy driver is enabled, but the FPGA is not enabled. The FPGA is required when using the DMA Proxy driver.") | ||||
| 	if(ENABLE_PACKAGING) | ||||
| 		set(ENABLE_DMA_PROXY OFF) | ||||
| 	else() | ||||
| 		message(FATAL_ERROR "ENABLE_DMA_PROXY can only be set when ENABLE_FPGA is also set.") | ||||
|     message(STATUS "The DMA Proxy driver is enabled, but the FPGA is not enabled. The FPGA is required when using the DMA Proxy driver.") | ||||
|     if(ENABLE_PACKAGING) | ||||
|         set(ENABLE_DMA_PROXY OFF) | ||||
|     else() | ||||
|         message(FATAL_ERROR "ENABLE_DMA_PROXY can only be set when ENABLE_FPGA is also set.") | ||||
|     endif() | ||||
| endif() | ||||
|  | ||||
| @@ -3380,13 +3380,13 @@ endif() | ||||
| # Peripheral Interface) | ||||
| ##################################################################### | ||||
| if(ENABLE_MAX2771) | ||||
| 	if(DEFINED ENV{SDKTARGETSYSROOT}) | ||||
| 	    set(TARGET_ROOTFS_PATH $ENV{SDKTARGETSYSROOT}) | ||||
| 	else() | ||||
| 	    set(TARGET_ROOTFS_PATH "") | ||||
| 	endif() | ||||
| 	find_program(STRINGS_EXECUTABLE strings) | ||||
| 	if (NOT STRINGS_EXECUTABLE) | ||||
|     if(DEFINED ENV{SDKTARGETSYSROOT}) | ||||
|         set(TARGET_ROOTFS_PATH $ENV{SDKTARGETSYSROOT}) | ||||
|     else() | ||||
|         set(TARGET_ROOTFS_PATH "") | ||||
|     endif() | ||||
|     find_program(STRINGS_EXECUTABLE strings) | ||||
|     if(NOT STRINGS_EXECUTABLE) | ||||
|         message(STATUS "The 'strings' command could not be found. See https://www.gnu.org/software/binutils/") | ||||
|         message(STATUS " You can try to install it by typing:") | ||||
|         if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|kFreeBSD|GNU") | ||||
| @@ -3399,31 +3399,31 @@ if(ENABLE_MAX2771) | ||||
|             endif() | ||||
|         endif() | ||||
|         message(FATAL_ERROR "Binutils are required to build GNSS-SDR for SoC FPGA devices using the MAX2771 option.") | ||||
| 	endif() | ||||
| 	set(DTB_FILE "${TARGET_ROOTFS_PATH}/boot/devicetree/system-top.dtb") | ||||
| 	if (EXISTS "${DTB_FILE}") | ||||
| 	    message(STATUS "Found DTB file: ${DTB_FILE}") | ||||
| 	    # Run the strings command and grep for "spidev" | ||||
| 	    execute_process( | ||||
| 	        COMMAND ${STRINGS_EXECUTABLE} ${DTB_FILE} | ||||
| 	        COMMAND grep "spidev" | ||||
| 	        OUTPUT_VARIABLE GREP_OUTPUT | ||||
| 	        RESULT_VARIABLE GREP_RESULT | ||||
| 	        OUTPUT_STRIP_TRAILING_WHITESPACE | ||||
| 	    ) | ||||
| 	    if (GREP_RESULT EQUAL 0) | ||||
| 	        message(STATUS "Found spidev-compatible peripheral in ${DTB_FILE}.") | ||||
| 	    else() | ||||
| 			message(STATUS "SPIdev driver not found, its installation is required.") | ||||
| 			if(ENABLE_PACKAGING) | ||||
| 				set(ENABLE_MAX2771 OFF) | ||||
| 			else() | ||||
| 				message(FATAL_ERROR "SPIdev driver is required for building gnss-sdr with -DENABLE_MAX2271=ON.") | ||||
| 			endif() | ||||
| 	    endif() | ||||
| 	else() | ||||
| 	    message(FATAL_ERROR "The device tree (DTB) file ${DTB_FILE} cannot be found.") | ||||
| 	endif() | ||||
|     endif() | ||||
|     set(DTB_FILE "${TARGET_ROOTFS_PATH}/boot/devicetree/system-top.dtb") | ||||
|     if(EXISTS "${DTB_FILE}") | ||||
|         message(STATUS "Found DTB file: ${DTB_FILE}") | ||||
|         # Run the strings command and grep for "spidev" | ||||
|         execute_process( | ||||
|             COMMAND ${STRINGS_EXECUTABLE} ${DTB_FILE} | ||||
|             COMMAND grep "spidev" | ||||
|             OUTPUT_VARIABLE GREP_OUTPUT | ||||
|             RESULT_VARIABLE GREP_RESULT | ||||
|             OUTPUT_STRIP_TRAILING_WHITESPACE | ||||
|         ) | ||||
|         if(GREP_RESULT EQUAL 0) | ||||
|             message(STATUS "Found spidev-compatible peripheral in ${DTB_FILE}.") | ||||
|         else() | ||||
|             message(STATUS "SPIdev driver not found, its installation is required.") | ||||
|             if(ENABLE_PACKAGING) | ||||
|                 set(ENABLE_MAX2771 OFF) | ||||
|             else() | ||||
|                 message(FATAL_ERROR "SPIdev driver is required for building gnss-sdr with -DENABLE_MAX2271=ON.") | ||||
|             endif() | ||||
|         endif() | ||||
|     else() | ||||
|         message(FATAL_ERROR "The device tree (DTB) file ${DTB_FILE} cannot be found.") | ||||
|     endif() | ||||
| endif() | ||||
|  | ||||
|  | ||||
| @@ -3434,21 +3434,21 @@ endif() | ||||
| # to leverage DMA capabilities  for Xilinx FPGA and SoC systems | ||||
| ##################################################################### | ||||
| if(ENABLE_DMA_PROXY) | ||||
| 	if(DEFINED ENV{SDKTARGETSYSROOT}) | ||||
| 	    set(TARGET_ROOTFS_PATH $ENV{SDKTARGETSYSROOT}) | ||||
| 	else() | ||||
| 	    set(TARGET_ROOTFS_PATH "") | ||||
| 	endif() | ||||
| 	set(DMA_PROXY_FILE "${TARGET_ROOTFS_PATH}/lib/modules/5.10.0-xilinx-v2021.2/extra/dma-proxy.ko") | ||||
| 	if (EXISTS "${DMA_PROXY_FILE}") | ||||
| 	    message(STATUS "Found dma-proxy.ko file: ${DMA_PROXY_FILE}") | ||||
| 	else() | ||||
| 		if(ENABLE_PACKAGING) | ||||
| 			set(ENABLE_DMA_PROXY OFF) | ||||
| 		else() | ||||
| 			message(FATAL_ERROR "DMA Proxy driver is required for building gnss-sdr with -DENABLE_DMA_PROXY=ON.") | ||||
| 		endif() | ||||
| 	endif() | ||||
|     if(DEFINED ENV{SDKTARGETSYSROOT}) | ||||
|         set(TARGET_ROOTFS_PATH $ENV{SDKTARGETSYSROOT}) | ||||
|     else() | ||||
|         set(TARGET_ROOTFS_PATH "") | ||||
|     endif() | ||||
|     set(DMA_PROXY_FILE "${TARGET_ROOTFS_PATH}/lib/modules/5.10.0-xilinx-v2021.2/extra/dma-proxy.ko") | ||||
|     if(EXISTS "${DMA_PROXY_FILE}") | ||||
|         message(STATUS "Found dma-proxy.ko file: ${DMA_PROXY_FILE}") | ||||
|     else() | ||||
|         if(ENABLE_PACKAGING) | ||||
|             set(ENABLE_DMA_PROXY OFF) | ||||
|         else() | ||||
|             message(FATAL_ERROR "DMA Proxy driver is required for building gnss-sdr with -DENABLE_DMA_PROXY=ON.") | ||||
|         endif() | ||||
|     endif() | ||||
| endif() | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Marc Majoral
					Marc Majoral