summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnur Nigmetov <a.nigmetov@gmail.com>2016-06-16 14:55:13 +0200
committerArnur Nigmetov <a.nigmetov@gmail.com>2016-06-16 14:55:13 +0200
commit4c496f8f2f8de667e6f2f8b321c6b49f6fd7907b (patch)
treed626a1e4a10edf5553a964e2115718b33cb8475b
parentecb2f03b630dcaf2a0174c7d4e448cdc01c988d8 (diff)
Add missing CMakeLists and licence.txt, edit .gitignore
-rw-r--r--geom_bottleneck/.gitignore1
-rw-r--r--geom_bottleneck/CMakeLists.txt5
-rw-r--r--geom_bottleneck/bottleneck/CMakeLists.txt30
-rw-r--r--geom_bottleneck/example/CMakeLists.txt27
-rw-r--r--geom_matching/.gitignore1
-rw-r--r--geom_matching/wasserstein/CMakeLists.txt38
-rw-r--r--geom_matching/wasserstein/license.txt22
7 files changed, 122 insertions, 2 deletions
diff --git a/geom_bottleneck/.gitignore b/geom_bottleneck/.gitignore
index f8d5a1e..3d0a40b 100644
--- a/geom_bottleneck/.gitignore
+++ b/geom_bottleneck/.gitignore
@@ -21,7 +21,6 @@
*.*~*
*.swp
*.nfs*
-*.txt
*.pdf
*.o
*.d
diff --git a/geom_bottleneck/CMakeLists.txt b/geom_bottleneck/CMakeLists.txt
new file mode 100644
index 0000000..6ec3fc2
--- /dev/null
+++ b/geom_bottleneck/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 2.8.9)
+project(geom_bottleneck)
+#add_subdirectory(ann)
+add_subdirectory(bottleneck)
+add_subdirectory(example)
diff --git a/geom_bottleneck/bottleneck/CMakeLists.txt b/geom_bottleneck/bottleneck/CMakeLists.txt
new file mode 100644
index 0000000..7f5cc6e
--- /dev/null
+++ b/geom_bottleneck/bottleneck/CMakeLists.txt
@@ -0,0 +1,30 @@
+project(geom_bottleneck)
+cmake_minimum_required(VERSION 2.8.9)
+include (GenerateExportHeader)
+
+# Default to Release
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
+endif(NOT CMAKE_BUILD_TYPE)
+
+# Add path to ANN header files
+include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include"
+ "${CMAKE_CURRENT_SOURCE_DIR}/include/ANN")
+
+set(CXX_FLAGS ${CMAKE_CXX_FLAGS_RELEASE})
+
+if(NOT WIN32)
+ set(CMAKE_CXX_FLAGS "-O3 -DNDEBUG -DBOOST_DISABLE_ASSERTS")
+ add_definitions(-std=c++11)
+endif(NOT WIN32)
+
+file(GLOB ANN_SRC_FILES src/ann/*.cpp)
+
+add_library(bottleneck src/bottleneck.cpp src/bound_match.cpp src/neighb_oracle.cpp src/basic_defs.cpp ${ANN_SRC_FILES})
+if (WIN32)
+ GENERATE_EXPORT_HEADER(bottleneck
+ BASE_NAME bottleneck
+ EXPORT_MACRO_NAME bottleneck_EXPORT
+ EXPORT_FILE_NAME bottleneck_export.h
+ STATIC_DEFINE bottleneck_BUILT_AS_STATIC)
+endif(WIN32)
diff --git a/geom_bottleneck/example/CMakeLists.txt b/geom_bottleneck/example/CMakeLists.txt
new file mode 100644
index 0000000..3ae8536
--- /dev/null
+++ b/geom_bottleneck/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 2.8.9)
+
+# Default to Release
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
+endif(NOT CMAKE_BUILD_TYPE)
+
+# Add path to ANN header files
+include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../bottleneck/include")
+
+set(CXX_FLAGS ${CMAKE_CXX_FLAGS_RELEASE})
+
+if(NOT WIN32)
+ set(CMAKE_CXX_FLAGS "-O3 -DNDEBUG -DBOOST_DISABLE_ASSERTS")
+ add_definitions(-std=c++11)
+endif(NOT WIN32)
+
+
+if(UNIX)
+ # specify full path to ANN
+ set_property(TARGET bottleneck PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../bottleneck/build/libbottleneck.a")
+endif(UNIX)
+
+add_executable (bottleneck_dist bottleneck_dist.cpp)
+
+target_link_libraries(bottleneck_dist PUBLIC bottleneck)
+
diff --git a/geom_matching/.gitignore b/geom_matching/.gitignore
index 2a1ef92..d9458fb 100644
--- a/geom_matching/.gitignore
+++ b/geom_matching/.gitignore
@@ -21,7 +21,6 @@ wasserstein/build/
*.*~*
*.swp
*.nfs*
-*.txt
*.pdf
*.o
*.d
diff --git a/geom_matching/wasserstein/CMakeLists.txt b/geom_matching/wasserstein/CMakeLists.txt
new file mode 100644
index 0000000..b823ca5
--- /dev/null
+++ b/geom_matching/wasserstein/CMakeLists.txt
@@ -0,0 +1,38 @@
+project (wasserstein)
+cmake_minimum_required (VERSION 2.8.9)
+include (GenerateExportHeader)
+
+# Default to Release
+
+if (NOT CMAKE_BUILD_TYPE)
+ set (CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
+endif (NOT CMAKE_BUILD_TYPE)
+
+# Boost
+find_package (Boost)
+include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include
+ SYSTEM ${Boost_INCLUDE_DIR})
+
+if(NOT WIN32)
+ add_definitions(-std=c++11)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 ")
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} -O3 -g")
+endif(NOT WIN32)
+
+file(GLOB WS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
+
+add_library(wasserstein ${WS_SOURCES})
+
+if (WIN32)
+ GENERATE_EXPORT_HEADER(wasserstein
+ BASE_NAME wasserstein
+ EXPORT_MACRO_NAME wasserstein_EXPORT
+ EXPORT_FILE_NAME wasserstein_export.h
+ STATIC_DEFINE wasserstein_BUILT_AS_STATIC)
+endif(WIN32)
+
+add_executable(wasserstein_dist ${CMAKE_CURRENT_SOURCE_DIR}/example/wasserstein_dist.cpp)
+target_link_libraries(wasserstein_dist PUBLIC wasserstein)
diff --git a/geom_matching/wasserstein/license.txt b/geom_matching/wasserstein/license.txt
new file mode 100644
index 0000000..8f7e4f5
--- /dev/null
+++ b/geom_matching/wasserstein/license.txt
@@ -0,0 +1,22 @@
+Copyright (c) 2015, M. Kerber, D. Morozov, A. Nigmetov
+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.
+
+You are under no obligation whatsoever to provide any bug fixes, patches, or
+upgrades to the features, functionality or performance of the source code
+(Enhancements) to anyone; however, if you choose to make your Enhancements
+available either publicly, or directly to copyright holder,
+without imposing a separate written license agreement for such Enhancements,
+then you hereby grant the following license: a non-exclusive, royalty-free
+perpetual license to install, use, modify, prepare derivative works, incorporate
+into other computer software, distribute, and sublicense such enhancements or
+derivative works thereof, in binary and source code form.