CMake/Tests/WarnUnusedCliUnused/CMakeLists.txt
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

10 lines
236 B
CMake

cmake_minimum_required(VERSION 3.14)
project(WarnUnusedCliUnused)
# Remove UNUSED_CLI_VARIABLE from the cache to trigger the
# CMake warning message on re-builds as well.
unset(UNUSED_CLI_VARIABLE CACHE)
add_library(dummy empty.cpp)