1cmake_minimum_required (VERSION 3.0.2)
2if (POLICY CMP0048)
3  cmake_policy(SET CMP0048 NEW)
4endif()
5
6if (POLICY CMP0077)
7  cmake_policy(SET CMP0077 NEW)
8endif()
9
10set (LIBMETAL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
11
12list (APPEND CMAKE_MODULE_PATH
13      "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
14      "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
15      "${CMAKE_CURRENT_SOURCE_DIR}/cmake/platforms")
16
17include (syscheck)
18project (metal C)
19
20include (CheckIncludeFiles)
21include (CheckCSourceCompiles)
22include (collect)
23include (options)
24include (depends)
25
26foreach(_inc_path ${CMAKE_INCLUDE_PATH})
27  collect (PROJECT_INC_DIRS "${_inc_path}")
28endforeach()
29
30enable_testing ()
31
32add_subdirectory (lib)
33
34if (WITH_TESTS)
35  add_subdirectory (test)
36endif (WITH_TESTS)
37
38if (WITH_DOC)
39  add_subdirectory (doc)
40endif (WITH_DOC)
41
42if (WITH_EXAMPLES)
43  add_subdirectory (examples)
44endif (WITH_EXAMPLES)
45
46