Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,804
    • Issues 3,804
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #19827

Closed
Open
Created Oct 11, 2019 by Tobias Hieta@truContributor

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
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking