Skip to content

Commit

Permalink
Remove native octave bindings in favor of mex-based ones
Browse files Browse the repository at this point in the history
See discussion in #305
  • Loading branch information
traversaro committed Jun 2, 2017
1 parent 68990ef commit 3e089e1
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 304 deletions.
14 changes: 3 additions & 11 deletions bindings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
option(IDYNTREE_USES_PYTHON "Do you want to create the Python bindings" FALSE)
option(IDYNTREE_USES_LUA "Do you want to create the Lua bindings" FALSE)
option(IDYNTREE_USES_MATLAB "Do you want to create the MATLAB bindings" FALSE)
option(IDYNTREE_USES_OCTAVE "Do you want to create the OCTAVE bindings using the Octave native C++ interface?" FALSE)
option(IDYNTREE_USES_OCTAVE_MEX "Do you want to create the OCTAVE bindings using the mex Octave interface" FALSE)
option(IDYNTREE_USES_OCTAVE "Do you want to create the OCTAVE bindings" FALSE)
option(IDYNTREE_GENERATE_MATLAB "Enable if you have the experimental version of SWIG necessary for generating the Matlab wrapper" FALSE)

if(IDYNTREE_USES_PYTHON OR
IDYNTREE_USES_LUA OR
IDYNTREE_USES_MATLAB OR
IDYNTREE_USES_OCTAVE OR
IDYNTREE_USES_OCTAVE_MEX OR
IDYNTREE_GENERATE_MATLAB)
if(NOT IDYNTREE_USES_KDL)
message(FATAL_ERROR "Impossible generated bindings if KDL is not enabled")
Expand All @@ -24,7 +22,7 @@ endif()

find_package(SWIG)
# It is possible to compile matlab/octave bindings without using SWIG
if(SWIG_FOUND OR IDYNTREE_USES_MATLAB OR IDYNTREE_USES_OCTAVE_MEX)
if(SWIG_FOUND OR IDYNTREE_USES_MATLAB OR IDYNTREE_USES_OCTAVE)
include(UseSWIG)

set_source_files_properties(iDynTree.i PROPERTIES CPLUSPLUS ON)
Expand Down Expand Up @@ -53,19 +51,13 @@ if(SWIG_FOUND OR IDYNTREE_USES_MATLAB OR IDYNTREE_USES_OCTAVE_MEX)
add_subdirectory(python)
endif(IDYNTREE_USES_PYTHON)

if(IDYNTREE_USES_MATLAB OR IDYNTREE_GENERATE_MATLAB OR IDYNTREE_USES_OCTAVE_MEX)
if(IDYNTREE_USES_MATLAB OR IDYNTREE_GENERATE_MATLAB OR IDYNTREE_USES_OCTAVE)
add_subdirectory(matlab)
endif()

if(IDYNTREE_USES_OCTAVE)
add_subdirectory(octave)
endif(IDYNTREE_USES_OCTAVE)

endif()

if(IDYNTREE_USES_PYTHON OR
IDYNTREE_USES_LUA OR
IDYNTREE_USES_OCTAVE OR
IDYNTREE_GENERATED_MATLAB)
if(NOT SWIG_FOUND)
MESSAGE(FATAL_ERROR "Swig not found, impossible to compile or generate iDynTree bindings.")
Expand Down
2 changes: 1 addition & 1 deletion bindings/matlab/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ if(IDYNTREE_USES_MATLAB)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
endif()

if(IDYNTREE_USES_OCTAVE_MEX)
if(IDYNTREE_USES_OCTAVE)
find_package(Octave REQUIRED)
if ("${OCTAVE_VERSION_STRING}" VERSION_LESS 4.0)
message(FATAL_ERROR "Octave mex-based bindings required at least Octave version 4.0 or greater.")
Expand Down
4 changes: 2 additions & 2 deletions bindings/matlab/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if (IDYNTREE_USES_MATLAB)
COMMAND ${Matlab_MAIN_PROGRAM} -nodisplay -nodesktop -nojvm -r "addpath('$<TARGET_FILE_DIR:${mexname}>');addpath('${CMAKE_CURRENT_SOURCE_DIR}/../');addpath('${CMAKE_CURRENT_SOURCE_DIR}/');addpath(genpath('${IDYNTREE_INTERNAL_MOXUNIT_PATH}'));success=moxunit_runtests('${CMAKE_CURRENT_SOURCE_DIR}','-verbose');exit(~success);")
endif()

if (IDYNTREE_USES_OCTAVE_MEX)
add_test(NAME octave_mex_idyntree_tests
if (IDYNTREE_USES_OCTAVE)
add_test(NAME octave_idyntree_tests
COMMAND ${OCTAVE_EXECUTABLE} --no-gui --quiet --eval "addpath('$<TARGET_FILE_DIR:idyntreeOctaveMex>');addpath('${CMAKE_CURRENT_SOURCE_DIR}/../');addpath('${CMAKE_CURRENT_SOURCE_DIR}/');addpath(genpath('${IDYNTREE_INTERNAL_MOXUNIT_PATH}'));success=moxunit_runtests('${CMAKE_CURRENT_SOURCE_DIR}','-verbose');exit(~success);")
endif()
33 changes: 0 additions & 33 deletions bindings/octave/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion bindings/octave/octave.i

This file was deleted.

196 changes: 0 additions & 196 deletions bindings/octave/octave_matvec.i

This file was deleted.

45 changes: 0 additions & 45 deletions bindings/octave/octave_spatialvec.i

This file was deleted.

15 changes: 0 additions & 15 deletions bindings/octave/tests/CMakeLists.txt

This file was deleted.

0 comments on commit 3e089e1

Please sign in to comment.