aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-06-25 08:03:08 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-06-25 08:03:08 +0900
commit553acc9d234140fd94e768679756077271902e6f (patch)
tree0b2bffeb7bebbada2fc2fc8326b7400593fc9e8d /CMakeLists.txt
parent08c424d4e853b4dc67d966ca0336892e580f9d20 (diff)
downloadlibquotient-553acc9d234140fd94e768679756077271902e6f.tar.gz
libquotient-553acc9d234140fd94e768679756077271902e6f.zip
CMakeLists: replace list(TRANSFORM) with foreach/list(APPEND)
list(TRANSFORM) is only available from CMake 3.12.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 54082671..874594e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -158,8 +158,11 @@ if (MATRIX_DOC_PATH AND GTAD_PATH)
VERBATIM
)
if (CLANG_FORMAT)
- set(api_HDRS ${api_SRCS})
- list(TRANSFORM api_HDRS REPLACE ".cpp$" ".h")
+ # TODO: list(TRANSFORM) is available from CMake 3.12
+ foreach (S ${api_SRCS})
+ string (REGEX REPLACE ".cpp$" ".h" H ${S})
+ list(APPEND api_HDRS ${H})
+ endforeach()
set(CLANG_FORMAT_ARGS -i -sort-includes -verbose)
add_custom_target(update-format-api
COMMAND ${ABS_CLANG_FORMAT} ${CLANG_FORMAT_ARGS} ${api_SRCS}