From e6f76451eb6ba8bfad55ab552c38a79f28c01cb8 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sun, 20 May 2018 07:27:22 -0600 Subject: [PATCH] cmake: fix pkg_depend macro --- cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 5cf3781ade..9e8930565b 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -129,7 +129,7 @@ foreach(PKG ${ACCEL_PACKAGES} ${OTHER_PACKAGES}) endforeach() macro(pkg_depends PKG1 PKG2) - if(PKG_${PKG1} AND NOT PKG_${PKG2}) + if(PKG_${PKG1} AND NOT (PKG_${PKG2} OR BUILD_${PKG2})) message(FATAL_ERROR "${PKG1} package needs LAMMPS to be build with ${PKG2}") endif() endmacro()