1 cmake_minimum_required(VERSION 3.15) |
1 cmake_minimum_required(VERSION 3.15) |
2 project(ucx) |
2 project(ucx VERSION 2.1 DESCRIPTION "UAP Common Extensions") |
3 |
3 |
4 # Autotools Buildsystem |
4 # Configuration |
5 add_custom_command( |
5 set(CMAKE_C_STANDARD 11) |
6 OUTPUT ${CMAKE_SOURCE_DIR}/configure |
6 set(CMAKE_C_STANDARD_REQUIRED 99) |
7 MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/configure.ac |
|
8 COMMAND ${CMAKE_SOURCE_DIR}/autogen.sh |
|
9 COMMENT "Generating configure script.") |
|
10 |
7 |
11 add_custom_command( |
8 # Library |
12 OUTPUT ${CMAKE_SOURCE_DIR}/Makefile |
9 add_subdirectory(src) |
13 DEPENDS ${CMAKE_SOURCE_DIR}/configure |
|
14 COMMAND ${CMAKE_SOURCE_DIR}/configure |
|
15 COMMENT "Configuring project.") |
|
16 |
10 |
17 add_custom_target(libucx-build |
11 # Tests |
18 DEPENDS ${CMAKE_SOURCE_DIR}/Makefile |
12 enable_testing() |
19 COMMAND $(MAKE) -f ${CMAKE_SOURCE_DIR}/Makefile |
13 add_subdirectory(test) |
20 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) |
14 add_test(NAME test COMMAND ucxtest WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test") |
21 |
|
22 add_custom_target(libucx-clean |
|
23 DEPENDS ${CMAKE_SOURCE_DIR}/Makefile |
|
24 COMMAND $(MAKE) -f ${CMAKE_SOURCE_DIR}/Makefile clean |
|
25 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) |
|
26 |
|
27 add_custom_target(libucx-check |
|
28 DEPENDS ${CMAKE_SOURCE_DIR}/Makefile |
|
29 COMMAND $(MAKE) ${CMAKE_SOURCE_DIR}/Makefile check |
|
30 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) |
|
31 |
15 |
32 # Web Documentation |
16 # Web Documentation |
33 add_subdirectory(docs/src) |
17 add_subdirectory(docs/src) |
34 |
18 |
35 # API Documentation |
19 # API Documentation |