I am trying to pass a quoted string through BUILD_COMMAND to ExternalProject_Add () and am trying to use it in every way. The code looks like this:
set (mylibs "-lmylib -lmylib2") ExternalProject_Add(Foo URL http://foo BUILD_COMMAND make SOME_LIB=${mylibs} BUILD_IN_SOURCE 1 ...)
I tried using backslash quotes, double quotes, pasting it all, but every time the whole quote SOME_LIB = ... is quoted, or my typed quotes get an escape code. Can't get quotes on the command line so that they just display options?
Although I cannot force the call to make SOMELIB="-lmylib -lmylib2" , you can force it to call make "SOMELIB=-lmylib -lmylib2" , which seems to do the same.
source share