Fix CMake for CPU-only build

This commit is contained in:
Tomasz Dwojak 2017-02-06 18:50:16 +00:00
parent 90072e67b2
commit 660e4041cd

View File

@ -80,6 +80,7 @@ cuda_add_library(amunmt SHARED
$<TARGET_OBJECTS:cpumode>
$<TARGET_OBJECTS:libyaml-cpp>
)
set_target_properties("amunmt" PROPERTIES EXCLUDE_FROM_ALL 1)
endif(PYTHONLIBS_FOUND)
cuda_add_library(mosesplugin STATIC
@ -100,6 +101,7 @@ cuda_add_library(mosesplugin STATIC
$<TARGET_OBJECTS:cpumode>
$<TARGET_OBJECTS:libyaml-cpp>
)
set_target_properties("mosesplugin" PROPERTIES EXCLUDE_FROM_ALL 1)
else(CUDA_FOUND)
@ -122,6 +124,7 @@ add_library(amunmt SHARED
$<TARGET_OBJECTS:libcommon>
$<TARGET_OBJECTS:libyaml-cpp>
)
set_target_properties("amunmt" PROPERTIES EXCLUDE_FROM_ALL 1)
endif(PYTHONLIBS_FOUND)
endif(CUDA_FOUND)
@ -141,6 +144,4 @@ foreach(exec ${EXES})
set_target_properties(${exec} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
endforeach(exec)
set_target_properties("amunmt" "mosesplugin" PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_ALL 1)
add_subdirectory(3rd_party)