From 4c496f8f2f8de667e6f2f8b321c6b49f6fd7907b Mon Sep 17 00:00:00 2001 From: Arnur Nigmetov Date: Thu, 16 Jun 2016 14:55:13 +0200 Subject: Add missing CMakeLists and licence.txt, edit .gitignore --- geom_bottleneck/.gitignore | 1 - geom_bottleneck/CMakeLists.txt | 5 +++++ geom_bottleneck/bottleneck/CMakeLists.txt | 30 ++++++++++++++++++++++++++++++ geom_bottleneck/example/CMakeLists.txt | 27 +++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 geom_bottleneck/CMakeLists.txt create mode 100644 geom_bottleneck/bottleneck/CMakeLists.txt create mode 100644 geom_bottleneck/example/CMakeLists.txt (limited to 'geom_bottleneck') 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) + -- cgit v1.2.3