diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d3af3d..14ecdb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,23 +132,49 @@ add_subdirectory(docs ${CMAKE_BINARY_DIR}/docs-build) # --------------------------------------------------------------------- # Clean # --------------------------------------------------------------------- -# clean removes what the build produced: the artifact directories, the -# generated documentation, and the test scratch areas. -# -# The generated build system stays. CMakeCache.txt, the makefiles, -# CMakeFiles/, and the CMake file API directory under .cmake/ are what an -# IDE reads to know the project's targets exist; deleting them leaves the -# directory unconfigured, so every target in the IDE stops resolving until -# the project is reloaded. Removing the build system is what configuring a -# fresh directory is for. +# clean removes everything the build produced and leaves the configured +# build system in place, so the next build proceeds from the directory +# as it stands. set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_CLEAN_FILES - ${DPM_TEST_RESULTS_DIR} - ${CMAKE_BINARY_DIR}/Testing + # Build artifacts. ${CMAKE_BINARY_DIR}/bin ${CMAKE_BINARY_DIR}/lib ${CMAKE_BINARY_DIR}/modules ${DPM_TEST_DIR} ${DPM_DOCS_DIR} + + # Test scratch areas. + ${DPM_TEST_RESULTS_DIR} + ${CMAKE_BINARY_DIR}/Testing +) + +# distclean empties the build directory, the generated build system +# included, leaving what a freshly created directory holds: nothing. +# +# It is a terminal operation. Nothing inside the directory can drive a +# build afterwards, so the next step is `cmake -B