cmake. Compiles -j without errors

This commit is contained in:
Hieu Hoang 2016-09-14 19:56:08 +02:00
parent e7ea44c689
commit 41bab63f70

View File

@ -6,33 +6,39 @@ add_library(libcommon OBJECT
exception.cpp
)
cuda_add_library(common_cuda
expressions.cu
test.cu
tensor.cu
tensor_operators.cu
)
target_link_libraries(common_cuda)
cuda_add_executable(
marian
expressions.cu
test.cu
tensor.cu
tensor_operators.cu
$<TARGET_OBJECTS:libcommon>
)
target_link_libraries(marian common_cuda)
cuda_add_executable(
train_mnist
expressions.cu
train_mnist.cu
tensor.cu
tensor_operators.cu
$<TARGET_OBJECTS:libcommon>
)
target_link_libraries(train_mnist common_cuda)
cuda_add_executable(
validate_mnist
expressions.cu
validate_mnist.cu
tensor.cu
tensor_operators.cu
$<TARGET_OBJECTS:libcommon>
)
target_link_libraries(validate_mnist common_cuda)
foreach(exec marian train_mnist validate_mnist)
target_link_libraries(${exec} ${EXT_LIBS} cuda cudnn)
cuda_add_cublas_to_target(${exec})