提交 8a2cf0fb 编写于 作者: Y Yi Wang

Move majel/test/* to majel/; Update generic.cmake

上级 fb434083
......@@ -94,6 +94,7 @@ endfunction(cc_binary)
# DEPS
# tensor)
function(cc_test TARGET_NAME)
if(WITH_TESTING)
set(options "")
set(oneValueArgs "")
set(multiValueArgs SRCS DEPS)
......@@ -106,6 +107,7 @@ function(cc_test TARGET_NAME)
link_glog_gflags(${TARGET_NAME})
link_gtest(${TARGET_NAME})
add_test(${TARGET_NAME} ${TARGET_NAME})
endif()
endfunction(cc_test)
# Suppose that ops.cu includes global functions that take Tensor as
......@@ -117,6 +119,7 @@ endfunction(cc_test)
# DEPS
# tensor)
function(nv_library TARGET_NAME)
if (WITH_GPU)
set(options OPTIONAL)
set(oneValueArgs "")
set(multiValueArgs SRCS DEPS)
......@@ -129,9 +132,11 @@ function(nv_library TARGET_NAME)
if (nv_library_DEPS)
add_dependencies(${TARGET_NAME} ${nv_library_DEPS})
endif()
endif()
endfunction(nv_library)
function(nv_binary TARGET_NAME)
if (WITH_GPU)
set(options "")
set(oneValueArgs "")
set(multiValueArgs SRCS DEPS)
......@@ -142,6 +147,7 @@ function(nv_binary TARGET_NAME)
add_dependencies(${TARGET_NAME} ${nv_binary_DEPS})
endif()
link_glog_gflags(${TARGET_NAME})
endif()
endfunction(nv_binary)
# The dependency to target tensor implies that if any of
......@@ -152,6 +158,7 @@ endfunction(nv_binary)
# DEPS
# ops)
function(nv_test TARGET_NAME)
if (WITH_GPU AND WITH_TESTING)
set(options "")
set(oneValueArgs "")
set(multiValueArgs SRCS DEPS)
......@@ -164,6 +171,7 @@ function(nv_test TARGET_NAME)
link_glog_gflags(${TARGET_NAME})
link_gtest(${TARGET_NAME})
add_test(${TARGET_NAME} ${TARGET_NAME})
endif()
endfunction(nv_test)
set(GOPATH "${CMAKE_CURRENT_BINARY_DIR}/go")
......
cc_library(place SRCS place.cc)
cc_test(place_test SRCS place_test.cc DEPS place)
cc_library(ddim SRCS ddim.cc)
cc_test(ddim_test SRCS ddim_test.cc DEPS ddim)
if(WITH_TESTING)
add_subdirectory(test)
endif()
nv_test(cuda_test SRCS cuda_test.cu)
nv_test(dim_test SRCS dim_test.cu DEPS ddim)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册