mirror of
				https://github.com/rtlsdrblog/rtl-sdr-blog.git
				synced 2025-10-30 08:28:06 +01:00 
			
		
		
		
	Fix for CMake < 3.12.0
As several current LTS distributions currently ship with CMake
< 3.12.0, add a work-around for CMake Issue 16967.
Otherwise we get:
CMake Error at
/usr/share/cmake-3.7/Modules/CheckCXXSourceCompiles.cmake:64 (try_compile):
   Unknown extension ".cxx" for file
     /tmp/rtl-sdr/build/CMakeFiles/CMakeTmp/src.cxx
   try_compile() works only for enabled languages.  Currently these are:
     C
			
			
This commit is contained in:
		| @@ -20,7 +20,13 @@ | ||||
| # Project setup | ||||
| ######################################################################## | ||||
| cmake_minimum_required(VERSION 3.7.2) | ||||
| project(rtlsdr C) | ||||
|  | ||||
| # workaround for https://gitlab.kitware.com/cmake/cmake/issues/16967 | ||||
| if(${CMAKE_VERSION} VERSION_LESS "3.12.0") | ||||
|     project(rtlsdr) | ||||
| else() | ||||
|     project(rtlsdr C) | ||||
| endif() | ||||
|  | ||||
| #select the release build type by default to get optimization flags | ||||
| if(NOT CMAKE_BUILD_TYPE) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user