[Cmake] Re: Escape Characters VS and Unix

William A. Hoffman billlist at nycap.rr.com
Tue Aug 10 09:36:44 EDT 2004


The escaping is not the problem.  The variable $(InputDir) is part
of the visual studio IDE, and is not part of CMake, and would not be
expanded on Unix.

To be portable you should use the project_SOURCE_DIR and project_BINARY_DIR 
variables that cmake defines.  For example:

ADD_CUSTOM_COMMAND(OUTPUT
  ${bit_streamer_BINARY_DIR}/AddressTableParser.cpp 
  COMMAND java
  ARGS -classpath ${THIRD_PARTY_PATH}lib/vc/antlr.jar antlr.Tool -o
  ${bit_streamer_BINARY_DIR}   ${bit_streamer_SOURCE_DIR}/AddressTable.g
  MAIN_DEPENDENCY ${bit_streamer_SOURCE_DIR}/AddressTable.g
  )

-Bill

At 09:01 AM 8/10/2004, Andrew Dupont wrote:

>Bill,
>
>        I was using $\(InputDir\) etc, because when getting the command
>into the visual studio project a quoted string carried with it the
>quotes. Would the escape character show up in unix makefiles? If so is
>there an alternative that allows me to actually store that string?
>
>Thanks,
>Andy



More information about the Cmake mailing list