>> $<1:-I $<JOIN:a;b;c , -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$<JOIN:$ -I>> && cd /Us...
^ near here
same applies to 2.8.12.2.
the genex is:
$<$<BOOL:$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>>:-I$<JOIN:$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>,
-I>>
changing the genex to:
$<$<BOOL:$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>>:-I$<JOIN:
$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES> , -I>>
it expands to:
$<1:-I$<JOIN: /Users/tim/dev/x/a;/Users/tim/dev/x/b;/Users/tim/dev/x/c ,
-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 $< $<BOOL:$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>> :-I$<JOIN:
$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES> , -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