|
From: <ai...@us...> - 2013-07-29 17:44:45
|
Revision: 12441
http://sourceforge.net/p/plplot/code/12441
Author: airwin
Date: 2013-07-29 17:44:42 +0000 (Mon, 29 Jul 2013)
Log Message:
-----------
Add template results for dependencies and extra CFLAGS. libffi has
none of those so the extra CMake code that is configured
should have no effect for libffi.
Tested by: Alan W. Irwin <ai...@us...> using the
build_libffi target (or build_glib target that depends on the
build_libffi target) for both Linux and "MSYS Makefiles" on Wine. In
the latter case there was a popup error box with the last command
executed being the install script. But when I ran that command by hand
afterwards everything worked fine. I suspect this intermittent error
is due to a race condition for parallel builds so I will try turning
off parallel builds for libffi for future tests.
Modified Paths:
--------------
trunk/cmake/build_projects/libffi/bp.cmake
Modified: trunk/cmake/build_projects/libffi/bp.cmake
===================================================================
--- trunk/cmake/build_projects/libffi/bp.cmake 2013-07-29 17:37:32 UTC (rev 12440)
+++ trunk/cmake/build_projects/libffi/bp.cmake 2013-07-29 17:44:42 UTC (rev 12441)
@@ -24,14 +24,26 @@
# used below that configure how the External_Project functions
# operate.
-set(BP_PACKAGE libffi)
-
# Protect against configuring a build twice in one CMake call
-if(${BP_PACKAGE}_configured)
+if(libffi_configured)
return()
-endif(${BP_PACKAGE}_configured)
-set(${BP_PACKAGE}_configured ON)
+endif(libffi_configured)
+set(libffi_configured ON)
+set(libffi_dependencies_LIST )
+
+foreach(build_configuration ${libffi_dependencies_LIST})
+ include(${build_configuration}/bp.cmake)
+endforeach(build_configuration ${libffi_dependences_LIST})
+
+# This can be safely done only after above includes.
+set(BP_PACKAGE libffi)
+
+set(${BP_PACKAGE}_dependencies_targets)
+foreach(build_configuration ${${BP_PACKAGE}_dependencies_LIST})
+ list(APPEND ${BP_PACKAGE}_dependencies_targets build_${build_configuration})
+endforeach(build_configuration ${${BP_PACKAGE}_dependences_LIST})
+
# Data that is related to downloads.
set(${BP_PACKAGE}_URL ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz)
set(${BP_PACKAGE}_DOWNLOAD_HASH_TYPE SHA256)
@@ -44,16 +56,19 @@
determine_msys_path(BP_PATH "${BP_PATH}")
# Must have all elements of env command in MSYS platform form
determine_msys_path(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}")
+ set(${BP_PACKAGE}_SET_CFLAGS "CFLAGS=$ENV{CFLAGS}")
else(MSYS_PLATFORM)
set(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}")
+ set(${BP_PACKAGE}_SET_CFLAGS "CFLAGS=$ENV{CFLAGS}")
endif(MSYS_PLATFORM)
#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
ExternalProject_Add(
build_${BP_PACKAGE}
+ DEPENDS ${${BP_PACKAGE}_dependencies_targets}
URL ${${BP_PACKAGE}_URL}
URL_HASH ${${BP_PACKAGE}_DOWNLOAD_HASH_TYPE}=${${BP_PACKAGE}_DOWNLOAD_HASH}
- CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${source_PATH}/${BP_CONFIGURE_COMMAND}
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${${BP_PACKAGE}_SET_CFLAGS} ${source_PATH}/${BP_CONFIGURE_COMMAND}
BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND}
INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND} install
)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|