Skip to content
  • Jörg Bornemann's avatar
    AutoMoc: Don't initialize already defined CMAKE_AUTOMOC_ variables · 70c721be
    Jörg Bornemann authored
    Setting the variables CMAKE_AUTOGEN_ORIGIN_DEPENDS,
    CMAKE_AUTOMOC_COMPILER_PREDEFINES, and CMAKE_AUTOMOC_MACRO_NAMES on the
    cmake command line did not work as expected. CMakeGenericSystem.cmake
    initialized these variables even if they were defined by the user.
    
    This led to the confusing situation where the cache variant of a
    variable had one value (defined on the command line) and the non-cache
    variant of a variable had a different value (defined in
    CMakeGenericSystem.cmake).
    
    Fix this by checking whether the variables are defined before setting
    their default values.
    
    Fixes: #24069
    70c721be