Skip to content
Snippets Groups Projects
Unverified Commit e5410746 authored by Steve Plimpton's avatar Steve Plimpton Committed by GitHub
Browse files

Merge pull request #1050 from rbberger/fix_shared_lib_voro_build

Generate Position Independent Code in ExternalProject Voro when necessary
parents 28c03e45 b9e2b26b
No related branches found
No related tags found
No related merge requests found
......@@ -310,10 +310,17 @@ if(PKG_VORONOI)
option(DOWNLOAD_VORO "Download voro++ (instead of using the system's one)" OFF)
if(DOWNLOAD_VORO)
include(ExternalProject)
if(BUILD_SHARED_LIBS)
set(VORO_BUILD_OPTIONS "CFLAGS=-fPIC")
else()
set(VORO_BUILD_OPTIONS)
endif()
ExternalProject_Add(voro_build
URL http://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz
URL_MD5 2338b824c3b7b25590e18e8df5d68af9
CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 INSTALL_COMMAND ""
CONFIGURE_COMMAND "" BUILD_COMMAND make ${VORO_BUILD_OPTIONS} BUILD_IN_SOURCE 1 INSTALL_COMMAND ""
)
ExternalProject_get_property(voro_build SOURCE_DIR)
set(VORO_LIBRARIES ${SOURCE_DIR}/src/libvoro++.a)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment