diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index e5eec31ebb0b23ef3f8a8a9ebb085a464c8d6eb1..3dc1dac00c76b675a49a2b3b7ffc577a96dce816 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -34,19 +34,19 @@ list(APPEND SRC_AUTOGEN_FILES ${LAMMPS_SOURCE_DIR}/lmpinstalledpkgs.h) foreach(_SRC ${SRC_AUTOGEN_FILES}) get_filename_component(FILENAME "${_SRC}" NAME) if(EXISTS ${LAMMPS_SOURCE_DIR}/${FILENAME}) - message(FATAL_ERROR "\nFound file(s) generated by the make-based build system.\nPlease run 'make -C ${LAMMPS_SOURCE_DIR} purge'") + message(FATAL_ERROR "\nFound header file(s) generated by the make-based build system.\nPlease run 'make -C ${LAMMPS_SOURCE_DIR} purge' to remove") endif() endforeach() -# check for files installed by make-based buildsystem -# only run this time consuming check if there are new files +# check for files from packages installed by the make-based buildsystem +# this is slow, so only run this check if there are new files if(NOT SRC_FILES STREQUAL SRC_FILES_CACHED) file(GLOB SRC_PKG_FILES ${LAMMPS_SOURCE_DIR}/*/*.cpp) message(STATUS "Running check for packages installed with 'make yes-<package>' (this may take a while)") foreach(_SRC ${SRC_PKG_FILES}) get_filename_component(FILENAME "${_SRC}" NAME) if(EXISTS ${LAMMPS_SOURCE_DIR}/${FILENAME}) - message(FATAL_ERROR "\nFound package(s) installed by the make-based build system\nPlease run 'make -C ${LAMMPS_SOURCE_DIR} no-all purge'") + message(FATAL_ERROR "\nFound package(s) installed by the make-based build system\nPlease run 'make -C ${LAMMPS_SOURCE_DIR} no-all purge' to uninstall") endif() endforeach() set(SRC_FILES_CACHED "${SRC_FILES}" CACHE INTERNAL "List of file in LAMMPS_SOURCE_DIR" FORCE)