Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
bcf98e05
Commit
bcf98e05
authored
Dec 15, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed incorrect mex file name being shown in the generated class code.
parent
b85cb68e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
CMakeLists.txt
dlib/matlab/CMakeLists.txt
+1
-1
cmake_mex_wrapper
dlib/matlab/cmake_mex_wrapper
+2
-1
mex_wrapper.cpp
dlib/matlab/mex_wrapper.cpp
+1
-1
No files found.
dlib/matlab/CMakeLists.txt
View file @
bcf98e05
cmake_minimum_required
(
VERSION 2.8.
4
)
cmake_minimum_required
(
VERSION 2.8.
11
)
PROJECT
(
mex_functions
)
...
...
dlib/matlab/cmake_mex_wrapper
View file @
bcf98e05
...
...
@@ -3,7 +3,7 @@
# that additional library dependencies can be added like this: add_mex_function(name lib1 dlib libetc).
# That is, just add more libraries after the name and they will be build into the mex file.
cmake_minimum_required(VERSION 2.8.
4
)
cmake_minimum_required(VERSION 2.8.
11
)
set(BUILDING_MATLAB_MEX_FILE true)
set(CMAKE_POSITION_INDEPENDENT_CODE True)
...
...
@@ -69,6 +69,7 @@ INCLUDE(InstallRequiredSystemLibraries)
MACRO(add_mex_function name )
ADD_LIBRARY(${name} MODULE ${name}.cpp )
target_compile_definitions(${name} PRIVATE -DMEX_FILENAME=${name})
if (UNIX)
# Doing this prevents our mex function from exporting any symbols
# other than mexFunction(). This sometimes doesn't matter but sometimes
...
...
dlib/matlab/mex_wrapper.cpp
View file @
bcf98e05
...
...
@@ -4897,7 +4897,7 @@ void mexFunction( int nlhs, mxArray *plhs[],
string
classname
=
trim
(
string
(
DEF2STR
(
MEX_CLASS_NAME
)),
"
\t
()"
);
std
::
vector
<
string
>
methods
=
split
(
trim
(
string
(
DEF2STR
(
MEX_CLASS_METHODS
)),
"
\t
()"
),
"
\t
,"
);
string
mex_filename
=
"mex_"
+
classname
;
string
mex_filename
=
trim
(
string
(
DEF2STR
(
MEX_FILENAME
)),
"
\t
()"
)
;
bool
has_load_obj
=
false
;
size_t
load_obj_idx
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment