0002-fix-build-without-C.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From f19b109f2a879af7b0753d94a2a312e4039adbed Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sun, 8 May 2022 23:52:36 +0200
  4. Subject: [PATCH] fix build without C++
  5. Fix the following build failure without C++ raised since version 1.2.0
  6. and
  7. https://github.com/projectNe10/Ne10/commit/20b1896fd6532336e6a46608778bd6e0396dc4dc:
  8. CMake Error at /nvmedata/autobuild/instance-11/output-1/host/share/cmake-3.18/Modules/CMakeTestCXXCompiler.cmake:59 (message):
  9. The C++ compiler
  10. "/usr/bin/clang++"
  11. is not able to compile a simple test program.
  12. Fixes:
  13. - http://autobuild.buildroot.org/results/a86d09d569babe6b88cb8e5fbb47483772f42aed
  14. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  15. [Upstream status: https://github.com/projectNe10/Ne10/pull/280]
  16. ---
  17. CMakeLists.txt | 2 +-
  18. modules/CMakeLists.txt | 2 ++
  19. 2 files changed, 3 insertions(+), 1 deletion(-)
  20. diff --git a/CMakeLists.txt b/CMakeLists.txt
  21. index 40e1b72..10081f8 100644
  22. --- a/CMakeLists.txt
  23. +++ b/CMakeLists.txt
  24. @@ -26,7 +26,7 @@
  25. #
  26. cmake_minimum_required(VERSION 2.6)
  27. -project(NE10 C CXX ASM)
  28. +project(NE10 C ASM)
  29. option(NE10_BUILD_SHARED "Build NE10 shared libraries" OFF)
  30. option(NE10_BUILD_STATIC "Build NE10 static libraries" ON)
  31. diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
  32. index 4f158e9..951527a 100644
  33. --- a/modules/CMakeLists.txt
  34. +++ b/modules/CMakeLists.txt
  35. @@ -173,6 +173,8 @@ endif(IOS_PLATFORM)
  36. endif()
  37. if(NE10_ENABLE_DSP)
  38. + enable_language(CXX)
  39. +
  40. #enable NE10_init_dsp
  41. add_definitions(-DNE10_ENABLE_DSP)
  42. --
  43. 2.35.1