Don't require a C++ compiler

By default, CMake assumes that the project is using both C and C++.  By
explicitly passing 'C' as argument of the project() macro, we tell CMake
that only C is used, which prevents CMake from erroring out if a C++
compiler doesn't exist.
This commit is contained in:
Arnout Vandecappelle (Essensium/Mind)
2018-03-31 22:50:37 +02:00
parent 5fbd75ef94
commit a6284cb9ed
4 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@
cmake_minimum_required(VERSION 2.8.9)
set(CMAKE_TOOLCHAIN_FILE toolchain-arm-cortex-m.cmake)
project (hackrf_firmware_all)
project (hackrf_firmware_all C)
add_subdirectory(blinky)
add_subdirectory(hackrf_usb)

View File

@ -22,7 +22,7 @@
cmake_minimum_required(VERSION 2.8.9)
set(CMAKE_TOOLCHAIN_FILE ../toolchain-arm-cortex-m.cmake)
project(blinky)
project(blinky C)
include(../hackrf-common.cmake)

View File

@ -21,7 +21,7 @@
cmake_minimum_required(VERSION 2.8.9)
set(CMAKE_TOOLCHAIN_FILE ../toolchain-arm-cortex-m.cmake)
project(hackrf_usb)
project(hackrf_usb C)
include(../hackrf-common.cmake)

View File

@ -1,7 +1,7 @@
#top dir cmake project for libhackrf + tools
cmake_minimum_required(VERSION 2.8)
project (HackRF)
project (HackRF C)
set(CMAKE_C_FLAGS "$ENV{CFLAGS}" CACHE STRING "C Flags")