Hi All,
I have a situation where I need to:
- create some dirs in the build directory
- create symlinks to the above dirs in the source directory
The creation part works well, I'm using add_custom_command(OUTPUT
...) and add_custom_target() which depends onthe output of custom
command. The cmake_clean.cmake is shown below. However, when I run 'make
clean' which finaly runs 'cmake -P
CMakeFiles/Test_dirs.dir/cmake_clean.cmake', the first invocation of
'make clean' only removes the dirs from the build dir. I have to run
'make clean' a second time to get rid of the symlinks that were created
in the source dir.
Does anybody know how to fix the situation, I'd like a single
invocation of 'make clean' to delete the dirs in the build directory as
well as the symlinks in the source dir.
TIA,
Ashok
$cat CMakeFiles/Test_dirs.dir/cmake_clean.cmake
FILE(REMOVE_RECURSE
"CMakeFiles/Test_dirs"
"/local/mnt/workspace/ashoknn/Test/libs"
"/local/mnt/workspace/ashoknn/Test/obj"
"/local/mnt/workspace/ashoknn/Test/bin"
"/local/mnt/workspace/ashoknn/Test/gen"
"libs"
"obj"
"bin"
"gen"
)
# Per-language clean rules from dependency scanning.
FOREACH(lang)
INCLUDE(CMakeFiles/Test_dirs.dir/cmake_clean_${lang}.cmake OPTIONAL)
ENDFOREACH(lang)
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake