[CMake] ADD_CUSTOM_COMMAND-question

Bill Hoffman bill.hoffman at kitware.com
Wed Mar 5 09:03:22 EST 2008


Steven Van Ingelgem wrote:
> Hi,
> 
> 
> I am under Windows (VS2003).
> 
> If I run "ADD_CUSTOM_COMMAND", does the "COMMAND" run like a "cmd"
> environment? In particular looking at the PATH variable?
> 
> I ask this because the output of my script indicates it cannot find
> "perl", which is perfectly accessible because I added it to the
> environment variables for both the user and everyone.
> 
> Is there somehow I can fix this or is this an issue with CMake?
> 
The best thing to do would be to use find_program to find perl, then use 
a full path to Perl in the custom command.   PATH's can change and are 
often different inside IDE's.   Full paths always work.

-Bill


More information about the CMake mailing list