Skip to content

Commit

Permalink
MEX library symbols visibility set to default
Browse files Browse the repository at this point in the history
By default, the mexFunctions seems to be hidden in the newer Matlab version, this fix force the compiler to keep the symbols visible.
  • Loading branch information
nicolapiccinelli authored and jschueller committed Jan 17, 2020
1 parent 3575424 commit fc50fd7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/octave/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ if (Matlab_FOUND AND Matlab_MX_LIBRARY)
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})
set_target_properties(nlopt_optimize-mex PROPERTIES COMPILE_FLAGS "-fvisibility=default")

if (NLOPT_CXX)
set_target_properties (nlopt_optimize-mex PROPERTIES LINKER_LANGUAGE CXX)
endif ()
Expand Down

0 comments on commit fc50fd7

Please sign in to comment.