diff options
author | Lane Schwartz <dowobeha@gmail.com> | 2013-09-06 21:39:46 +0400 |
---|---|---|
committer | Lane Schwartz <dowobeha@gmail.com> | 2013-09-06 21:39:46 +0400 |
commit | 226031ecf6ea542984fb5e84c5773d11b5366418 (patch) | |
tree | 67b19bd85c135aa86db9036a09c6bd4f04b17a9e | |
parent | addc8be211da1c94a1829197484cd90c3c730564 (diff) |
Checking in examples of CMake files.
The example in contrib works, as does the one in biconcor.
The examples in lm and moses don't work at the moment,
but checking them in anyway as a starting point
for any potential work on them next week during the
MT Marathon.
-rw-r--r-- | biconcor/CMakeLists.txt | 5 | ||||
-rw-r--r-- | contrib/other-builds/cmake/boost.example/CMakeLists.txt | 7 | ||||
-rw-r--r-- | contrib/other-builds/cmake/boost.example/main.cpp | 24 | ||||
-rw-r--r-- | lm/CMakeLists.txt | 46 | ||||
-rw-r--r-- | moses/CMakeLists.txt | 13 |
5 files changed, 95 insertions, 0 deletions
diff --git a/biconcor/CMakeLists.txt b/biconcor/CMakeLists.txt new file mode 100644 index 000000000..475ed7501 --- /dev/null +++ b/biconcor/CMakeLists.txt @@ -0,0 +1,5 @@ +project(biconcor) + +FILE(GLOB biconcor_source *.cpp) + +add_executable(biconcor ${biconcor_source}) diff --git a/contrib/other-builds/cmake/boost.example/CMakeLists.txt b/contrib/other-builds/cmake/boost.example/CMakeLists.txt new file mode 100644 index 000000000..abc8b37e2 --- /dev/null +++ b/contrib/other-builds/cmake/boost.example/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8) + +find_package(Boost 1.36.0 REQUIRED COMPONENTS locale) + +include_directories(${Boost_INCLUDE_DIRS}) +add_executable(demo main.cpp) +target_link_libraries(demo ${Boost_LIBRARIES}) diff --git a/contrib/other-builds/cmake/boost.example/main.cpp b/contrib/other-builds/cmake/boost.example/main.cpp new file mode 100644 index 000000000..7b95fb2a9 --- /dev/null +++ b/contrib/other-builds/cmake/boost.example/main.cpp @@ -0,0 +1,24 @@ + +#include <iostream> +#include <boost/locale.hpp> +#include <ctime> + +using namespace std; + +int main(int argc, char* argv[]) +{ + + using namespace boost::locale; + using namespace std; + + generator gen; + locale loc=gen(""); + + cout.imbue(loc); + + cout << "Hello, World" << endl; + + cout << "This is how we show currency in this locale " << as::currency << 103.34 << endl; + + return 0; +} diff --git a/lm/CMakeLists.txt b/lm/CMakeLists.txt new file mode 100644 index 000000000..62de6f0b5 --- /dev/null +++ b/lm/CMakeLists.txt @@ -0,0 +1,46 @@ + +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/bhiksha.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/bhiksha.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/binary_format.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/binary_format.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/blank.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/config.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/config.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/enumerate_vocab.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/facade.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/left.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/lm_exception.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/lm_exception.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/max_order.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/model.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/model.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/model_type.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/ngram_query.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/partial.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/quantize.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/quantize.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/read_arpa.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/read_arpa.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/return.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/search_hashed.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/search_hashed.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/search_trie.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/search_trie.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/sizes.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/sizes.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/state.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/trie.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/trie.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/trie_sort.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/trie_sort.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/value.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/value_build.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/value_build.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/virtual_interface.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/virtual_interface.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/vocab.cc") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/vocab.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/weights.hh") +list(APPEND SOURCE_KENLM "${CMAKE_CURRENT_SOURCE_DIR}/word_index.hh") + +add_library(kenlm OBJECT ${SOURCE_KENLM})
\ No newline at end of file diff --git a/moses/CMakeLists.txt b/moses/CMakeLists.txt new file mode 100644 index 000000000..d666a6906 --- /dev/null +++ b/moses/CMakeLists.txt @@ -0,0 +1,13 @@ +project(moses) + +FILE(GLOB source_moses *.cpp) +FILE(GLOB source_moses_ff FF/*.cpp) +FILE(GLOB source_moses_ff_lexicalReordering FF/LexicalReordering/*.cpp) +FILE(GLOB source_moses_ff_osm FF/OSM-Feature/*.cpp) +FILE(GLOB source_moses_lm LM/*.cpp) +FILE(GLOB source_moses_tm TranslationModel/*.cpp) +FILE(GLOB source_moses_tm_compactPT TranslationModel/CompactPT/*.cpp) +FILE(GLOB source_moses_tm_cky TranslationModel/CKYPlusParser/*.cpp) + + +add_library(biconcor ${biconcor_source}) |