Each of my CMake projects deposits its results in a results directory. I
set this up like this:



# Set up results dir.
add_custom_command(
    COMMENT "Creating results dir ${${PROJECT_NAME}_RESULTS}"
    OUTPUT ${${PROJECT_NAME}_RESULTS}
    COMMAND ${CMAKE_COMMAND} -E make_directory ${${PROJECT_NAME}_RESULTS}
)
add_custom_target(
    ${PROJECT_NAME}_results
    DEPENDS ${${PROJECT_NAME}_RESULTS}
)


The directory is created correctly on both Windows (Vista 64, Visual
Studio 2005) and Linux (gmake).

On Linux, when I do "make clean", it correctly deletes the results
directory and all of its contents.

On Windows, I get this error:



1>------ Clean started: Project: SV.h, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'SV.h', configuration 
'Debug|Win32'
1>SV.h : error PRJ0008 : Could not delete file 
'c:\demo2\sdk\trunk\internalheaders\sv\_results'.
1>Make sure that the file is not open by another process and is not 
write-protected.
1>SV.h - 1 error(s), 0 warning(s)


The directory is not write-protected (permissions look normal and I can
delete it just fine by hand) and AFAICT it is not in use by another
process (unless Visual Studio is somehow holding onto it, but that seems
inane even for Visual Studio). 

Am I doing something wrong? What other things can I look at to determine
the source of this problem?

Thanks,
tyler
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to