Skip to content

Commit 78b1be3

Browse files
committed
CMake: Bump version 3.18
1 parent 1af6c51 commit 78b1be3

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

CMakeLists.txt

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Benoit Scherrer, 2010 CRL, Harvard Medical School
1313
# Copyright (c) 2008-2009 Children's Hospital Boston
1414
#==============================================================================
15-
cmake_minimum_required (VERSION 3.15)
15+
cmake_minimum_required (VERSION 3.18)
1616

1717
set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type")
1818

@@ -324,16 +324,12 @@ if (UNIX)
324324
endif ()
325325

326326
if (NLOPT_PYTHON)
327-
if (CMAKE_VERSION VERSION_LESS 3.18)
328-
find_package (Python 3.6 COMPONENTS Interpreter Development NumPy)
327+
option (NLOPT_PYTHON_SABI "Use Python stable ABI" OFF)
328+
if (NLOPT_PYTHON_SABI AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.26)
329+
find_package (Python 3.6 COMPONENTS Interpreter Development.SABIModule NumPy)
330+
add_library (Python::Module ALIAS Python::SABIModule)
329331
else ()
330-
option (NLOPT_PYTHON_SABI "Use Python stable ABI" OFF)
331-
if (NLOPT_PYTHON_SABI AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.26)
332-
find_package (Python 3.6 COMPONENTS Interpreter Development.SABIModule NumPy)
333-
add_library (Python::Module ALIAS Python::SABIModule)
334-
else ()
335-
find_package (Python 3.6 COMPONENTS Interpreter Development.Module NumPy)
336-
endif ()
332+
find_package (Python 3.6 COMPONENTS Interpreter Development.Module NumPy)
337333
endif ()
338334
endif ()
339335

src/octave/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ if (Matlab_FOUND AND Matlab_MX_LIBRARY)
66
matlab_add_mex (NAME nlopt_optimize-mex SRC nlopt_optimize-mex.c OUTPUT_NAME nlopt_optimize LINK_TO ${nlopt_lib})
77
target_include_directories (nlopt_optimize-mex PRIVATE ${PROJECT_SOURCE_DIR}/src/api)
88

9-
if (CMAKE_VERSION VERSION_LESS 3.14.0)
10-
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
11-
message("Forcing mexFunction visibility to default")
12-
set_target_properties(nlopt_optimize-mex PROPERTIES COMPILE_FLAGS "-fvisibility=default")
13-
endif()
14-
endif()
15-
169
if (NLOPT_CXX)
1710
set_target_properties (nlopt_optimize-mex PROPERTIES LINKER_LANGUAGE CXX)
1811
endif ()

0 commit comments

Comments
 (0)