Skip to content

Warnings about missing project() when using Initial Cache

I am a heavy user of the Initial Cache feature in CMake. I just started noticing this warning:

loading initial cache file
/Users/ewing/Source/Blurrr/Release/BlurrrSDKApple/bootstrap/InitialCache_Swift_OSX.cmake

CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

I do declare project() in my actual CMakeLists.txt, so I think this is a bug, probably caused by the Initial Cache use. It is only a warning, so I don't mind. My only concern is I hope you don't accidentally break other things down the line because you weren't aware of this. (Or worse, I really hope you don't remove the Initial Cache feature because that will give me a heart attack.)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information