[CMake] Win32 style directory names and adding dependencies to clean

William A. Hoffman billlist at nycap.rr.com
Mon Sep 12 09:40:58 EDT 2005


You may want to look at using cmake -E as the CMD.
There is a remove file, and the path input is always UNIX style.
There is no remove directory, but there is a chdir cmd.

There is no way to add to the clean target, but you can add additional
files to clean with the ADDITIONAL_MAKE_CLEAN_FILES directory property:

SET_DIRECTORY_PROPERTIES(PROPERTIES
  ADDITIONAL_MAKE_CLEAN_FILES "${ToClean_BINARY_DIR}/Registered.txt")

-Bill



At 01:46 AM 9/10/2005, Shishir Ramam wrote:
>Hi,
>I have two questions - 
>1. When adding a custom command, of the form 
>    ADD_CUSTOM_COMMAND(
>        OUTPUT       NAME
>        COMMAND   ${CMD}
>        ARGS ${DIR4WORK}
>    )
>   ${CMD} and ${DIR4WORK} are path names that are constructed 
>   before adding this command. Now the problem that I have is that
>   while ${CMD} has all '/' translated to '\' in the Makefile (Nmake), 
>   but the ${DIR4WORK} does not. Depending on what the commands
>   are, this does not work in the command shell. 
>
>2. I'd like to add a command to delete some directories created in 
>    my configuration. I'd like to add a dependency to the target clean. 
>    What is the best way to do this? I couldn't seem to find anything 
>    on the wiki. 
>
>Thanks in advance for all help.
>
>-shishir
>
>
>-- 
>It is not because things are difficult that we do not dare, 
>it is because we do not dare that things are difficult. 
>- Seneca
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list