|
From: <ai...@us...> - 2013-07-01 04:15:58
|
Revision: 12399
http://sourceforge.net/p/plplot/code/12399
Author: airwin
Date: 2013-07-01 04:15:56 +0000 (Mon, 01 Jul 2013)
Log Message:
-----------
Implement plplot build.
Modified Paths:
--------------
trunk/cmake/build_projects/CMakeLists.txt
trunk/cmake/build_projects/plplot/bp.cmake
Modified: trunk/cmake/build_projects/CMakeLists.txt
===================================================================
--- trunk/cmake/build_projects/CMakeLists.txt 2013-07-01 04:14:16 UTC (rev 12398)
+++ trunk/cmake/build_projects/CMakeLists.txt 2013-07-01 04:15:56 UTC (rev 12399)
@@ -208,9 +208,9 @@
libharu
libqhull
ndiff
-# plplot
+ plplot
shapelib
-# wxwidgets
+ wxwidgets
)
foreach(build_configuration ${build_configuration_LIST})
Modified: trunk/cmake/build_projects/plplot/bp.cmake
===================================================================
--- trunk/cmake/build_projects/plplot/bp.cmake 2013-07-01 04:14:16 UTC (rev 12398)
+++ trunk/cmake/build_projects/plplot/bp.cmake 2013-07-01 04:15:56 UTC (rev 12399)
@@ -25,29 +25,91 @@
# operate.
# Configure build of PLplot dependencies.
-set(BP_PACKAGE plplot)
+# N.B. early stanzas of this logic before the includes
+# cannot set or use the BP_PACKAGE variable since the includes
+# reset that.
# Protect against configuring a build twice in one CMake call
-if(${BP_PACKAGE}_configured)
+if(plplot_configured)
return()
-endif(${BP_PACKAGE}_configured)
-set(${BP_PACKAGE}_configured ON)
+endif(plplot_configured)
+set(plplot_configured ON)
-include(shapelib/bp.cmake)
-include(libqhull/bp.cmake)
-include(libharu/bp.cmake)
-include(libagg/bp.cmake)
+set(plplot_dependencies_LIST
+ libagg
+ libharu
+ libqhull
+ shapelib
+# TEMPORARY
+# For debugging speed ignore wxwidgets soft dependency of PLplot for
+# now.
+# wxwidgets
+)
-# Build PLplot itself.
-# (Not implemented yet, but create empty custom target with correct
-# target dependencies as if that target were actually a PLplot build).
-add_custom_target(build_plplot)
-add_dependencies(build_plplot
- build_shapelib
- build_libqhull
- build_libharu
- build_libagg
+foreach(build_configuration ${plplot_dependencies_LIST})
+ include(${build_configuration}/bp.cmake)
+endforeach(build_configuration ${plplot_dependences_LIST})
+
+# This can be safely done only after above includes.
+set(BP_PACKAGE plplot)
+
+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})
+message(STATUS "${BP_PACKAGE}_dependencies_targets = ${${BP_PACKAGE}_dependencies_targets}")
+
+# Note could retrieve the latest release, but that is pretty dated.
+# So ideally, would use a subversion client to get the trunk version,
+# but that means (on Windows) you must build a subversion client.
+# That build (of the apache version of subversion) should be
+# straightforward assuming wget (available both for Unix and MSYS) is
+# installed. So I think ultimately a build of a subversion client
+# will be configured and available for all platforms. But for now
+# just use a local directory where the trunk version of PLplot has
+# been recently updated.
+# TEMPORARY
+set(PLPLOT_LOCAL_SOURCE_DIR /home/software/${BP_PACKAGE}_svn/HEAD/${BP_PACKAGE}_allura)
+file(TO_NATIVE_PATH ${PLPLOT_LOCAL_SOURCE_DIR} PLPLOT_LOCAL_SOURCE_DIR)
+
+# Data that is related to the PATH that must be used.
+if(MSYS_PLATFORM)
+ set(BP_PATH_NODLL "${BP_PATH}")
+ set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
+ message(STATUS "Original BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
+ determine_msys_path(BP_PATH "${BP_PATH}")
+ # TEMPORARY (already in the _required_ native form for the cmake -E
+ # copy_directory command below except for the drive letter which is
+ # z: for this local result.)
+ set(PLPLOT_LOCAL_SOURCE_DIR z:${PLPLOT_LOCAL_SOURCE_DIR})
+endif(MSYS_PLATFORM)
+message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
+
+# Build PLplot itself. The pdf device is turned on since the haru library
+# is built with a fix to avoid segfaults for example 24.
+ExternalProject_Add(
+ build_${BP_PACKAGE}
+ DEPENDS "${${BP_PACKAGE}_dependencies_targets}"
+ #TEMPORARY
+ DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${PLPLOT_LOCAL_SOURCE_DIR} ${EP_BASE}/Source/build_${BP_PACKAGE}
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DBUILD_TEST=ON -DPLD_pdf=ON ${EP_BASE}/Source/build_${BP_PACKAGE}
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
+ INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
+ TEST_BEFORE_INSTALL OFF
+ TEST_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} test_noninteractive
+ STEP_TARGETS configure build install test
)
+# Add custom commands to the current test step.
+add_custom_command(
+ OUTPUT
+ ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-test
+ COMMAND echo made_it_to_extra_test
+ COMMENT "Test installed examples from ${BP_PACKAGE}"
+ APPEND
+ )
-
+list(APPEND build_target_LIST build_${BP_PACKAGE})
+# Restore BP_PATH to original state.
+set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
+#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|