From f170111031b1f202effea678ebb5eaa4a9bf13bb Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Thu, 25 May 2017 12:18:16 +0800 Subject: [PATCH] Fix compile when not enable testing * WITH_TESTING is a flag that user could configure --- paddle/go/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paddle/go/CMakeLists.txt b/paddle/go/CMakeLists.txt index 20f147694..51c5252d6 100644 --- a/paddle/go/CMakeLists.txt +++ b/paddle/go/CMakeLists.txt @@ -2,8 +2,10 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) go_library(adder SRCS adder.go) -cc_test(cgo_test +if (WITH_TESTING) + cc_test(cgo_test SRCS cgo_test.cc DEPS adder) +endif() -- GitLab