Skip to content

Use of pre-compiled headers breaks Moore build when functor cache is disabled.

Building Moore with the functor cache disabled (i.e. CMake option -DLOKI_BUILD_FUNCTOR_CACHE=OFF) is broken following the merging of !5077 (merged) - The build now fails during configure with

--     (100%) MooreCache
CMake Error at MooreCache/CMakeLists.txt:74 (set_property):
  set_property could not find TARGET Moore_FunctorCache_Hlt1_hlt1_pp_default.
  Perhaps it has not yet been created.


CMake Error at MooreCache/CMakeLists.txt:111 (set_property):
  set_property could not find TARGET
  Moore_FunctorCache_Hlt2_options_hlt2_pp_2025.  Perhaps it has not yet been
  created.


CMake Error at MooreCache/CMakeLists.txt:111 (set_property):
  set_property could not find TARGET
  Moore_FunctorCache_Hlt2_options_hlt2_pp_thor.  Perhaps it has not yet been
  created.


CMake Error at MooreCache/CMakeLists.txt:111 (set_property):
  set_property could not find TARGET
  Moore_FunctorCache_Hlt2_options_sprucing_spruce_production.  Perhaps it has
  not yet been created.


CMake Error at MooreCache/CMakeLists.txt:123 (target_precompile_headers):
  Cannot specify precompile headers for target
  "Moore_FunctorCache_Hlt2_options_hlt2_pp_2025" which is not built by this
  project.


CMake Error at MooreCache/CMakeLists.txt:125 (target_precompile_headers):
  Cannot specify precompile headers for target
  "Moore_FunctorCache_Hlt1_hlt1_pp_default" which is not built by this
  project.


CMake Error at MooreCache/CMakeLists.txt:129 (target_precompile_headers):
  Cannot specify precompile headers for target
  "Moore_FunctorCache_Hlt2_options_hlt2_pp_thor" which is not built by this
  project.


CMake Error at MooreCache/CMakeLists.txt:129 (target_precompile_headers):
  Cannot specify precompile headers for target
  "Moore_FunctorCache_Hlt2_options_sprucing_spruce_production" which is not
  built by this project.

Re-enabling the functor cache build obviously fixes things, and if the build is indeed much faster now its debatable if the option to disable it is really still needed. Either way, the option should either be fixed or removed I would say.