Skip to content

Commit a75f3d9

Browse files
authored
Octave: Use c++ 17 (#618)
1 parent 019f61a commit a75f3d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/octave/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ if (OCTAVE_FOUND)
3535
octave_add_oct (nlopt_optimize SOURCES nlopt_optimize-oct.cc ${CMAKE_CURRENT_BINARY_DIR}/nlopt_optimize_usage.h LINK_LIBRARIES ${nlopt_lib})
3636
target_include_directories (nlopt_optimize PRIVATE ${OCTAVE_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/src/api)
3737

38+
if (OCTAVE_VERSION_MAJOR GREATER 10)
39+
target_compile_features(nlopt_optimize PRIVATE cxx_std_17)
40+
endif()
41+
3842
if (NOT DEFINED INSTALL_OCT_DIR)
3943
file (RELATIVE_PATH INSTALL_OCT_DIR ${OCTAVE_ROOT_DIR} ${OCTAVE_OCT_SITE_DIR})
4044
endif ()

0 commit comments

Comments
 (0)