The CMake script in the test/kernel subdirectory is already gated by BUILD_KERNEL_LIB:https://github.com/bitcoin/bitcoin/blob/f6acbef1084e34f126bf530df99e4ef6a11c38e8/src/CMakeLists.txt#L405-L409
As a result, the following configuration summary is misleading:
$ cmake -B build -DBUILD_KERNEL_LIB=OFF -DBUILD_KERNEL_TEST=ON
<snip>
bitcoin-chainstate (experimental) ... OFF
libbitcoinkernel (experimental) ..... OFF
kernel-test (experimental) .......... ON
<snip>
This PR fixes the behaviour by making the BUILD_KERNEL_TEST option explicitly depend on BUILD_KERNEL_LIB.