[cmake-developers] CMake API for warnings
Ruslan Baratov
ruslan_baratov at yahoo.com
Fri May 6 07:17:02 EDT 2016
Here is the case when such feature might be useful:
stackoverflow.com/questions/37036690
Ruslo
On 25-Apr-16 21:58, Brad King wrote:
> On 04/23/2016 12:11 AM, Ruslan Baratov wrote:
>> It means ignoring directory properties. So by default we will inherit settings.
> [snip]
>> To disable inheriting we need to add extra argument (?) to *_compile_warnings:
>>
>> add_compile_warnings(DISABLE warn-A)
>> target_compile_warnings(foo DISABLE warn-B IGNORE DIRECTORY)
> We don't have such a feature for any of the other build settings so
> there is no precedent for how to represent this or its exact semantics.
>
> We may not need the capability at all. For other properties like
> COMPILE_OPTIONS and INCLUDE_DIRECTORIES the target-level property
> is initialized from the directory-level property when the target
> is created. After that the directory-level property has no meaning
> to the target. One may then set the target-level property to
> erase any content previously taken from the directory-level
> property. This allows specific targets to ignore the directory-level
> property in special cases.
>
> -Brad
>
More information about the cmake-developers
mailing list