1 PROJECT(cnn:relation)
2 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
3
4 ADD_EXECUTABLE(RelationExtraction RelationExtraction.cpp Document.cpp Parameter.cpp RelLstmModel.cpp Table.cpp cnn/deptreelstm.cc cnn/zlstm.cc)
5 target_link_libraries(RelationExtraction cnn yaml-cpp icuuc boost_filesystem boost_system ${Boost_LIBRARIES})
1: 表示项目的名称是cnn:relation
2: 运行此配置文件所需的 CMake 的最低版本为2.8
4: 将RelationExtraction, RelationExtraction.cpp, Document.cpp, Parameter.cpp, RelLstmModel.cpp, Table.cpp, cnn/deptreelstm.cc, cnn/zlstm.cc这些源文件编译为一个名称为RelationExtraction的可执行文件。
5: target_ling_libraries命令指明可执行文件RelationExtraction需要连接名为cnn, yaml-cpp, icuuc, boost_filesystem, boost_system, ${Boost_LIBRARIES}的链接库。