-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
624 additions
and
154 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,7 @@ | |
**.cache | ||
**build | ||
**bin | ||
**.egg-info | ||
**.egg-info | ||
**lib | ||
**.so | ||
**.a |
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,3 @@ | ||
[submodule "deps/pybind11"] | ||
path = deps/pybind11 | ||
url = https://github.com/pybind/pybind11.git |
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,31 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
project(bc_exploration) | ||
|
||
set(CMAKE_BUILD_TYPE RELEASE) | ||
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bc_exploration) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -O3 -Wall -fpic") | ||
|
||
# find current version of python 2.7 | ||
execute_process( | ||
COMMAND "python2.7" -c "from distutils import sysconfig; print(sysconfig.get_python_inc())" | ||
OUTPUT_VARIABLE PYTHON_INCLUDE_DIRS | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
|
||
include_directories( | ||
${PYTHON_INCLUDE_DIRS} | ||
"${PROJECT_SOURCE_DIR}/bc_exploration/cpp/inc/" | ||
"${PROJECT_SOURCE_DIR}/deps/pybind11/include" | ||
) | ||
|
||
set(SOURCE_FILES | ||
bc_exploration/cpp/src/exploration/astar.cpp | ||
bc_exploration/cpp/src/exploration/collision.cpp | ||
bc_exploration/cpp/src/exploration/util.cpp | ||
) | ||
|
||
#add_library(${PROJECT_NAME} STATIC ${SOURCE_FILES}) | ||
|
||
add_library(exploration_module SHARED ${PROJECT_SOURCE_DIR} ${SOURCE_FILES} bc_exploration/cpp/src/exploration/python.cpp) | ||
target_link_libraries(exploration_module ${PYTHON_LIBRARIES}) | ||
set_target_properties(exploration_module PROPERTIES SUFFIX ".so" PREFIX "_") |
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,10 +1,31 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
project(astar_cpp) | ||
project(bc_exploration) | ||
|
||
set(CMAKE_BUILD_TYPE RELEASE) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -Wall -shared -fpic") | ||
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin) | ||
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -O3 -Wall -fpic") | ||
|
||
# find current version of python 2.7 | ||
execute_process( | ||
COMMAND "python2.7" -c "from distutils import sysconfig; print(sysconfig.get_python_inc())" | ||
OUTPUT_VARIABLE PYTHON_INCLUDE_DIRS | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
|
||
include_directories( | ||
${PYTHON_INCLUDE_DIRS} | ||
"${PROJECT_SOURCE_DIR}/inc/" | ||
"${PROJECT_SOURCE_DIR}../../deps/pybind11/include" | ||
) | ||
|
||
set(SOURCE_FILES | ||
src/exploration/astar.cpp | ||
src/exploration/collision.cpp | ||
src/exploration/util.cpp | ||
) | ||
|
||
file(GLOB all_files "inc/exploration/*.h" "src/exploration/*.cpp") | ||
#add_library(${PROJECT_NAME} STATIC ${SOURCE_FILES}) | ||
|
||
add_library(exploration SHARED ${all_files}) | ||
set_target_properties(exploration PROPERTIES SUFFIX ".so" PREFIX "") | ||
add_library(exploration_module SHARED ${PROJECT_SOURCE_DIR} ${SOURCE_FILES} src/exploration/python.cpp) | ||
target_link_libraries(exploration_module ${PYTHON_LIBRARIES}) | ||
set_target_properties(exploration_module PROPERTIES SUFFIX ".so" PREFIX "_") |
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
Oops, something went wrong.