Re: [cmake-developers] generator expressions with variable

2014-04-20 Thread Tim Blechmann
>> see attached file!
> 
> 
> The generator expression stops parsing at whitespace. I believe you're 
> hitting a problem related to what is discussed in this thread:
> 
>  http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/7063
> 
> It will require patching CMake, but there is no one working on a patch yet.
> 
>  http://public.kitware.com/Bug/view.php?id=14353

hmm, the bug is marked as BACKLOG ... tbo, the current situation is not
exactly robust: if it is known to be broken, maybe there could be at
least an error message, describing the issue?

thnx,
tim

-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


Re: [cmake-developers] generator expressions with variable

2014-04-20 Thread Stephen Kelly
Tim Blechmann wrote:

>>> $<1:-I $>
>>>
>>> though it does not matter, if the target is passed via variable or
>>> directly.
>>>
>>> any idea?
>>>
>> 
>> 
>> Please provide a http://www.sscce.org/
> 
> see attached file!


The generator expression stops parsing at whitespace. I believe you're 
hitting a problem related to what is discussed in this thread:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/7063

It will require patching CMake, but there is no one working on a patch yet.

 http://public.kitware.com/Bug/view.php?id=14353

Thanks,

Steve.



-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


Re: [cmake-developers] generator expressions with variable

2014-04-20 Thread Tim Blechmann
>> $<1:-I $>
>>
>> though it does not matter, if the target is passed via variable or
>> directly.
>>
>> any idea?
>>
> 
> 
> Please provide a http://www.sscce.org/

see attached file!

origin/master gives me:
tim@moka-mac:~/dev/x/y$ ~/dev/cmake/bin/cmake -GNinja .. && ninja
-- The C compiler identification is AppleClang 5.1.0.5030040
-- The CXX compiler identification is AppleClang 5.1.0.5030040
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/tim/dev/x/y
ninja: error: build.ninja:53: bad $-escape (literal $ must be written as $$)
  PRE_LINK = cd /Users/tim/dev/x/y && echo $<1:-I$> && cd /Us...
   ^ near here

same applies to 2.8.12.2.

the genex is:
$<$>:-I$,
-I>>


changing the genex to:
$<$>:-I$ , -I>>

it expands to:
$<1:-I$>

hth,
tim
cmake_minimum_required(VERSION 2.8)


add_library(foo foo.cpp)
target_include_directories(foo PUBLIC a b c)

add_custom_command(
  TARGET foo
  PRE_BUILD
  COMMAND echo $< $> :-I$ , -I>>
)
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Re: [cmake-developers] generator expressions with variable

2014-04-20 Thread Stephen Kelly
Tim Blechmann wrote:

> $<1:-I $>
> 
> though it does not matter, if the target is passed via variable or
> directly.
> 
> any idea?
> 


Please provide a http://www.sscce.org/

Thanks,

Steve.


-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


Re: [cmake-developers] generator expressions with variable

2014-04-19 Thread Tim Blechmann
>> $<$>:-I$,
>>  -I>>
> 
> Does it work without the variable in there. (By the time the generator
> expression evaluator gets the string, it should be expanded.)
> 
>> however evaluating the expression results in this command string:
>> $<1:-I$>
> 
> Should that '$' be ','? Where did your literal ',' go from the above
> genex?


hmm, i've updated cmake to the current master branch (the other one was
a few days old). now the expression evaluates to (if the properties are
"a;b;c"):

$<1:-I $>

though it does not matter, if the target is passed via variable or directly.

any idea?

thnx,
tim

-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


Re: [cmake-developers] generator expressions with variable

2014-04-19 Thread Ben Boeckel
On Sat, Apr 19, 2014 at 12:08:42 +0200, Tim Blechmann wrote:
> $<$>:-I$,
>  -I>>

Does it work without the variable in there. (By the time the generator
expression evaluator gets the string, it should be expanded.)

> however evaluating the expression results in this command string:
> $<1:-I$>

Should that '$' be ','? Where did your literal ',' go from the above
genex?

--Ben
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


[cmake-developers] generator expressions with variable

2014-04-19 Thread Tim Blechmann
hi all,

i'm trying to obtain the include paths from a target via a generator
expression, which is adapted from the help file:

help:
$<$>:-I$,
-I>>

i adapted it to obtain the value from a target, which is passed as a
function argument:

$<$>:-I$,
-I>>

however evaluating the expression results in this command string:
$<1:-I$>

is this a bug or a feature?

thanks a lot,
tim

-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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