Skip to content

Commit

Permalink
bugfix in compilation (boost)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmmaat committed Oct 18, 2017
1 parent 2e01614 commit 879c77d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion wordseg/algos/ag/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Building script for the ag program (Pitman-Yor Context Free Grammar,
# a.k.a Adaptor Grammar)

# to avoid a warning (cmake complains for a mix of relative an
# dabsolute paths for linked libraries)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

# looking for -pthread
find_package(Threads)

# looking for boost libraries
find_package(Boost REQUIRED COMPONENTS program_options)

# compiling a C++11 program
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall")

Expand Down Expand Up @@ -34,7 +43,7 @@ message(STATUS "Option AG_PARALLEL is ${AG_PARALLEL}")
file(GLOB SOURCES src/*.cc include/*)

# ag binary linked on dependencies
include_directories(include)
include_directories(include ${Boost_INCLUDE_DIRS})
add_executable(ag ${SOURCES})
target_link_libraries(ag ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES})
if(AG_PARALLEL)
Expand Down
2 changes: 1 addition & 1 deletion wordseg/algos/dpseg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ set(CMAKE_CXX_FLAGS "-std=c++11 -DNDEBUG")
file(GLOB SOURCES src/*.cc include/*)

add_executable(dpseg ${SOURCES})
include_directories(include)
include_directories(include ${Boost_INCLUDE_DIRS})
target_link_libraries(dpseg ${Boost_LIBRARIES})

0 comments on commit 879c77d

Please sign in to comment.