CMake: How to store the SVN path in a variable? -
I am trying to store the output of the following command in a semicolon variable:
< Code> Svn info | GRP URL | Ukra-F 'url:' '{print $ 2}' 'The purpose of removing the ULR is: From the beginning of the output, so that the
awk final string There will be a URL starting with
http . Then I tried the following in the CMAC file:
EXECUTE_PROCESS (COMMAND svn info $ {CMAKE_SOURCE_DIR} COMMAND grep URL COMMAND awk -F 'URL:' '{print $ 2}' OUTPUT_VARIABLE SVNPATH)
But I got the following syntax error:
awk: cmd line: 1: $ 2} '' awk: cmd line: 1: ^ Syntax error
awk: cmd line: 1: $ 2} '' awk: cmd line: 1: ^ invalid char '' 'expression in expressionHow do I issue this issue Can i solve
This code works for me, can you try it? (Definitely change
echo with
svn info
EXECUTE_PROCESS (COMMAND echo "URL: http: // blabla" COMMAND grep URL COMMAND awk -F "URL:" "{print $ 2}" OUTPUT_VARIABLE SVNPATH) Message (status "EXEC: $ {SVNPATH}")
Comments
Post a Comment