From a6284cb9ed39a9fd9331fc0d6344002587dbaf33 Mon Sep 17 00:00:00 2001 From: "Arnout Vandecappelle (Essensium/Mind)" Date: Sat, 31 Mar 2018 22:50:37 +0200 Subject: [PATCH] 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. --- firmware/CMakeLists.txt | 2 +- firmware/blinky/CMakeLists.txt | 2 +- firmware/hackrf_usb/CMakeLists.txt | 2 +- host/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/firmware/CMakeLists.txt b/firmware/CMakeLists.txt index 3f21fc5a..90fbda84 100644 --- a/firmware/CMakeLists.txt +++ b/firmware/CMakeLists.txt @@ -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) diff --git a/firmware/blinky/CMakeLists.txt b/firmware/blinky/CMakeLists.txt index 97eb18de..c887b0e0 100644 --- a/firmware/blinky/CMakeLists.txt +++ b/firmware/blinky/CMakeLists.txt @@ -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) diff --git a/firmware/hackrf_usb/CMakeLists.txt b/firmware/hackrf_usb/CMakeLists.txt index 29272b79..73e84d20 100644 --- a/firmware/hackrf_usb/CMakeLists.txt +++ b/firmware/hackrf_usb/CMakeLists.txt @@ -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) diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 03e31ee7..72cbfb49 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -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")