Simplify CMake script

This commit is contained in:
Richard Berger 2017-08-20 10:49:30 -04:00
parent c9d41dbb47
commit aef2416ece
2 changed files with 3 additions and 13 deletions

View File

@ -337,12 +337,7 @@ foreach(PKG ${DEFAULT_PACKAGES} ${OTHER_PACKAGES})
foreach(PKG_FILE in ${${PKG}_SOURCES})
get_filename_component(FNAME ${PKG_FILE} NAME)
list(FIND LIB_SOURCES ${LAMMPS_SOURCE_DIR}/${FNAME} IDX)
if(NOT (IDX LESS 0))
#message("Ignoring ${PKG_FILE}...")
list(REMOVE_AT LIB_SOURCES ${IDX})
endif()
list(REMOVE_ITEM LIB_SOURCES ${LAMMPS_SOURCE_DIR}/${FNAME})
endforeach()
foreach(PKG_FILE in ${${PKG}_HEADERS})

View File

@ -87,13 +87,8 @@ endfunction(RegisterStyles)
function(RemovePackageHeader headers pkg_header)
get_property(hlist GLOBAL PROPERTY ${headers})
list(FIND hlist ${pkg_header} idx)
if(NOT (idx LESS 0))
list(REMOVE_AT hlist ${idx})
#message("Ignoring ${pkg_header}...")
set_property(GLOBAL PROPERTY ${headers} "${hlist}")
endif()
list(REMOVE_ITEM hlist ${pkg_header})
set_property(GLOBAL PROPERTY ${headers} "${hlist}")
endfunction(RemovePackageHeader)
function(DetectAndRemovePackageHeader fname)