[build] Add WORKING_DIRECTORY for IDE
@@ -18,16 +18,20 @@ endif()
add_custom_target(build ALL DEPENDS aergocli aergosvr aergoluac brick)
-add_custom_target(aergocli GOBIN=${BIN_DIR} go install ${GCFLAGS} -ldflags \"${LDFLAGS} -X github.com/aergoio/aergo/cmd/aergocli/cmd.githash=`git rev-parse HEAD`\" ../cmd/aergocli/...
+add_custom_target(aergocli GOBIN=${BIN_DIR} go install ${GCFLAGS} -ldflags \"${LDFLAGS} -X github.com/aergoio/aergo/cmd/aergocli/cmd.githash=`git rev-parse HEAD`\" ./cmd/aergocli/...
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
DEPENDS vendor libtool)
-add_custom_target(aergosvr GOBIN=${BIN_DIR} go install ${GCFLAGS} -ldflags \"${LDFLAGS}\" ../cmd/aergosvr/...
+add_custom_target(aergosvr GOBIN=${BIN_DIR} go install ${GCFLAGS} -ldflags \"${LDFLAGS}\" ./cmd/aergosvr/...
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
DEPENDS vendor libtool)
-add_custom_target(aergoluac GOBIN=${BIN_DIR} go install ${GCFLAGS} -ldflags \"${LDFLAGS}\" ../cmd/aergoluac/...
+add_custom_target(aergoluac GOBIN=${BIN_DIR} go install ${GCFLAGS} -ldflags \"${LDFLAGS}\" ./cmd/aergoluac/...
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
DEPENDS vendor libtool)
-add_custom_target(brick GOBIN=${BIN_DIR} go install ${GCFLAGS} -ldflags \"${LDFLAGS} -X github.com/aergoio/aergo/cmd/brick/context.GitHash=`git describe --tags`\" ../cmd/brick/...
+add_custom_target(brick GOBIN=${BIN_DIR} go install ${GCFLAGS} -ldflags \"${LDFLAGS} -X github.com/aergoio/aergo/cmd/brick/context.GitHash=`git describe --tags`\" ./cmd/brick/...
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
DEPENDS vendor libtool)
set(VENDOR ${CMAKE_CURRENT_LIST_DIR}/vendor)
@@ -39,9 +43,11 @@ add_custom_target(vendor DEPENDS ${VENDOR})
add_custom_target(deps DEPENDS vendor libtool)
-add_custom_target(check go test -timeout 60s ../...
+add_custom_target(check go test -timeout 60s ./...
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
DEPENDS build)
-add_custom_target(cover-check go test -coverprofile c.out ../...
+add_custom_target(cover-check go test -coverprofile c.out ./...
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
DEPENDS build)
add_custom_target(distclean go clean ..
