These are chat archives for inbilla/CMake

24th
Aug 2015
Joshua Green
@inbilla
Aug 24 2015 13:06
@packadal Can continue discussion here
Packadal
@packadal
Aug 24 2015 13:06
@inbilla so I had some time to fiddle around and I fixed the issue
Joshua Green
@inbilla
Aug 24 2015 13:06
oh really?
Packadal
@packadal
Aug 24 2015 13:06
at least the test goes further before failing
Joshua Green
@inbilla
Aug 24 2015 13:06
that was quick
Packadal
@packadal
Aug 24 2015 13:06
I monkey-patched the modifications I did by hand and it seems to work
the test revealed an issue when a custom command has a ' in its arg list
wich I escaped with a ^
Joshua Green
@inbilla
Aug 24 2015 13:08
Good one, there are some escaping issues in the current code
Packadal
@packadal
Aug 24 2015 13:08
and $ signs in arg lists must be escaped too
and the test still fails with something a tad more obscure
Joshua Green
@inbilla
Aug 24 2015 13:09
yes, so long as they aren't supposed to be FastBuild variables....
thats a little tougher to determine
(due to cmake's generator expressions)
Packadal
@packadal
Aug 24 2015 13:09
Oh, didn't think of that one
Joshua Green
@inbilla
Aug 24 2015 13:10
I think some proper escaping scheme might be required...
Currently I've got somewhat of a hack in there in the form of "Detection::UnescapeFastbuildVariables"
to fix something similar
@rkhoury has run into some issues in this area on linux too
Packadal
@packadal
Aug 24 2015 13:12
sadly I'm unable to work on linux for fastbuild as I can't build it
it requires fastbuild which requires a recent libc++ and I'm on CentOS6
Joshua Green
@inbilla
Aug 24 2015 13:14
right, that does make it a little tougher
what keeps you on legacy centOs?
Packadal
@packadal
Aug 24 2015 13:15
constraints from work
clients use it, we have to provide support, and it's less of a pain running old centos than to switch once in a while
Joshua Green
@inbilla
Aug 24 2015 13:16
yeah, makes sense
my work managed to kick centos5 only recently
now instead of being held back by my colleagues on centos5, they now use 7, and now it's visual studio limiting the C++ support :)
Packadal
@packadal
Aug 24 2015 13:17
officially we still support it, but none of our clients use it
I made my peace on not being able to use C++11
I know I'll probably never use it in production code
or in about 10 years
Joshua Green
@inbilla
Aug 24 2015 13:20
:)
So do you think your changes would be usable?
Packadal
@packadal
Aug 24 2015 13:20
yeah, just needs a tad of cleanup
my IDE automatically replaces tabs with spaces because that's our religion here
I'm just trying to get the test to work in its entirety
Packadal
@packadal
Aug 24 2015 13:26
and it seems there is a problem with the SplitExecutableAndFlags method
looking into it
Joshua Green
@inbilla
Aug 24 2015 13:26
I know of one problem with it too....
Packadal
@packadal
Aug 24 2015 13:27
the test goes
add_custom_command(
OUTPUT doc1.txt
COMMAND ${CMAKE_COMMAND} -E echo "Example Document Target" > doc1.txt
DEPENDS doc1.tex
VERBATIM
)
Joshua Green
@inbilla
Aug 24 2015 13:27
Would be good to start using the issues in github I think to track some of this stuff
Packadal
@packadal
Aug 24 2015 13:27
and the execarguments are
.ExecArguments = 'C:/Windows/System32/cmd.exe /C cd /D C:\src\build\cmake-fbuild\Tests\CustomCommand && C:\src\build\cmake-fbuild\bin\Release\cmake.exe -E echo Example Document Target" > doc1.txt" '
so it eats the first double quote and adds an extra one at the end
is it the problem you know with it ?
Joshua Green
@inbilla
Aug 24 2015 13:28
looks related yeah
so, the SplitExecutableAndFlags is using the ParseArguments functionality in cmake
which means if anything is quoted
then it'll eat the quotes
Packadal
@packadal
Aug 24 2015 13:29
damn
Joshua Green
@inbilla
Aug 24 2015 13:29
and then when I join the args back together
they don't have quotes...
My rough plan of attack there was to attempt to parse out the exe itself...
manually...
but you have to keep track of quotation and escaping
doesn't look like any of Cmake's existing helpers can do this kind of thing
Joshua Green
@inbilla
Aug 24 2015 13:41
Aight, signing out...
good luck!
Packadal
@packadal
Aug 24 2015 13:41
thanks