diff mbox series

[1/1] package/libwebsockets: fix build without C++

Message ID 20220413190815.888854-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] package/libwebsockets: fix build without C++ | expand

Commit Message

Fabrice Fontaine April 13, 2022, 7:08 p.m. UTC
Fix the following build failure without C++ raised since bump to version
4.3.1 in commit 3a9cf51ab38b6a3a095241b8e87eab7e5b5bd617 and
https://github.com/warmcat/libwebsockets/commit/962e9ee345bc28749577c1fca2542a273404627d:

CMake Error at /nvmedata/autobuild/instance-11/output-1/per-package/libwebsockets/host/share/cmake-3.18/Modules/CMakeTestCXXCompiler.cmake:59 (message):
  The C++ compiler

    "/usr/bin/clang++"

  is not able to compile a simple test program.

Fixes:
 - http://autobuild.buildroot.org/results/550e7f7d54adf74f8cc078be5b91b3567d622ede

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...1-CMakeLists.txt-fix-build-without-C.patch | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 package/libwebsockets/0001-CMakeLists.txt-fix-build-without-C.patch

Comments

Arnout Vandecappelle April 21, 2022, 7:09 p.m. UTC | #1
On 13/04/2022 21:08, Fabrice Fontaine wrote:
> Fix the following build failure without C++ raised since bump to version
> 4.3.1 in commit 3a9cf51ab38b6a3a095241b8e87eab7e5b5bd617 and
> https://github.com/warmcat/libwebsockets/commit/962e9ee345bc28749577c1fca2542a273404627d:
> 
> CMake Error at /nvmedata/autobuild/instance-11/output-1/per-package/libwebsockets/host/share/cmake-3.18/Modules/CMakeTestCXXCompiler.cmake:59 (message):
>    The C++ compiler
> 
>      "/usr/bin/clang++"
> 
>    is not able to compile a simple test program.
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/550e7f7d54adf74f8cc078be5b91b3567d622ede
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   ...1-CMakeLists.txt-fix-build-without-C.patch | 44 +++++++++++++++++++
>   1 file changed, 44 insertions(+)
>   create mode 100644 package/libwebsockets/0001-CMakeLists.txt-fix-build-without-C.patch
> 
> diff --git a/package/libwebsockets/0001-CMakeLists.txt-fix-build-without-C.patch b/package/libwebsockets/0001-CMakeLists.txt-fix-build-without-C.patch
> new file mode 100644
> index 0000000000..c6d6d07dcc
> --- /dev/null
> +++ b/package/libwebsockets/0001-CMakeLists.txt-fix-build-without-C.patch
> @@ -0,0 +1,44 @@
> +From 726b36eca158063d8871c91ad99a29113ea35aea Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Wed, 13 Apr 2022 21:03:26 +0200
> +Subject: [PATCH] CMakeLists.txt: fix build without C++
> +
> +Fix the following build failure without C++ raised since version 4.2.0
> +and
> +https://github.com/warmcat/libwebsockets/commit/962e9ee345bc28749577c1fca2542a273404627d:
> +
> +CMake Error at /nvmedata/autobuild/instance-11/output-1/per-package/libwebsockets/host/share/cmake-3.18/Modules/CMakeTestCXXCompiler.cmake:59 (message):
> +  The C++ compiler
> +
> +    "/usr/bin/clang++"
> +
> +  is not able to compile a simple test program.
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/550e7f7d54adf74f8cc078be5b91b3567d622ede
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Upstream status: https://github.com/warmcat/libwebsockets/pull/2613]
> +---
> + CMakeLists.txt | 5 ++++-
> + 1 file changed, 4 insertions(+), 1 deletion(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index 08aaf8c6..96e3ad18 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -71,7 +71,10 @@ if (ESP_PLATFORM)
> + endif()
> +
> + # it's at this point any toolchain file is brought in
> +-project(libwebsockets C CXX)
> ++project(libwebsockets C)
> ++if (LWS_WITH_SECURE_STREAMS_CPP)
> ++	enable_language(CXX)
> ++endif()
> + include(CTest)
> +
> + if (PICO_SDK_PATH)
> +--
> +2.35.1
> +
diff mbox series

Patch

diff --git a/package/libwebsockets/0001-CMakeLists.txt-fix-build-without-C.patch b/package/libwebsockets/0001-CMakeLists.txt-fix-build-without-C.patch
new file mode 100644
index 0000000000..c6d6d07dcc
--- /dev/null
+++ b/package/libwebsockets/0001-CMakeLists.txt-fix-build-without-C.patch
@@ -0,0 +1,44 @@ 
+From 726b36eca158063d8871c91ad99a29113ea35aea Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Wed, 13 Apr 2022 21:03:26 +0200
+Subject: [PATCH] CMakeLists.txt: fix build without C++
+
+Fix the following build failure without C++ raised since version 4.2.0
+and
+https://github.com/warmcat/libwebsockets/commit/962e9ee345bc28749577c1fca2542a273404627d:
+
+CMake Error at /nvmedata/autobuild/instance-11/output-1/per-package/libwebsockets/host/share/cmake-3.18/Modules/CMakeTestCXXCompiler.cmake:59 (message):
+  The C++ compiler
+
+    "/usr/bin/clang++"
+
+  is not able to compile a simple test program.
+
+Fixes:
+ - http://autobuild.buildroot.org/results/550e7f7d54adf74f8cc078be5b91b3567d622ede
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/warmcat/libwebsockets/pull/2613]
+---
+ CMakeLists.txt | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 08aaf8c6..96e3ad18 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -71,7 +71,10 @@ if (ESP_PLATFORM)
+ endif()
+ 
+ # it's at this point any toolchain file is brought in
+-project(libwebsockets C CXX)
++project(libwebsockets C)
++if (LWS_WITH_SECURE_STREAMS_CPP)
++	enable_language(CXX)
++endif()
+ include(CTest)
+ 
+ if (PICO_SDK_PATH)
+-- 
+2.35.1
+