File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -130,18 +130,15 @@ if(UR_USE_MSAN)
130
130
add_sanitizer_flag (memory )
131
131
endif ()
132
132
133
- find_program ( CLANG_FORMAT NAMES clang-format-15 clang-format-15.0 clang-format )
134
-
135
- set ( CLANG_FORMAT_REQUIRED "15.0" )
133
+ # Check if clang-format (in correct version) is available for Cpp code formatting.
134
+ if ( UR_FORMAT_CPP_STYLE )
135
+ find_program ( CLANG_FORMAT NAMES clang-format-15 clang-format-15.0 clang-format )
136
136
137
- if (CLANG_FORMAT )
138
- get_program_version_major_minor (${CLANG_FORMAT} CLANG_FORMAT_VERSION )
139
- message (STATUS "Found clang-format: ${CLANG_FORMAT} (version: ${CLANG_FORMAT_VERSION} )" )
140
- endif ()
137
+ if (CLANG_FORMAT )
138
+ get_program_version_major_minor (${CLANG_FORMAT} CLANG_FORMAT_VERSION )
139
+ message (STATUS "Found clang-format: ${CLANG_FORMAT} (version: ${CLANG_FORMAT_VERSION} )" )
141
140
142
- # Check if the correct version of clang-format is available
143
- if (UR_FORMAT_CPP_STYLE )
144
- if (CLANG_FORMAT )
141
+ set (CLANG_FORMAT_REQUIRED "15.0" )
145
142
if (NOT (CLANG_FORMAT_VERSION VERSION_EQUAL CLANG_FORMAT_REQUIRED ))
146
143
message (FATAL_ERROR "required clang-format version is ${CLANG_FORMAT_REQUIRED} " )
147
144
endif ()
Original file line number Diff line number Diff line change 14
14
- [ Weekly tags] ( #weekly-tags )
15
15
3 . [ Third-Party tools] ( #third-party-tools )
16
16
4 . [ Building] ( #building )
17
+ - [ Requirements] ( #requirements )
17
18
- [ Windows] ( #windows )
18
19
- [ Linux] ( #linux )
19
20
- [ CMake standard options] ( #cmake-standard-options )
@@ -71,9 +72,13 @@ Tools can be acquired via instructions in [third_party](/third_party/README.md).
71
72
72
73
## Building
73
74
74
- Requirements:
75
+ ### Requirements
76
+
77
+ Required packages:
75
78
- C++ compiler with C++17 support
76
79
- [ CMake] ( https://cmake.org/ ) >= 3.14.0
80
+
81
+ For development and contributions:
77
82
- clang-format-15.0 (can be installed with ` python -m pip install clang-format==15.0.7 ` )
78
83
79
84
### Windows
You can’t perform that action at this time.
0 commit comments