mirror of
https://github.com/reactos/CMake.git
synced 2024-12-03 17:11:04 +00:00
4edc0ef359
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
10 lines
236 B
CMake
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)
|