diff -r be77fb2da242 -r 460c0258bb5b CMakeLists.txt --- a/CMakeLists.txt Thu Dec 19 19:58:41 2019 +0100 +++ b/CMakeLists.txt Fri Dec 20 14:29:41 2019 +0100 @@ -1,33 +1,17 @@ cmake_minimum_required(VERSION 3.15) -project(ucx) +project(ucx VERSION 2.1 DESCRIPTION "UAP Common Extensions") -# Autotools Buildsystem -add_custom_command( - OUTPUT ${CMAKE_SOURCE_DIR}/configure - MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/configure.ac - COMMAND ${CMAKE_SOURCE_DIR}/autogen.sh - COMMENT "Generating configure script.") +# Configuration +set(CMAKE_C_STANDARD 11) +set(CMAKE_C_STANDARD_REQUIRED 99) -add_custom_command( - OUTPUT ${CMAKE_SOURCE_DIR}/Makefile - DEPENDS ${CMAKE_SOURCE_DIR}/configure - COMMAND ${CMAKE_SOURCE_DIR}/configure - COMMENT "Configuring project.") +# Library +add_subdirectory(src) -add_custom_target(libucx-build - DEPENDS ${CMAKE_SOURCE_DIR}/Makefile - COMMAND $(MAKE) -f ${CMAKE_SOURCE_DIR}/Makefile - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) - -add_custom_target(libucx-clean - DEPENDS ${CMAKE_SOURCE_DIR}/Makefile - COMMAND $(MAKE) -f ${CMAKE_SOURCE_DIR}/Makefile clean - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) - -add_custom_target(libucx-check - DEPENDS ${CMAKE_SOURCE_DIR}/Makefile - COMMAND $(MAKE) ${CMAKE_SOURCE_DIR}/Makefile check - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) +# Tests +enable_testing() +add_subdirectory(test) +add_test(NAME test COMMAND ucxtest WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test") # Web Documentation add_subdirectory(docs/src) @@ -54,5 +38,3 @@ endif() add_custom_target(docs-all DEPENDS docs-html docs-api) - -add_custom_target(build-all DEPENDS docs-all libucx-check)