3.16.0-rc1 seems to have broken `cmake -C init-cache.cmake`
We rely on this feature to set some variables from a autogenerated initial cache. This seems to not work with 3.16.0-rc1 anymore. I did a small isolated test case for this:
CMakeLists.txt
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(Hello C)
message(STATUS ${HELLO})
init-cache.cmake
set(HELLO "Foobar" CACHE STRING "")
When running cmake -C ../init-cache.cmake ..
I get the following error:
loading initial cache file ../init-cache.cmake
CMake Error: Error processing file: ../init-cache.cmake
I tried debug and trace functionality but none of those seems to indicate what goes wrong with the init cache.
I downloaded 3.15.4 and doublechecked and it seems to be working just fine there:
> ~/t/cmake-3.15.4-Linux-x86_64/bin/cmake -C ../init-cache.cmake .. loading initial cache file ../init-cache.cmake
-- The C compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Foobar
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tobias/b/b