Don't remove original files from in-source trees

If we are building in-source, some files are not copied because they
would end up being the same, e.g. GNUmakefile.
This commit is contained in:
Roland Kaufmann 2013-02-14 20:47:55 +01:00
parent cbd78d9cc2
commit b412acb448

View File

@ -25,7 +25,6 @@ macro (opm_dist_clean opm)
Doxyfile Doxyfile
CTestTestfile.cmake CTestTestfile.cmake
DartConfiguration.tcl DartConfiguration.tcl
GNUmakefile
lib/${${opm}_LIBTOOL_ARCHIVE} lib/${${opm}_LIBTOOL_ARCHIVE}
${${opm}_DEBUG} ${${opm}_DEBUG}
${tests_DEBUG} ${tests_DEBUG}
@ -34,6 +33,12 @@ macro (opm_dist_clean opm)
install_manifest.txt install_manifest.txt
${${opm}_STYLESHEET_COPIED} ${${opm}_STYLESHEET_COPIED}
) )
# only remove these files if they were actually copied
if (NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
list (APPEND DISTCLEAN_FILES
GNUmakefile
)
endif (NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
# script to remove empty directories (can't believe this isn't included!) # script to remove empty directories (can't believe this isn't included!)
set (rmdir "${PROJECT_SOURCE_DIR}/cmake/Scripts/RemoveEmptyDir.cmake") set (rmdir "${PROJECT_SOURCE_DIR}/cmake/Scripts/RemoveEmptyDir.cmake")
add_custom_target (distclean add_custom_target (distclean