|
From: | Hartmut Goebel |
Subject: | [bug#69554] [PATCH v2] build-system: cmake: Build tests depending on `#:tests?`. |
Date: | Tue, 8 Oct 2024 11:06:34 +0200 |
User-agent: | Mozilla Thunderbird |
Could we detect with `cmake -L` [1] that the package has a BUILD_TESTING option and only then pass this flag?
Running `cmake -L` would run the configure phase. Thus we would need to configure twice: first to learn whether BUILD_TESTING is defined and then a second time to change it. We might be able to optimize this: if BUILD_TESTING is already set to the value we want, we can skip the second run. While we can hope that the second run will be cheap, if might not if things change depending on the values.
IMHO this is too much effort just to suppress a warning.
Anyhow, there is a much simpler solution, according to
<https://stackoverflow.com/questions/36451368/> we could
just add a line to the CMakeList.txt file.
Voila, no warning.
WDYT?
-- Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |
[Prev in Thread] | Current Thread | [Next in Thread] |