title: CMake: how to clear target compile options
body: <p>In my project I have defined some general compile options using <code>CMAKE_CXX_FLAGS</code> globally. Some other options, that in common case should be applied to all targets, are specified using <code>add_compile_options()</code> in my main CMakeLists file.</p>
  
  <p>For example I want the flag <code>-Wconversion</code> be applied to all targets.
  But I have one external library that produces to many warnings with this option enabled. So I want to disable option only for this particular lib:</p>
  
  <pre><code>get_target_property(EXTLIB_COMPILE_FLAGS ext_lib COMPILE_OPTIONS )
  list(REMOVE_ITEM EXTLIB_COMPILE_FLAGS -Wconversion)
  set_target_properties(ext_lib PROPERTIES COMPILE_OPTIONS ${EXTLIB_COMPILE_FLAGS } )
  </code></pre>
  
  <p>But right now only <code>-Wconversion</code> was setted using <code>add_compile_options()</code>.
  And target does not have any own additional flags. So, after removing the only entry from the list I will get an empty list. Call to set_target_properties() fails with error:</p>
  
  <blockquote>
    <p>set_target_properties called with incorrect number of arguments.</p>
  </blockquote>
  
  <p>Is any way to clear some of target properties completly?
  I'm using CMake 3.11</p>