Commit Graph

3 Commits

Author SHA1 Message Date
Sebastian Holtermann
4edc0ef359 Test: Improve WarnUnusedCliUnused to run on all generators
In the WarnUnusedCliUnused test, the whole CMakeCache.txt was removed in the
clean stage to trigger the same CMake warning in re-builds.  This technique
worked only in the Makefile generators and the test was limited to these.

Now only the variable of interest is removed from the cache by using a
`unset(UNUSED_CLI_VARIABLE CACHE)` statement in the CMakeLists.txt file.
This makes the WarnUnusedCliUnused test run on all generators
2019-05-15 15:28:37 +02:00
Kitware Robot
d9fd2f5402 Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2016-05-16 16:05:19 -04:00
Stephen Kelly
273ecab96d CLI: Suppress the unused warning if the key value pair is cached.
It is common to specify a CMAKE_TOOLCHAIN_FILE and get a warning
for using it despite it not being used.

The WarnUnusedCliUnused test relies on the warning being emitted
each time cmake is run on an existing build. That behavior is changed
by this patch to warn only on the first invokation of CMake, and not
on subsequent invokations (because the variable is in the cache with
the same value). For that test, a clean target is added which clears
the cache and cause the warning to be emitted each time.

As the Ninja generator does not support the feature needed to test
this, it is not tested with that generator.
2013-06-04 12:38:56 +02:00