1.1 --- a/CMakeLists.txt Thu Dec 19 19:58:41 2019 +0100 1.2 +++ b/CMakeLists.txt Fri Dec 20 14:29:41 2019 +0100 1.3 @@ -1,33 +1,17 @@ 1.4 cmake_minimum_required(VERSION 3.15) 1.5 -project(ucx) 1.6 +project(ucx VERSION 2.1 DESCRIPTION "UAP Common Extensions") 1.7 1.8 -# Autotools Buildsystem 1.9 -add_custom_command( 1.10 - OUTPUT ${CMAKE_SOURCE_DIR}/configure 1.11 - MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/configure.ac 1.12 - COMMAND ${CMAKE_SOURCE_DIR}/autogen.sh 1.13 - COMMENT "Generating configure script.") 1.14 +# Configuration 1.15 +set(CMAKE_C_STANDARD 11) 1.16 +set(CMAKE_C_STANDARD_REQUIRED 99) 1.17 1.18 -add_custom_command( 1.19 - OUTPUT ${CMAKE_SOURCE_DIR}/Makefile 1.20 - DEPENDS ${CMAKE_SOURCE_DIR}/configure 1.21 - COMMAND ${CMAKE_SOURCE_DIR}/configure 1.22 - COMMENT "Configuring project.") 1.23 +# Library 1.24 +add_subdirectory(src) 1.25 1.26 -add_custom_target(libucx-build 1.27 - DEPENDS ${CMAKE_SOURCE_DIR}/Makefile 1.28 - COMMAND $(MAKE) -f ${CMAKE_SOURCE_DIR}/Makefile 1.29 - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) 1.30 - 1.31 -add_custom_target(libucx-clean 1.32 - DEPENDS ${CMAKE_SOURCE_DIR}/Makefile 1.33 - COMMAND $(MAKE) -f ${CMAKE_SOURCE_DIR}/Makefile clean 1.34 - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) 1.35 - 1.36 -add_custom_target(libucx-check 1.37 - DEPENDS ${CMAKE_SOURCE_DIR}/Makefile 1.38 - COMMAND $(MAKE) ${CMAKE_SOURCE_DIR}/Makefile check 1.39 - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) 1.40 +# Tests 1.41 +enable_testing() 1.42 +add_subdirectory(test) 1.43 +add_test(NAME test COMMAND ucxtest WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test") 1.44 1.45 # Web Documentation 1.46 add_subdirectory(docs/src) 1.47 @@ -54,5 +38,3 @@ 1.48 endif() 1.49 1.50 add_custom_target(docs-all DEPENDS docs-html docs-api) 1.51 - 1.52 -add_custom_target(build-all DEPENDS docs-all libucx-check)