Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use wrap to perform Matlab wrapping #711

Merged
merged 20 commits into from
Mar 14, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
6f81bde
offload matlab wrapping to the wrap project
varunagrawal Mar 9, 2021
f03b12e
Make matlab wrapping rely completely on the wrap project
varunagrawal Mar 9, 2021
827f3fe
update Matlab CMakeLists.txt to use the wrapper
varunagrawal Mar 10, 2021
9afce21
delete example project since it is now its own git template
varunagrawal Mar 10, 2021
ad9e853
Merging 'master' into 'wrap'
varunagrawal Mar 10, 2021
f52b096
Squashed 'wrap/' changes from b28b3570d..b0eb968f2
varunagrawal Mar 10, 2021
faf0043
Fix Matlab tests and add saveGraph method to GaussianBayesNet
varunagrawal Mar 10, 2021
99f351d
Merge branch 'develop' into feature/matlab-wrap
varunagrawal Mar 10, 2021
b890f06
clean up the CMake
varunagrawal Mar 13, 2021
f81746d
Merging 'master' into 'wrap'
varunagrawal Mar 13, 2021
55dade0
Squashed 'wrap/' changes from b0eb968f2..d19cda546
varunagrawal Mar 13, 2021
51be66f
templated return types are now supported
varunagrawal Mar 13, 2021
6016a2d
Move wrapper documentation to the wrap project
varunagrawal Mar 13, 2021
1618218
fix holder_type typo
varunagrawal Mar 13, 2021
4af355b
make ignore list consistent across Python and Matlab
varunagrawal Mar 13, 2021
ec48b14
Squashed 'wrap/' changes from d19cda546..91f3835a8
varunagrawal Mar 13, 2021
dbbcbfb
Merging 'master' into 'wrap'
varunagrawal Mar 13, 2021
a30574f
Squashed 'wrap/' changes from 91f3835a8..aae9b4605
varunagrawal Mar 13, 2021
7e5a8b2
Merging 'master' into 'wrap'
varunagrawal Mar 13, 2021
1f60a7e
undo ignore updates, all tests now pass
varunagrawal Mar 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ install(FILES
dllexport.h.in
GtsamBuildTypes.cmake
GtsamMakeConfigFile.cmake
GtsamMatlabWrap.cmake
GtsamTesting.cmake
GtsamPrinting.cmake
FindNumPy.cmake
README.html
DESTINATION "${SCRIPT_INSTALL_DIR}/GTSAMCMakeTools")


448 changes: 0 additions & 448 deletions cmake/GtsamMatlabWrap.cmake

This file was deleted.

26 changes: 0 additions & 26 deletions cmake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,32 +67,6 @@ Defines two useful functions for creating CTest unit tests. Also immediately cr
an empty string "" if nothing needs to be excluded.
linkLibraries: The list of libraries to link to.

## GtsamMatlabWrap

include(GtsamMatlabWrap)

Defines functions for generating MATLAB wrappers. Also immediately creates several CMake options for configuring the wrapper.

* `wrap_and_install_library(interfaceHeader linkLibraries extraIncludeDirs extraMexFlags)` Generates wrap code and compiles the wrapper.

Usage example:

`wrap_and_install_library("lba.h" "" "" "")`

Arguments:

interfaceHeader: The relative or absolute path to the wrapper interface
definition file.
linkLibraries: Any *additional* libraries to link. Your project library
(e.g. `lba`), libraries it depends on, and any necessary
MATLAB libraries will be linked automatically. So normally,
leave this empty.
extraIncludeDirs: Any *additional* include paths required by dependent
libraries that have not already been added by
include_directories. Again, normally, leave this empty.
extraMexFlags: Any *additional* flags to pass to the compiler when building
the wrap code. Normally, leave this empty.

## GtsamMakeConfigFile

include(GtsamMakeConfigFile)
Expand Down
49 changes: 0 additions & 49 deletions cmake/example_project/CMakeLists.txt

This file was deleted.

32 changes: 0 additions & 32 deletions cmake/example_project/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions cmake/example_project/SayGoodbye.cpp

This file was deleted.

23 changes: 0 additions & 23 deletions cmake/example_project/SayHello.cpp

This file was deleted.

31 changes: 0 additions & 31 deletions cmake/example_project/example.h

This file was deleted.

44 changes: 0 additions & 44 deletions cmake/example_project/example/PrintExamples.cpp

This file was deleted.

42 changes: 0 additions & 42 deletions cmake/example_project/example/PrintExamples.h

This file was deleted.

43 changes: 0 additions & 43 deletions cmake/example_project/tests/testExample.cpp

This file was deleted.

15 changes: 0 additions & 15 deletions gtsam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,3 @@ else()
set_source_files_properties(${3rdparty_srcs} PROPERTIES COMPILE_FLAGS "-Wno-error")
endif()
endif()

# Create the matlab toolbox for the gtsam library
if (GTSAM_INSTALL_MATLAB_TOOLBOX)
# Set up codegen
include(GtsamMatlabWrap)

# Generate, build and install toolbox
set(mexFlags "${GTSAM_BUILD_MEX_BINARY_FLAGS}")
if(NOT BUILD_SHARED_LIBS)
list(APPEND mexFlags -DGTSAM_IMPORT_STATIC)
endif()

# Wrap
wrap_and_install_library(gtsam.i "${GTSAM_ADDITIONAL_LIBRARIES}" "" "${mexFlags}")
endif ()
16 changes: 0 additions & 16 deletions gtsam_unstable/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,6 @@ install(
list(APPEND GTSAM_EXPORTED_TARGETS gtsam_unstable)
set(GTSAM_EXPORTED_TARGETS "${GTSAM_EXPORTED_TARGETS}" PARENT_SCOPE)

# Wrap version for gtsam_unstable
if (GTSAM_UNSTABLE_INSTALL_MATLAB_TOOLBOX)
# Set up codegen
include(GtsamMatlabWrap)

# Generate, build and install toolbox
set(mexFlags "${GTSAM_BUILD_MEX_BINARY_FLAGS}")
if(NOT BUILD_SHARED_LIBS)
list(APPEND mexFlags -DGTSAM_IMPORT_STATIC)
endif()

# Wrap
wrap_and_install_library(gtsam_unstable.i "gtsam" "" "${mexFlags}")
endif(GTSAM_UNSTABLE_INSTALL_MATLAB_TOOLBOX)


# Build examples
add_subdirectory(examples)

Expand Down
Loading