package/open62541: add patch to allow building without a C++ compiler
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 7 Jan 2021 21:14:55 +0000 (22:14 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 7 Jan 2021 21:14:55 +0000 (22:14 +0100)
This patch was intended to be added in commit
b36ea68b5ad0f89ffd92cac3f91654e180683b1c ("package/open62541: new
package") but was missed, causing open62541 to not build on
configurations that lack a C++ compiler. This patch removes the need
for a C++ compiler by properly declaring the CMake project.

Fixes:

  http://autobuild.buildroot.net/results/86ca6a5a01ecfc7030c6be0da81924436b41d057/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/open62541/0001-CMakeLists.txt-project-only-contains-C-code.patch [new file with mode: 0644]

diff --git a/package/open62541/0001-CMakeLists.txt-project-only-contains-C-code.patch b/package/open62541/0001-CMakeLists.txt-project-only-contains-C-code.patch
new file mode 100644 (file)
index 0000000..52a9cba
--- /dev/null
@@ -0,0 +1,27 @@
+From 61f9440dfeacad517965451773371aca0332d700 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Date: Tue, 5 Jan 2021 23:08:53 +0100
+Subject: [PATCH] CMakeLists.txt: project only contains C code
+
+Make sure CMake doesn't check for a C++ compiler when it's not needed,
+as open62541 is in C.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 94ceb127..acc41ab2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ cmake_minimum_required(VERSION 3.0...3.12)
+-project(open62541)
++project(open62541 C)
+ # set(CMAKE_VERBOSE_MAKEFILE ON)
+ if(${CMAKE_VERSION} VERSION_LESS 3.12)
+     cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
+-- 
+2.29.2
+