File tree 2 files changed +11
-5
lines changed
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 32
32
function (target_clangformat TARGET )
33
33
34
34
set (options "" )
35
- set (single_value_args CONDITION )
36
- set (multi_value_args "" )
35
+ set (single_value_args "" )
36
+ set (multi_value_args CONDITION )
37
37
cmake_parse_arguments ( ARGS "${options} " "${single_value_args} " "${multi_value_args} " ${ARGN} )
38
38
39
39
# Skip setup if condition supplied and FALSE
40
- if (NOT ${ARGS_CONDITION} )
41
- return ()
40
+ if (DEFINED ARGS_CONDITION)
41
+ if (${${ARGS_CONDITION} })
42
+ # Do nothing, just continue
43
+ else ()
44
+ return ()
45
+ endif ()
42
46
endif ()
43
47
44
48
# Skip setup if clang-format is not available...
Original file line number Diff line number Diff line change @@ -143,9 +143,11 @@ ecbuild_add_test(
143
143
ecflow_server # the server is launched to support tests
144
144
TEST_DEPENDS
145
145
u_base
146
+ CONDITION
147
+ ENABLE_SERVER # AND ENABLE_TESTS
146
148
)
147
149
target_clangformat(s_client
148
- CONDITION ENABLE_TESTS
150
+ CONDITION ENABLE_SERVER AND ENABLE_TESTS
149
151
)
150
152
151
153
if (ENABLE_ALL_TESTS AND ENABLE_SERVER)
You can’t perform that action at this time.
0 commit comments