Permalink
Browse files

cmake support, keeping makefile as makefile.plain

  • Loading branch information...
aaalgo committed Jun 22, 2016
1 parent 06e7c18 commit 73c2fce197fc163d92c81903d03c16d60138cf2e
Showing with 27 additions and 0 deletions.
  1. +27 −0 CMakeLists.txt
  2. 0 Makefile → Makefile.plain
@@ -0,0 +1,27 @@
cmake_minimum_required (VERSION 2.6)
project (KGRAPH)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -msse2 -O3")
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
set(LIB_SRC kgraph.cpp metric.cpp)
include_directories(${KGRAPH_SOURCE_DIR})
add_library(kgraph SHARED ${LIB_SRC})
add_library(kgrapha STATIC ${LIB_SRC})
set_target_properties(kgrapha PROPERTIES OUTPUT_NAME kgraph)
add_executable(index index.cpp)
add_executable(search search.cpp)
set(TOOLS index search)
foreach(TOOL ${TOOLS})
target_link_libraries(${TOOL} kgrapha boost_timer boost_chrono boost_system boost_program_options)
endforeach(TOOL)
install (FILES kgraph.h kgraph-data.h DESTINATION include)
install (TARGETS kgraph kgrapha
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
File renamed without changes.

0 comments on commit 73c2fce

Please sign in to comment.