-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #654 from borglab/feature/wrap-update
Updates to use the new version of wrap
- Loading branch information
Showing
24 changed files
with
551 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
recursive-include gtsam/Data * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
__pycache__/ | ||
.vscode/ | ||
*build* | ||
*dist* | ||
*.egg-info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
cmake_minimum_required(VERSION 3.9) | ||
|
||
# Set the project name and version | ||
project(GTwrap VERSION 1.0) | ||
|
||
# ############################################################################## | ||
# General configuration | ||
|
||
set(WRAP_PYTHON_VERSION | ||
"Default" | ||
CACHE STRING "The Python version to use for wrapping") | ||
|
||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/GtwrapUtils.cmake) | ||
gtwrap_get_python_version(${WRAP_PYTHON_VERSION}) | ||
|
||
# ############################################################################## | ||
# Install the CMake file to be used by other projects | ||
if(WIN32 AND NOT CYGWIN) | ||
set(SCRIPT_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/CMake") | ||
else() | ||
set(SCRIPT_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib/cmake") | ||
endif() | ||
|
||
# Install scripts to the standard CMake script directory. | ||
install(FILES cmake/gtwrapConfig.cmake cmake/PybindWrap.cmake | ||
cmake/GtwrapUtils.cmake | ||
DESTINATION "${SCRIPT_INSTALL_DIR}/gtwrap") | ||
|
||
# Install wrapping scripts as binaries to `CMAKE_INSTALL_PREFIX/bin` so they can | ||
# be invoked for wrapping. | ||
install(PROGRAMS scripts/pybind_wrap.py scripts/matlab_wrap.py TYPE BIN) | ||
|
||
# Install pybind11 directory to `CMAKE_INSTALL_PREFIX/lib/pybind11` This will | ||
# allow the gtwrapConfig.cmake file to load it later. | ||
install(DIRECTORY pybind11 TYPE LIB) | ||
|
||
# ############################################################################## | ||
# Install the Python package | ||
find_package( | ||
Python ${WRAP_PYTHON_VERSION} | ||
COMPONENTS Interpreter | ||
REQUIRED) | ||
|
||
# Detect virtualenv and set Pip args accordingly | ||
# https://www.scivision.dev/cmake-install-python-package/ | ||
if(DEFINED ENV{VIRTUAL_ENV} OR DEFINED ENV{CONDA_PREFIX}) | ||
set(_pip_args) | ||
else() | ||
set(_pip_args "--user") | ||
endif() | ||
#TODO add correct flags for virtualenv | ||
|
||
# Finally install the gtwrap python package. | ||
execute_process(COMMAND ${Python_EXECUTABLE} -m pip install . ${_pip_args} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright (c) 2010, Georgia Tech Research Corporation | ||
Atlanta, Georgia 30332-0415 | ||
All Rights Reserved | ||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Oops, something went wrong.