diff options
author | Rainer Hurling <rhurlin@FreeBSD.org> | 2025-09-02 09:06:20 +0200 |
---|---|---|
committer | Rainer Hurling <rhurlin@FreeBSD.org> | 2025-09-02 09:16:17 +0200 |
commit | 85f92d0a19f1eab321a6eabdd65b300cd16e61d3 (patch) | |
tree | 00bd31600afb16e75033ebe5e3332519e3433d6a /math/nlopt/files/patch-CMakeLists.txt | |
parent | net/ntpd-rs: Update to 1.6.2 (diff) |
math/nlopt: Fix build with Octave installed
cmake requires at least C++17 to build correctly if math/octave is
already installed.
math/octave is now a fixed dependency for nlopt, as this is the
only way to guarantee that Octave packages such as
math/octave-forge-mboct-fem-pkg will find a sufficiently
complete nlopt.
PR: 289110
Reported by: stephen@
MFH: 2025Q3
Diffstat (limited to 'math/nlopt/files/patch-CMakeLists.txt')
-rw-r--r-- | math/nlopt/files/patch-CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/math/nlopt/files/patch-CMakeLists.txt b/math/nlopt/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..4cc24139004e --- /dev/null +++ b/math/nlopt/files/patch-CMakeLists.txt @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2025-02-04 18:29:30 UTC ++++ CMakeLists.txt +@@ -147,7 +147,7 @@ if (NLOPT_CXX OR NLOPT_PYTHON OR NLOPT_GUILE OR NLOPT_ + if (NLOPT_CXX OR NLOPT_PYTHON OR NLOPT_GUILE OR NLOPT_OCTAVE OR NLOPT_JAVA) + check_cxx_symbol_exists (__cplusplus ciso646 SYSTEM_HAS_CXX) + if (SYSTEM_HAS_CXX) +- set (CMAKE_CXX_STANDARD 11) # set the standard to C++11 but do not require it ++ set (CMAKE_CXX_STANDARD 17) # set the standard to C++17 but do not require it + + if (NLOPT_CXX) + set (CMAKE_CXX_STANDARD_REQUIRED ON) # if we build C++ API, we do need C++11 |