[CMake] VS.NET generation...

William A. Hoffman billlist at nycap.rr.com
Wed Nov 10 15:24:33 EST 2004


For makefiles CMAKE_CFG_INTDIR = .
For visual studio CMAKE_CFG_INTDIR  = $(IntDir)

I think in your case you will have to do this:

IF(CMAKE_CONFIGURATION_TYPES)
  SET(MY_EXE ${EXEDIR}/${CMAKE_CFG_INTDIR}/${cpFile})
ELSE(CMAKE_CONFIGURATION_TYPES)
  SET(MY_EXE ${EXEDIR}/${cpFile})
ENDIF(CMAKE_CONFIGURATION_TYPES)

The "." trick will not work for this case since you are depending 
on a make rule that uses this path.   

-Bill

At 03:10 PM 11/10/2004, Lars Pechan wrote:
>Hi Brad,
>sorry, still not entirely clear on this. If I use what you suggested
>
>${EXEDIR}${CMAKE_CFG_INTDIR}/${CMDS}
>
>I end up with file references looking like this:
>
>   Building Custom command D:/XXDev.nmake/exe./cmds.xml...
>
>Now this actually does work but I think it looks a bit dodgy with the '.' appended to the exe directory. From this I gather that CMAKE_CFG_INTDIR evaluates to '.', not "/.". Otherwise I would have expected to see the generated code as D:/XXDev.nmake/exe/./cmds.xml?
>
>Can you please verify that this is indeed correct?
>
>Thanks,
>
>/Lars
>
>
>
>----- Original Message ----- From: "Brad King" <brad.king at kitware.com>
>To: "Lars Pechan" <lars.pechan at parkerpechan.com>
>Cc: <cmake at www.cmake.org>
>Sent: Thursday, November 11, 2004 12:45 AM
>Subject: Re: [CMake] VS.NET generation...
>
>
>>Lars Pechan wrote:
>>>ADD_CUSTOM_COMMAND(
>>>  OUTPUT ${EXEDIR}/${CMAKE_CFG_INTDIR}/${cpFile}
>>>  COMMAND ${CMAKE_COMMAND}
>>>  ARGS -E copy ${GENDIR}/${cpFile} ${EXEDIR}/${CMAKE_CFG_INTDIR}/${cpFile}
>>>  DEPENDS ${GENDIR}/${cpFile}
>>>)
>>[snip]
>>>Is there a way I can explicitly set CMAKE_CFG_INTDIR in some carefully chosen location to some other value than '\.' to see if that helps?
>>
>>The "proper" way to use CMAKE_CFG_INTDIR is like this:
>>
>>OUTPUT ${EXEDIR}${CMAKE_CFG_INTDIR}/${cpFile}
>>
>>Note the missing "/" character.  It really evaluates to "/." or "/Debug", etc. so the slash will be added.
>>
>>-Brad
>
>_______________________________________________
>CMake mailing list
>CMake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list