Skip to content

Commit

Permalink
Add missing -lpthreads and -Wall
Browse files Browse the repository at this point in the history
  • Loading branch information
nixprime committed Jun 4, 2015
1 parent dc6eb65 commit 672c6f7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ cmake_minimum_required(VERSION 2.8.3)
project(cpsm)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_SOURCE_DIR}/src)
list(APPEND CMAKE_CXX_FLAGS "-std=c++11")
if(CMAKE_COMPILER_IS_GNUCC)
list(APPEND CMAKE_CXX_FLAGS "-std=c++11 -Wall")
endif()
set(CMAKE_BUILD_TYPE Release)

set(Boost_USE_MULTITHREADED ON)
Expand All @@ -25,11 +27,14 @@ endif()
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})

find_package(Threads REQUIRED)

add_library(cpsm_core src/matcher.cc src/path_util.cc src/str_util.cc)
target_link_libraries(cpsm_core ${Boost_LIBRARIES})
if(ICU_FOUND)
target_link_libraries(cpsm_core ${ICU_LIBRARIES})
endif()
target_link_libraries(cpsm_core ${CMAKE_THREAD_LIBS_INIT})
set_target_properties(cpsm_core PROPERTIES COMPILE_FLAGS "-fPIC")

add_library(cpsm_py SHARED src/ctrlp_util.cc src/python_extension_main.cc)
Expand Down

0 comments on commit 672c6f7

Please sign in to comment.