File tree Expand file tree Collapse file tree 2 files changed +6
-17
lines changed Expand file tree Collapse file tree 2 files changed +6
-17
lines changed Original file line number Diff line number Diff line change 12
12
# Benoit Scherrer, 2010 CRL, Harvard Medical School
13
13
# Copyright (c) 2008-2009 Children's Hospital Boston
14
14
#==============================================================================
15
- cmake_minimum_required (VERSION 3.15 )
15
+ cmake_minimum_required (VERSION 3.18 )
16
16
17
17
set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type" )
18
18
@@ -324,16 +324,12 @@ if (UNIX)
324
324
endif ()
325
325
326
326
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 )
329
331
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 )
337
333
endif ()
338
334
endif ()
339
335
Original file line number Diff line number Diff line change @@ -6,13 +6,6 @@ if (Matlab_FOUND AND Matlab_MX_LIBRARY)
6
6
matlab_add_mex (NAME nlopt_optimize-mex SRC nlopt_optimize-mex.c OUTPUT_NAME nlopt_optimize LINK_TO ${nlopt_lib} )
7
7
target_include_directories (nlopt_optimize-mex PRIVATE ${PROJECT_SOURCE_DIR} /src/api )
8
8
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
-
16
9
if (NLOPT_CXX )
17
10
set_target_properties (nlopt_optimize-mex PROPERTIES LINKER_LANGUAGE CXX )
18
11
endif ()
You can’t perform that action at this time.
0 commit comments