Skip to content
  • Brad King's avatar
    Remove CMake Policy CMP0015 until it is revised · 9a77f65d
    Brad King authored
    We revert commit "Create CMake Policy CMP0015 to fix set(CACHE)" because
    the NEW behavior of the policy breaks a valid use case:
    
      # CMakeLists.txt
      option(BUILD_SHARED_LIBS "..." ON)
      add_library(mylib ...)
      set(BUILD_SHARED_LIBS OFF) # we want only mylib to be shared
      add_subdirectory(ThirdParty)
    
      # ThirdParty/CMakeLists.txt
      option(BUILD_SHARED_LIBS "..." ON)
      # uh, oh, with NEW behavior this dir uses shared libs!!!
    
    We'll re-introduce the policy later with a different change in behavior
    to resolve the motivating case, which was more subtle but less common.
    
    See issue #9008.
    9a77f65d