From: <ai...@us...> - 2013-08-01 04:00:01
|
Revision: 12460 http://sourceforge.net/p/plplot/code/12460 Author: airwin Date: 2013-08-01 03:59:57 +0000 (Thu, 01 Aug 2013) Log Message: ----------- Implement a build_plplot_lite target (which disables wxwidgets, qt, and cairo device drivers and which therefore has fewer dependencies and builds and tests 5 times as fast). Meanwhile, the build_plplot target now has properly implemented wxwidgets and pango build configuration dependencies, i.e., wxwidgets and pango and their dependencies will be built first, then plplot which will depend on those built and installed results. Tested by Alan W. Irwin <ai...@us...> using both the build_plplot_lite (5 minutes) and build_plplot (25 minutes) targets on Linux. Modified Paths: -------------- trunk/cmake/build_projects/plplot/bp.cmake Modified: trunk/cmake/build_projects/plplot/bp.cmake =================================================================== --- trunk/cmake/build_projects/plplot/bp.cmake 2013-07-31 20:31:09 UTC (rev 12459) +++ trunk/cmake/build_projects/plplot/bp.cmake 2013-08-01 03:59:57 UTC (rev 12460) @@ -35,30 +35,47 @@ endif(plplot_configured) set(plplot_configured ON) -set(plplot_dependencies_LIST +# Distinguish between plplot_lite dependencies and complete dependencies +# for a heavy-duty build of PLplot. +set(plplot_lite_dependencies_LIST libagg libharu libqhull shapelib -# TEMPORARY -# For debugging speed ignore wxwidgets soft dependency of PLplot for -# now. -# wxwidgets ) +# Turn off wxwidgets devices and library, and cairo device drivers for lite version +set(plplot_lite_cmake_args + -DPLD_wxwidgets=OFF + -DENABLE_wxwidgets=OFF + -DDEFAULT_NO_CAIRO_DEVICES:BOOL=ON + -DDEFAULT_NO_QT_DEVICES:BOOL=ON + -DENABLE_qt=OFF + ) + +set(plplot_lite_dependencies_targets) +foreach(build_configuration ${plplot_lite_dependencies_LIST}) + list(APPEND plplot_lite_dependencies_targets build_${build_configuration}) +endforeach(build_configuration ${plplot_lite_dependences_LIST}) + +set(plplot_dependencies_LIST + ${plplot_lite_dependencies_LIST} + wxwidgets + pango + ) + +set(plplot_dependencies_targets) foreach(build_configuration ${plplot_dependencies_LIST}) include(${build_configuration}/bp.cmake) + list(APPEND plplot_dependencies_targets build_${build_configuration}) endforeach(build_configuration ${plplot_dependences_LIST}) +# Leave eveything ON by default for normal plplot. +set(plplot_cmake_args) + # 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. @@ -72,44 +89,48 @@ 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}") +set(tags "" "_lite") +foreach(tag IN LISTS tags) + # 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}${tag}/dll;${BP_PATH_NODLL}") + message(STATUS "Original BP_PATH for ${BP_PACKAGE}${tag} = ${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}${tag} = ${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 - ) + # Build PLplot (or PLplot-lite). 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}${tag} + DEPENDS "${${BP_PACKAGE}${tag}_dependencies_targets}" + #TEMPORARY + DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${PLPLOT_LOCAL_SOURCE_DIR} ${EP_BASE}/Source/build_${BP_PACKAGE}${tag} + CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DBUILD_TEST=ON -DPLD_pdf=ON ${${BP_PACKAGE}${tag}_cmake_args} ${EP_BASE}/Source/build_${BP_PACKAGE}${tag} + 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 - ) + # Add custom commands to the current test step. + add_custom_command( + OUTPUT + ${EP_BASE}/Stamp/build_${BP_PACKAGE}${tag}/build_${BP_PACKAGE}${tag}-test + COMMAND echo made_it_to_extra_test + COMMENT "Test installed examples from ${BP_PACKAGE}${tag}" + 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}") + list(APPEND build_target_LIST build_${BP_PACKAGE}${tag}) + + # Restore BP_PATH to original state. + set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}") + #message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}") +endforeach(tag IN LISTS tags) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |