Control: tags -1 + patch

On Sun, 07 Sep 2025 18:36:43 +0200 =?ISO-8859-1?Q?S=E9bastien?=
Villemot <[email protected]> wrote:
> Le dimanche 07 septembre 2025 à 10:45 +0200, Sébastien Villemot a
> écrit :
> > nlopt FTBFS against octave 10 (which currently stands in
experimental).
> 
> My understanding is that the problem is due to the compilation flags
> that enforce the C++11 standard, while Octave headers use C++17.

Please find attached a patch that removes -std=c+11 from the compiler
flags. It fixes the FTBFS, and at first glance there does not seem to
be any negative side effect.

-- 
⢀⣴⠾⠻⢶⣦⠀  Sébastien Villemot
⣾⠁⢠⠒⠀⣿⡁  Debian Developer
⢿⡄⠘⠷⠚⠋⠀  https://sebastien.villemot.name
⠈⠳⣄⠀⠀⠀⠀  https://www.debian.org
Description: Fix FTBFS against Octave 10
 Octave 10 headers use the C++17 standard, while the NLopt build system enforces
 the C++11 standard. This patch removes -std=c++11 from the compiler flags, to
 allow C++17 headers.
Author: Sébastien Villemot <[email protected]>
Bug-Debian: https://bugs.debian.org/1114587
Forwarded: no
Last-Update: 2025-09-15
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -160,7 +160,6 @@ if (NLOPT_CXX OR NLOPT_PYTHON OR NLOPT_G
   if (SYSTEM_HAS_CXX)
     check_cxx_compiler_flag ("-std=c++11" SUPPORTS_STDCXX11)
     if (SUPPORTS_STDCXX11)
-      set (CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
       if (NLOPT_CXX)
         set (NLOPT_CXX11 ON)
       endif ()

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to