[CMake] ADD_CUSTOM_COMMAND Bug

Malhotra, Anupam Anupam.Malhotra at Safenet-inc.com
Thu Feb 14 23:38:14 EST 2008


Thanks a ton Bill. It worked. :)

Thanks and Regards
Anupam Malhotra

-----Original Message-----
From: Bill Hoffman [mailto:bill.hoffman at kitware.com] 
Sent: Thursday, February 14, 2008 12:25 AM
To: Malhotra, Anupam
Cc: Cmake Mailing List
Subject: Re: [CMake] ADD_CUSTOM_COMMAND Bug

Malhotra, Anupam wrote:
> Hi
> 
>  
> 
> I have a ADD_CUSTOM_COMMAND in my CMakeLists.txt. the command looks 
> something like this:
> 
>  
> 
> ADD_CUSTOM_COMMAND(TARGET vpcl POST_BUILD MAIN_DEPENDENCY vpcl COMMAND

> copy ${vpcl_path_updated} "${PROJECT_SOURCE_DIR_UPDATED}" VERBATIM)
> 
> Here ${vpcl_path_updated} is :
"C:\NIGHTLY_BUILD_IMPROVED_TESTING\Visual 
> Studio 6Debug\helpers\vpcl\output\$(IntDir)\vpcl.lib"
> 
>  
> 
> Now when I run cmake and go and check in the Post Build setup, the 
> command showing is:
> 
>  
> 
> copy "C:\NIGHTLY_BUILD_IMPROVED_TESTING\Visual Studio 
> 6Debug\helpers\vpcl\output\"$"(IntDir)\vpcl.lib" 
> "C:\NIGHTLY_BUILD_IMPROVED_TESTING\Visual Studio 6Debug"
> 
>  
> 
> Please notice that $(IntDir) is automatically changed to "$"(IntDir)
in 
> the actual post build setup. Can anyone please tell me if this is a
bug 
> in cmake?

You should be able to use: CMAKE_CFG_INTDIR:

http://www.cmake.org/Wiki/CMake_Useful_Variables

It will expand out to $(IntDir) correctly.
>  
> 
> The information contained in this electronic mail transmission 
> may be privileged and confidential, and therefore, protected 
> from disclosure. If you have received this communication in 
> error, please notify us immediately by replying to this 
> message and deleting it from your computer without copying 
> or disclosing it.
> 
You do realize that you are posting to a public list, please change your

signature.

-Bill
The information contained in this electronic mail transmission 
may be privileged and confidential, and therefore, protected 
from disclosure. If you have received this communication in 
error, please notify us immediately by replying to this 
message and deleting it from your computer without copying 
or disclosing it.




More information about the CMake mailing list