diff options
author | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2017-03-22 04:51:41 +0300 |
---|---|---|
committer | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2017-03-22 04:56:19 +0300 |
commit | c5b47ac09e008bfa860f897541e95f527d99b269 (patch) | |
tree | 067689ed60762d781eecd8640f017384a2c3530b | |
parent | 86e323305dfb99216b3df533cee84bbef02d6c37 (diff) |
Automatically build Marian Library when building Amunmt.
-rw-r--r-- | CMakeLists.txt | 8 | ||||
m--------- | marian | 11 | ||||
-rw-r--r-- | src/3rd_party/yaml-cpp/CMakeLists.txt | 65 |
3 files changed, 46 insertions, 38 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4cb6e81a..a967d89f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,9 @@ endif(BUILD_STATIC) include_directories(${amunmt_SOURCE_DIR}) option(CUDA "Select to compile CUDA support by default if available" ON) - +option(MARIAN "Select to compile with Marian library" ON) +option(MARIAN_LIBRARY_ONLY "Automatically set when building amunmt. Don't touch this." ON) + if(CUDA) find_package(CUDA) if(CUDA_FOUND) @@ -36,6 +38,10 @@ else(CUDA) add_definitions(-DNO_CUDA) endif(CUDA) +if (MARIAN) + add_subdirectory(marian) +endif(MARIAN) + find_package(Boost COMPONENTS system filesystem program_options timer iostreams python thread) if(Boost_FOUND) include_directories(${Boost_INCLUDE_DIRS}) diff --git a/marian b/marian -Subproject 9fc7df1576bc869a6dc6a5e795e71bbec77cb29 +Subproject f44d1a1b0d3d68ab28ed8023ac9ed73122e8477 diff --git a/src/3rd_party/yaml-cpp/CMakeLists.txt b/src/3rd_party/yaml-cpp/CMakeLists.txt index 66499871..f2d6acec 100644 --- a/src/3rd_party/yaml-cpp/CMakeLists.txt +++ b/src/3rd_party/yaml-cpp/CMakeLists.txt @@ -1,34 +1,35 @@ include_directories(..) include_directories(.) - -add_library(libyaml-cpp OBJECT - regex_yaml.cpp - nodebuilder.cpp - scanscalar.cpp - scanner.cpp - parser.cpp - stream.cpp - convert.cpp - directives.cpp - singledocparser.cpp - memory.cpp - node.cpp - exp.cpp - emitter.cpp - emit.cpp - null.cpp - binary.cpp - emitfromevents.cpp - scantoken.cpp - emitterstate.cpp - scantag.cpp - simplekey.cpp - nodeevents.cpp - tag.cpp - contrib/graphbuilderadapter.cpp - contrib/graphbuilder.cpp - node_data.cpp - emitterutils.cpp - parse.cpp - ostream_wrapper.cpp -)
\ No newline at end of file +if (NOT TARGET libyaml-cpp) + add_library(libyaml-cpp OBJECT + regex_yaml.cpp + nodebuilder.cpp + scanscalar.cpp + scanner.cpp + parser.cpp + stream.cpp + convert.cpp + directives.cpp + singledocparser.cpp + memory.cpp + node.cpp + exp.cpp + emitter.cpp + emit.cpp + null.cpp + binary.cpp + emitfromevents.cpp + scantoken.cpp + emitterstate.cpp + scantag.cpp + simplekey.cpp + nodeevents.cpp + tag.cpp + contrib/graphbuilderadapter.cpp + contrib/graphbuilder.cpp + node_data.cpp + emitterutils.cpp + parse.cpp + ostream_wrapper.cpp + ) +endif() |