-
-
Notifications
You must be signed in to change notification settings - Fork 97
Expand file tree
/
Copy pathClazyTestPrefix.cmake
More file actions
25 lines (21 loc) · 781 Bytes
/
ClazyTestPrefix.cmake
File metadata and controls
25 lines (21 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# SPDX-FileCopyrightText: 2025 Alexander Lohnau <alexander.lohnau@kde.org>
# SPDX-License-Identifier: BSD-2-Clause
set(test_prefix "${CMAKE_BINARY_DIR}/test.prefix.sh")
set(script_content [=[
#!/usr/bin/env bash
export CLAZYPLUGIN_CXX="$<TARGET_FILE:ClazyPlugin>"
export CLAZYSTANDALONE_CXX="$<TARGET_FILE:clazy-standalone>"
]=])
if (CLAZY_BUILD_CLANG_TIDY)
string(APPEND script_content "export CLANGTIDYPLUGIN_CXX=\"$<TARGET_FILE:ClazyClangTidy>\"\n")
endif()
if (CLANG_EXECUTABLE_PATH)
string(APPEND script_content "export CLANGXX=\"${CLANG_EXECUTABLE_PATH}\"\n")
endif()
if (CLANG_TIDY_EXECUTABLE_PATH)
string(APPEND script_content "export CLANGTIDY=\"${CLANG_TIDY_EXECUTABLE_PATH}\"\n")
endif()
file(GENERATE
OUTPUT "${test_prefix}"
CONTENT "${script_content}"
)