only build the voro++ library when downloading

This commit is contained in:
Axel Kohlmeyer
2025-06-04 12:10:58 -04:00
parent ddb6bb2cfb
commit ba8dd4d380
2 changed files with 33 additions and 3 deletions

View File

@ -36,7 +36,7 @@ if(DOWNLOAD_VORO)
URL_MD5 ${VORO_MD5}
PATCH_COMMAND patch -b -p0 < ${LAMMPS_LIB_SOURCE_DIR}/voronoi/voro-make.patch
CONFIGURE_COMMAND ""
BUILD_COMMAND make ${VORO_BUILD_OPTIONS}
BUILD_COMMAND make ${VORO_BUILD_OPTIONS} lib
BUILD_IN_SOURCE 1
INSTALL_COMMAND ""
BUILD_BYPRODUCTS <SOURCE_DIR>/src/libvoro++.a

View File

@ -1,5 +1,35 @@
--- src/Makefile.orig 2020-05-03 03:50:23.501557199 -0400
+++ src/Makefile 2020-05-03 03:53:32.147681674 -0400
--- Makefile.orig 2025-06-04 12:03:44.294110829 -0400
+++ Makefile 2025-06-04 12:06:08.567902578 -0400
@@ -5,7 +5,7 @@
# Date : August 30th 2011
# Tell make that these are phony targets
-.PHONY: all help clean install uninstall
+.PHONY: all lib help clean install uninstall
include config.mk
@@ -14,6 +14,10 @@
$(MAKE) -C src
$(MAKE) -C examples
+# Build only the library
+lib:
+ $(MAKE) -C lib
+
# Build the help files (with Doxygen)
help:
$(MAKE) -C src help
@@ -32,7 +36,6 @@
$(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/man/man1
$(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/include
$(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/include/voro++
- $(INSTALL) $(IFLAGS_EXEC) src/voro++ $(PREFIX)/bin
$(INSTALL) $(IFLAGS) man/voro++.1 $(PREFIX)/man/man1
$(INSTALL) $(IFLAGS) src/libvoro++.a $(PREFIX)/lib
$(INSTALL) $(IFLAGS) src/voro++.hh $(PREFIX)/include/voro++
--- src/Makefile.orig 2025-06-04 12:06:20.968102411 -0400
+++ src/Makefile 2025-06-04 12:06:38.238762875 -0400
@@ -10,10 +10,10 @@
# List of the common source files
objs=cell.o common.o container.o unitcell.o v_compute.o c_loops.o \