title: CMake override policy for subproject
body: <p>My CMake project compiles a Python .so/.dylib extension module linked with a big static library. I want to compile the subproject's static library with hidden visibility for symbols : it would allows the linker (or LTO optimizer) to discard symbols unused by my python module.</p>
  
  <p>The best way to do this would be using <code>CXX_VISIBILITY_PRESET</code> and friends on the subproject's static library target.
  However, the subproject use policies from 3.1.0 by declaring :</p>
  
  <pre><code>cmake_minimum_required (VERSION 3.1.0)
  </code></pre>
  
  <p>The policy <code>CMP0063 NEW: Honor visibility properties for all target 
  types.</code> is only introduced from version 3.3 and thus, the set_target_properties have no effects.</p>
  
  <p>My project requires CMake 3.3, but I have no control on the subproject.</p>
  
  <p>I would like to avoid patching the subproject CMakeLists.txt, but currently I see no other way.</p>
  
  <p>Any idea ?</p>