2022-03-22 11:03:15 -04:00
|
|
|
cmake_minimum_required(VERSION 3.11)
|
|
|
|
project(coordinator LANGUAGES C VERSION 0.1.0)
|
|
|
|
|
|
|
|
enable_testing()
|
|
|
|
|
2022-04-05 09:12:20 -04:00
|
|
|
#
|
|
|
|
# core-os disk-mapper
|
|
|
|
#
|
|
|
|
add_custom_target(disk-mapper
|
|
|
|
go build -o ${CMAKE_BINARY_DIR}/disk-mapper -ldflags "-s -w"
|
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/state/cmd
|
|
|
|
)
|
|
|
|
|
2022-03-22 11:03:15 -04:00
|
|
|
#
|
|
|
|
# coordinator
|
|
|
|
#
|
|
|
|
|
|
|
|
add_custom_target(coordinator ALL
|
2022-04-20 05:33:02 -04:00
|
|
|
go build -o ${CMAKE_BINARY_DIR} -tags=gcp -buildvcs=false -ldflags "-s -w -buildid='' -X main.version=${PROJECT_VERSION}"
|
2022-03-22 11:03:15 -04:00
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/coordinator/cmd/coordinator)
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# cli
|
|
|
|
#
|
|
|
|
|
|
|
|
add_custom_target(cli ALL
|
2022-04-20 05:33:02 -04:00
|
|
|
go build -o ${CMAKE_BINARY_DIR}/constellation -buildvcs=false -tags=gcp -ldflags "-buildid='' -X github.com/edgelesssys/constellation/internal/constants.CliVersion=${PROJECT_VERSION}"
|
2022-03-22 11:03:15 -04:00
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cli)
|
|
|
|
|
|
|
|
#
|
|
|
|
# testing / debugging
|
|
|
|
#
|
|
|
|
|
|
|
|
add_custom_target(debug_coordinator ALL
|
|
|
|
go build -o ${CMAKE_BINARY_DIR}/debug_coordinator -buildvcs=false -ldflags "-buildid='' -X main.version=${PROJECT_VERSION}"
|
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/coordinator/cmd/coordinator)
|
|
|
|
|
|
|
|
add_test(NAME unittest COMMAND go test -race -count=3 ./... WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
|
|
|
add_test(NAME integrationtest COMMAND go test -v -tags integration ./test/ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
|
|
|
add_test(NAME etcd-unittest COMMAND go test -v --race -cover -count=3 -tags integration WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/coordinator/store/)
|