-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
87 lines (72 loc) · 3.19 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
cmake_minimum_required(VERSION 3.31)
list(APPEND CMAKE_MESSAGE_CONTEXT ixm)
include(CMakeDependentOption)
include(CMakePrintHelpers)
block (SCOPE_FOR VARIABLES) # Setting internal variables
message(TRACE "Setting internal variables")
set(IXM_FILES_DIR "${CMAKE_BINARY_DIR}/IXMFiles" CACHE INTERNAL "")
set(IXM_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE INTERNAL "IXM Root Directory")
endblock()
block (SCOPE_FOR VARIABLES) # Setting global variables
message(TRACE "Setting global variables")
set(CMAKE_DISABLE_IN_SOURCE_BUILD YES CACHE BOOL "")
set(CMAKE_DISABLE_SOURCE_CHANGES YES CACHE BOOL "")
endblock()
block (SCOPE_FOR VARIABLES)
message(TRACE "Setting default properties")
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMake")
set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED YES) # Removes CDash Targets
endblock()
block (SCOPE_FOR VARIABLES) # Setting default CMake policies
message(TRACE "Setting default CMake policies")
if (NOT 🈯::ixm::${CMAKE_VERSION}::policies)
include("${CMAKE_CURRENT_LIST_DIR}/internal/policies.cmake")
set(🈯::ixm::${CMAKE_VERSION}::policies YES CACHE INTERNAL "")
mark_as_advanced(🈯::ixm::${CMAKE_VERSION}::policies)
endif()
endblock()
block (SCOPE_FOR VARIABLES) # Defining global properties
message(TRACE "Defining global properties")
define_property(GLOBAL PROPERTY 🈯::ixm::supports::hyperlinks
BRIEF_DOCS "Whether the current interface executing CMake supports rendering ANSI escape hyperlinks.")
define_property(GLOBAL PROPERTY 🈯::ixm::supports::unicode
BRIEF_DOCS "Whether the current interface executing CMake supports rendering Unicode characters.")
endblock()
block (SCOPE_FOR VARIABLES) # Include internal source files
message(TRACE "Including IXM's internal source files")
include("${CMAKE_CURRENT_LIST_DIR}/internal/supports.cmake")
endblock()
block (SCOPE_FOR VARIABLES) # Setting internal properties
message(TRACE "Setting internal properties")
if (NOT DEFINED IXM_SUPPORTS_HYPERLINKS)
cmake_language(CALL 🈯::ixm::supports::hyperlinks)
endif()
if (NOT DEFINED IXM_SUPPORTS_UNICODE)
cmake_language(CALL 🈯::ixm::supports::unicode)
endif()
set_property(GLOBAL PROPERTY 🈯::ixm::supports::hyperlinks ${IXM_SUPPORTS_HYPERLINKS})
set_property(GLOBAL PROPERTY 🈯::ixm::supports::unicode ${IXM_SUPPORTS_UNICODE})
endblock()
message(TRACE "Including IXM internal source files")
include("${CMAKE_CURRENT_LIST_DIR}/internal/validate.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/internal/features.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/internal/package.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/internal/common.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/internal/check.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/internal/find.cmake")
file(MAKE_DIRECTORY "${IXM_FILES_DIR}")
block (SCOPE_FOR VARIABLES) # Setting DEFER calls
message(TRACE "Setting DEFER calls")
cmake_language(DEFER
DIRECTORY "${CMAKE_SOURCE_DIR}"
CALL cmake_file_api
QUERY
API_VERSION 1
CMAKEFILES 1
TOOLCHAINS 1
CODEMODEL 2
CACHE 2)
endblock()
message(TRACE "Mutating CMAKE_MODULE_PATH")
list(PREPEND CMAKE_MODULE_PATH "${IXM_ROOT_DIR}/modules")
return(PROPAGATE CMAKE_MODULE_PATH)