From: <ai...@us...> - 2013-07-31 02:14:24
|
Revision: 12446 http://sourceforge.net/p/plplot/code/12446 Author: airwin Date: 2013-07-31 02:14:21 +0000 (Wed, 31 Jul 2013) Log Message: ----------- Configure additional features for build configurations (typically those from jhbuild build configuration data collected from GTK+) that are generated by configure_bp.cmake. Those features include improved processing of dependencies (ignoring specific dependencies (mostly dependencies which can be assumed to be part of the normal build tools) contained in a list in configure_bp.cmake and dropping all dependencies which don't have a build configuration yet) and configuring the configure script arguments and the make command arguments. Modified Paths: -------------- trunk/cmake/build_projects/configure_bp.cmake trunk/cmake/build_projects/template.bp.in Modified: trunk/cmake/build_projects/configure_bp.cmake =================================================================== --- trunk/cmake/build_projects/configure_bp.cmake 2013-07-31 01:54:31 UTC (rev 12445) +++ trunk/cmake/build_projects/configure_bp.cmake 2013-07-31 02:14:21 UTC (rev 12446) @@ -1,24 +1,61 @@ cmake_policy(SET CMP0007 NEW) + +# List of dependencies (mostly these are build-tools) which should be +# ignored. +set(ignored_dependencies_LIST + # build tools + pkg-config + bison + flex + python2-devel + # dependencies which we want to ignore + # (none so far). +) + file(STRINGS ${FILENAME} lines) list(LENGTH lines nlines) # There are currently groups of 9 lines for each # gtk software package specifying the required # build-configuration information. -set(group_size 9) -set(remove_indices 0 1 2 3 4 5 6 7 8) +set(group_size 12) +set(remove_indices 0 1 2 3 4 5 6 7 8 9 10 11) math(EXPR max_index "(${nlines}/${group_size}) - 1") foreach(index RANGE 0 ${max_index}) list(GET lines 0 package) list(GET lines 1 config_type) - list(GET lines 2 config_arguments) - list(GET lines 3 download_hash_type) - list(GET lines 4 download_hash) - list(GET lines 5 download_href) - list(GET lines 6 dependencies) - list(GET lines 7 suggests) - list(GET lines 8 after) + list(GET lines 2 supports_non_srcdir_builds) + list(GET lines 3 supports_parallel_builds) + list(GET lines 4 config_arguments) + list(GET lines 5 make_arguments) + list(GET lines 6 download_hash_type) + list(GET lines 7 download_hash) + list(GET lines 8 download_href) + list(GET lines 9 dependencies) + list(GET lines 10 suggests) + list(GET lines 11 after) list(REMOVE_AT lines ${remove_indices}) + if(supports_non_srcdir_builds) + set(BUILD_IN_SOURCE OFF) + else(supports_non_srcdir_builds) + set(BUILD_IN_SOURCE ON) + endif(supports_non_srcdir_builds) + + if(supports_parallel_builds) + set(BUILD_COMMAND BP_PARALLEL_MAKE_COMMAND) + else(supports_parallel_builds) + set(BUILD_COMMAND BP_MAKE_COMMAND) + endif(supports_parallel_builds) + + # Extra CFLAGS fixups for individual packages. + if(package STREQUAL "glib") + set(MSYS_EXTRA_CFLAGS "-march=native ") + set(UNIX_EXTRA_CFLAGS) + else(package STREQUAL "glib") + set(MSYS_EXTRA_CFLAGS) + set(UNIX_EXTRA_CFLAGS) + endif(package STREQUAL "glib") + # Turn colon-separated lists into official CMake lists. string(REGEX REPLACE ":" ";" dependencies "${dependencies}") string(REGEX REPLACE ":" ";" suggests "${suggests}") Modified: trunk/cmake/build_projects/template.bp.in =================================================================== --- trunk/cmake/build_projects/template.bp.in 2013-07-31 01:54:31 UTC (rev 12445) +++ trunk/cmake/build_projects/template.bp.in 2013-07-31 02:14:21 UTC (rev 12446) @@ -30,20 +30,29 @@ endif(@package@_configured) set(@package@_configured ON) +# List of dependencies (most of which are build tools) which should be +# ignored. +set(BP_ignored_dependencies_LIST @ignored_dependencies_LIST@) + set(@package@_dependencies_LIST @dependencies@) +# Remove dependencies that should be ignored. +if(@package@_dependencies_LIST) + list(REMOVE_ITEM @package@_dependencies_LIST ${BP_ignored_dependencies_LIST}) +endif(@package@_dependencies_LIST) +set(@package@_dependencies_targets) foreach(build_configuration ${@package@_dependencies_LIST}) - include(${build_configuration}/bp.cmake) + if(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake) + include(${build_configuration}/bp.cmake) + list(APPEND @package@_dependencies_targets build_${build_configuration}) + else(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake) + message(STATUS "Warning: A build_configuration for ${build_configuration} does not exist so it is assumed this dependency of @package@ has been installed another way.") + endif(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake) endforeach(build_configuration ${@package@_dependences_LIST}) # This can be safely done only after above includes. set(BP_PACKAGE @package@) -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 @download_href@) set(${BP_PACKAGE}_DOWNLOAD_HASH_TYPE @download_hash_type@) @@ -68,9 +77,10 @@ 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} ${${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 + CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${${BP_PACKAGE}_SET_CFLAGS} ${source_PATH}/${BP_CONFIGURE_COMMAND} @config_arguments@ + BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${@BUILD_COMMAND@} @make_arguments@ + BUILD_IN_SOURCE @BUILD_IN_SOURCE@ + INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${@BUILD_COMMAND@} @make_arguments@ install ) list(APPEND build_target_LIST build_${BP_PACKAGE}) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |