|
1 | 1 | # Copyright 2018 Uber Technologies, Inc.
|
2 | 2 | #
|
3 |
| -# Licensed under the Apache License, Version 2.0 (the "License"); |
4 |
| -# you may not use this file except in compliance with the License. |
5 |
| -# You may obtain a copy of the License at |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 4 | +# use this file except in compliance with the License. You may obtain a copy of |
| 5 | +# the License at |
6 | 6 | #
|
7 |
| -# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
8 | 8 | #
|
9 | 9 | # Unless required by applicable law or agreed to in writing, software
|
10 |
| -# distributed under the License is distributed on an "AS IS" BASIS, |
11 |
| -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 |
| -# See the License for the specific language governing permissions and |
13 |
| -# limitations under the License. |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | +# License for the specific language governing permissions and limitations under |
| 13 | +# the License. |
14 | 14 |
|
15 | 15 | # Support code for wrapping tests or other executables with Valgrind.
|
16 | 16 |
|
17 | 17 | if(__test_wrap_valgrind)
|
18 |
| - return() |
| 18 | + return() |
19 | 19 | endif()
|
20 | 20 | set(__test_wrap_valgrind 1)
|
21 | 21 |
|
22 | 22 | include(CMakeDependentOption)
|
23 | 23 |
|
24 | 24 | find_program(VALGRIND valgrind)
|
25 |
| -cmake_dependent_option(WRAP_VALGRIND "Wrap tests in valgrind" OFF |
26 |
| - "VALGRIND" OFF) |
| 25 | +cmake_dependent_option(WRAP_VALGRIND "Wrap tests in valgrind" OFF "VALGRIND" |
| 26 | + OFF) |
27 | 27 | if(WRAP_VALGRIND)
|
28 |
| - # TEST_WRAPPER could be used to configure the Valgrind parameters, or |
29 |
| - # to use a different wrapper entirely. |
30 |
| - set(TEST_WRAPPER ${VALGRIND} --track-origins=yes --leak-check=full --error-exitcode=99 CACHE STRING |
31 |
| - "Wrapper executable for tests and benchmarks") |
| 28 | + # TEST_WRAPPER could be used to configure the Valgrind parameters, or to use |
| 29 | + # a different wrapper entirely. |
| 30 | + set(TEST_WRAPPER |
| 31 | + ${VALGRIND} --track-origins=yes --leak-check=full --error-exitcode=99 |
| 32 | + CACHE STRING "Wrapper executable for tests and benchmarks") |
32 | 33 | mark_as_advanced(TEST_WRAPPER)
|
33 |
| - # Convert from semicolon separated list of values to a form |
34 |
| - # that can be used by a shell. |
| 34 | + # Convert from semicolon separated list of values to a form that can be used |
| 35 | + # by a shell. |
35 | 36 | string(REPLACE ";" " " TEST_WRAPPER_STR "${TEST_WRAPPER}")
|
36 | 37 | endif()
|
0 commit comments