update Purge.list and avoid redundant checks

This commit is contained in:
Axel Kohlmeyer
2023-11-19 08:59:27 -05:00
parent 0487dc5331
commit 3c73882a68
2 changed files with 9 additions and 7 deletions

View File

@ -83,17 +83,17 @@ function(check_for_autogen_files source_dir)
file(GLOB SRC_AUTOGEN_FILES CONFIGURE_DEPENDS ${source_dir}/style_*.h)
file(GLOB SRC_AUTOGEN_PACKAGES CONFIGURE_DEPENDS ${source_dir}/packages_*.h)
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/lmpinstalledpkgs.h ${source_dir}/lmpgitversion.h)
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/mliap_model_python_couple.h ${source_dir}/mliap_model_python_couple.cpp)
list(APPEND SRC_AUTOGEN_FILES ${source_dir}/mliap_model_python_couple.h ${source_dir}/mliap_model_python_couple.cpp)
foreach(_SRC ${SRC_AUTOGEN_FILES})
get_filename_component(FILENAME "${_SRC}" NAME)
if(EXISTS ${source_dir}/${FILENAME})
message(FATAL_ERROR "\n########################################################################\n"
"Found header file(s) generated by the make-based build system\n"
"\n"
"Please run\n"
"make -C ${source_dir} purge\n"
"to remove\n"
"########################################################################")
"Found header file ${source_dir}/${FILENAME} generated by the make-based build system\n"
"\n"
"Please run\n"
"make -C ${source_dir} purge\n"
"to remove\n"
"########################################################################")
endif()
endforeach()
endfunction()

View File

@ -8,6 +8,7 @@ style_compute.h
style_dihedral.h
style_dump.h
style_fix.h
style_gran_sub_mod.h
style_improper.h
style_integrate.h
style_kspace.h
@ -32,6 +33,7 @@ packages_compute.h
packages_dihedral.h
packages_dump.h
packages_fix.h
packages_gran_sub_mod.h
packages_improper.h
packages_integrate.h
packages_kspace.h