Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
studieren666
nlopt
提交
3343118e
N
nlopt
项目概览
studieren666
/
nlopt
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nlopt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3343118e
编写于
7月 20, 2016
作者:
J
Julien Schueller
提交者:
Steven G. Johnson
7月 20, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Default build (#74)
* Enable Matlab by default * Cleanup CMakeLists.txt
上级
cfa6abb9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
47 addition
and
46 deletion
+47
-46
CMakeLists.txt
CMakeLists.txt
+43
-44
octave/CMakeLists.txt
octave/CMakeLists.txt
+2
-0
swig/CMakeLists.txt
swig/CMakeLists.txt
+2
-2
未找到文件。
CMakeLists.txt
浏览文件 @
3343118e
...
...
@@ -26,7 +26,7 @@ option (WITH_CXX "enable cxx routines" OFF)
option
(
BUILD_SHARED_LIBS
"Build NLOPT as a shared library"
ON
)
option
(
BUILD_PYTHON
"build python bindings"
ON
)
option
(
BUILD_OCTAVE
"build octave bindings"
ON
)
option
(
BUILD_MATLAB
"build matlab bindings"
O
FF
)
option
(
BUILD_MATLAB
"build matlab bindings"
O
N
)
option
(
BUILD_GUILE
"build guile bindings"
ON
)
option
(
USE_SWIG
"use SWIG to build bindings"
ON
)
...
...
@@ -48,13 +48,13 @@ set (INSTALL_DATA_DIR share/nlopt CACHE PATH "Installation directory fo
set
(
INSTALL_CMAKE_DIR
${
INSTALL_LIB_DIR
}
/cmake/nlopt CACHE PATH
"Installation directory for cmake config files"
)
# Make relative paths absolute (needed later on)
foreach
(
p LIB BIN INCLUDE DATA CMAKE
)
set
(
var INSTALL_
${
p
}
_DIR
)
set
(
RELATIVE_INSTALL_
${
p
}
_DIR
${
INSTALL_
${
p
}
_DIR
}
)
if
(
NOT IS_ABSOLUTE
"
${${
var
}}
"
)
set
(
${
var
}
"
${
CMAKE_INSTALL_PREFIX
}
/
${${
var
}}
"
)
endif
()
endforeach
()
foreach
(
p LIB BIN INCLUDE DATA CMAKE
)
set
(
var INSTALL_
${
p
}
_DIR
)
set
(
RELATIVE_INSTALL_
${
p
}
_DIR
${
INSTALL_
${
p
}
_DIR
}
)
if
(
NOT IS_ABSOLUTE
"
${${
var
}}
"
)
set
(
${
var
}
"
${
CMAKE_INSTALL_PREFIX
}
/
${${
var
}}
"
)
endif
()
endforeach
()
set
(
CMAKE_INSTALL_RPATH
${
INSTALL_LIB_DIR
}
)
...
...
@@ -158,21 +158,21 @@ set (${INCLUDE_DIRECTORIES} "")
include_directories
(
${
CMAKE_BINARY_DIR
}
/api
${
CMAKE_BINARY_DIR
}
stogo
util
direct
cdirect
praxis
luksan
crs
mlsl
mma
cobyla
newuoa
neldermead
auglag
bobyqa
isres
stogo
util
direct
cdirect
praxis
luksan
crs
mlsl
mma
cobyla
newuoa
neldermead
auglag
bobyqa
isres
slsqp
esch
api
)
...
...
@@ -182,29 +182,29 @@ include_directories (
# nlopt LIBRARY TARGET (SHARED OR STATIC)
#==============================================================================
SET
(
NLOPT_HEADERS
set
(
NLOPT_HEADERS
api/nlopt.h
${
CMAKE_BINARY_DIR
}
/api/nlopt.hpp
${
CMAKE_BINARY_DIR
}
/api/nlopt.f
)
SET
(
NLOPT_SOURCES
direct/DIRect.c direct/direct_wrap.c direct/DIRserial.c direct/DIRsubrout.c direct/direct-internal.h direct/direct.h
cdirect/cdirect.c cdirect/hybrid.c cdirect/cdirect.h
praxis/praxis.c praxis/praxis.h
luksan/plis.c luksan/plip.c luksan/pnet.c luksan/mssubs.c luksan/pssubs.c luksan/luksan.h
crs/crs.c crs/crs.h
mlsl/mlsl.c mlsl/mlsl.h
mma/mma.c mma/mma.h mma/ccsa_quadratic.c
cobyla/cobyla.c cobyla/cobyla.h
newuoa/newuoa.c newuoa/newuoa.h
neldermead/nldrmd.c neldermead/neldermead.h neldermead/sbplx.c
auglag/auglag.c auglag/auglag.h
bobyqa/bobyqa.c bobyqa/bobyqa.h
isres/isres.c isres/isres.h
slsqp/slsqp.c slsqp/slsqp.h
esch/esch.c esch/esch.h
api/general.c api/options.c api/optimize.c api/deprecated.c api/nlopt-internal.h api/nlopt.h api/f77api.c api/f77funcs.h api/f77funcs_.h api/nlopt.hpp api/nlopt-in.hpp
util/mt19937ar.c util/sobolseq.c util/soboldata.h util/timer.c util/stop.c util/nlopt-util.h util/redblack.c util/redblack.h util/qsort_r.c util/rescale.c
)
set
(
NLOPT_SOURCES
direct/DIRect.c direct/direct_wrap.c direct/DIRserial.c direct/DIRsubrout.c direct/direct-internal.h direct/direct.h
cdirect/cdirect.c cdirect/hybrid.c cdirect/cdirect.h
praxis/praxis.c praxis/praxis.h
luksan/plis.c luksan/plip.c luksan/pnet.c luksan/mssubs.c luksan/pssubs.c luksan/luksan.h
crs/crs.c crs/crs.h
mlsl/mlsl.c mlsl/mlsl.h
mma/mma.c mma/mma.h mma/ccsa_quadratic.c
cobyla/cobyla.c cobyla/cobyla.h
newuoa/newuoa.c newuoa/newuoa.h
neldermead/nldrmd.c neldermead/neldermead.h neldermead/sbplx.c
auglag/auglag.c auglag/auglag.h
bobyqa/bobyqa.c bobyqa/bobyqa.h
isres/isres.c isres/isres.h
slsqp/slsqp.c slsqp/slsqp.h
esch/esch.c esch/esch.h
api/general.c api/options.c api/optimize.c api/deprecated.c api/nlopt-internal.h api/nlopt.h api/f77api.c api/f77funcs.h api/f77funcs_.h api/nlopt.hpp api/nlopt-in.hpp
util/mt19937ar.c util/sobolseq.c util/soboldata.h util/timer.c util/stop.c util/nlopt-util.h util/redblack.c util/redblack.h util/qsort_r.c util/rescale.c
)
if
(
WITH_CXX
)
list
(
APPEND NLOPT_SOURCES stogo/global.cc stogo/linalg.cc stogo/local.cc stogo/stogo.cc stogo/tools.cc stogo/global.h stogo/linalg.h stogo/local.h stogo/stogo_config.h stogo/stogo.h stogo/tools.h
)
...
...
@@ -274,7 +274,6 @@ if (BUILD_OCTAVE)
endif
()
if
(
BUILD_MATLAB
)
cmake_minimum_required
(
VERSION 3.3
)
# for the matlab_add_mex macro
find_package
(
Matlab
)
endif
()
...
...
octave/CMakeLists.txt
浏览文件 @
3343118e
...
...
@@ -27,5 +27,7 @@ if (OCTAVE_FOUND)
endif
()
if
(
Matlab_FOUND
)
cmake_minimum_required
(
VERSION 3.3
)
# for the matlab_add_mex macro
matlab_add_mex
(
NAME nlopt_optimize-mex SRC nlopt_optimize-mex.c OUTPUT_NAME nlopt_optimize LINK_TO
${
nlopt_lib
}
)
endif
()
swig/CMakeLists.txt
浏览文件 @
3343118e
...
...
@@ -33,8 +33,8 @@ if (NUMPY_FOUND AND PYTHONLIBS_FOUND AND (SWIG_FOUND OR (EXISTS ${CMAKE_CURRENT_
swig_link_libraries
(
nlopt
${
PYTHON_LIBRARIES
}
)
endif
()
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/nlopt.py DESTINATION
${
PYTHON_MODULE_PATH
}
)
install
(
TARGETS
${
SWIG_MODULE_nlopt_REAL_NAME
}
LIBRARY DESTINATION
${
PYTHON_MODULE_PATH
}
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/nlopt.py DESTINATION
${
PYTHON_MODULE_PATH
}
)
install
(
TARGETS
${
SWIG_MODULE_nlopt_REAL_NAME
}
LIBRARY DESTINATION
${
PYTHON_MODULE_PATH
}
)
endif
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录