[CMake] Problem in ADD_CUSTOM_COMMAND

Malhotra, Anupam Anupam.Malhotra at Safenet-inc.com
Mon Feb 11 06:32:50 EST 2008


I tried this command. Now it is not giving any error but the file is not
actually copied. I printed the value of vpcl_path. It is showing that
as:

C:/NIGHTLY_BUILD_IMPROVED_TESTING/Visual Studio
6Debug/output/$(IntDir)/vpcl.lib

Please advice. Thanks in advance.

Thanks and Regards
Anupam Malhotra


-----Original Message-----
From: Sylvain Benner [mailto:benner at virtools.com] 
Sent: Monday, February 11, 2008 4:42 PM
To: Malhotra, Anupam
Cc: cmake at cmake.org
Subject: Re: [CMake] Problem in ADD_CUSTOM_COMMAND

I missed the additional quotes, the correct command is :

ADD_CUSTOM_COMMAND(TARGET vpcl POST_BUILD COMMAND copy 
"\"${vpcl_path}\"" "\"${PROJECT_SOURCE_DIR}\"" VERBATIM)

This is a common rule in CMake script, when you want to pass an 
argument, always use quotes to be sure it will not be split into several

arguments due to spaces or some other characters.

--Sylvain

------------------------------------------------------------------------
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