On 05/17/2012 09:25 AM, Stephen Kelly wrote:
>>   "$<IF($<CONFIGURATION> MATCHES Debug AND $<LANGUAGE> STREQUALS CXX)...>"
>>
>> I'm not sure what should go in the "..." part though.  Some syntax to
>> delimit the then/else values would be needed.  
> 
> I'm not sure else() and endif() are needed as additional expressions could 
> be added for those.

We may not need the "else" part but we still need a strict and extensible
syntax to delimit the value in the "..." part above.

> Perhaps we can get object-orientated:
> 
> populate_target_usage_requirements(
>   NAME fooRequirements
>   [PUBLIC|PRIVATE]
>   INCLUDE_DIRECTORIES "/foo/bar"
>   INCLUDE_DIRECTORIES "/bat/bug" IF $<CMAKE_BUILD_TYPE> MATCHES Debug
>   COMPILE_DEFINITIONS "-DQT_CORE_LIB" 
>   COMPILE_DEFINITIONS "-DQT_GUI_LIB" IF BUILD_TESTING
> )

I think it will be hard to define the reach to the left of IF in
non-trivial cases, especially when the arguments are built up inside
a variable and some parts might end up empty.  Also the result of this
command will still need to be stored in the property as some kind of
generator expression, so we still need to define such an expression.

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to