From: <ai...@us...> - 2011-11-29 22:47:50
|
Revision: 12069 http://plplot.svn.sourceforge.net/plplot/?rev=12069&view=rev Author: airwin Date: 2011-11-29 22:47:37 +0000 (Tue, 29 Nov 2011) Log Message: ----------- Remove CMake-2.6 logic from our build system(s) since the minimum version of CMake we allow is 2.8.2 for Linux and 2.8.6 for all other platforms. These changes are intrusive, but they have been successfully tested with the four tests (test_noninteractive for the three different trees and ctest for the shared build case) given by scripts/comprehensive_test.sh --do_test_interactive no \ --do_nondynamic no --do_static no The remaining 17 tests (test_interactive for the three different trees for the shared library case and all 7 tests for both the nondynamic and static build cases) should be orthogonal to the above changes so the four tests above should have adequate coverage of these changes. Modified Paths: -------------- trunk/CMakeLists.txt trunk/cmake/modules/language_support.cmake trunk/examples/CMakeLists.txt trunk/plplot_test/CMakeLists.txt Removed Paths: ------------- trunk/cmake/modules/language_support/cmake-2.6/ Modified: trunk/CMakeLists.txt =================================================================== --- trunk/CMakeLists.txt 2011-11-29 21:03:33 UTC (rev 12068) +++ trunk/CMakeLists.txt 2011-11-29 22:47:37 UTC (rev 12069) @@ -65,19 +65,11 @@ set(PACKAGE plplot) # Locations where PLplot cmake build system first looks for cmake modules. -if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(CMAKE_MODULE_PATH - ${PROJECT_SOURCE_DIR}/cmake/modules - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.6 - ) -else(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(CMAKE_MODULE_PATH - ${PROJECT_SOURCE_DIR}/cmake/modules - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.8 - ) -endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) +set(CMAKE_MODULE_PATH + ${PROJECT_SOURCE_DIR}/cmake/modules + ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake + ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.8 + ) # We need the path to the MinGW/Borland compiler in order to find # the import libraries for system libraries. Modified: trunk/cmake/modules/language_support.cmake =================================================================== --- trunk/cmake/modules/language_support.cmake 2011-11-29 21:03:33 UTC (rev 12068) +++ trunk/cmake/modules/language_support.cmake 2011-11-29 22:47:37 UTC (rev 12069) @@ -14,20 +14,27 @@ set(text "project(test C) # Locations where PLplot cmake build system first looks for cmake modules. -if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(CMAKE_MODULE_PATH - ${PROJECT_SOURCE_DIR}/cmake/modules - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.6 +set(CMAKE_MODULE_PATH + ${PROJECT_SOURCE_DIR}/cmake/modules + ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake + ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.8 ) -else(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(CMAKE_MODULE_PATH - ${PROJECT_SOURCE_DIR}/cmake/modules - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.8 - ) -endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) -cmake_minimum_required(VERSION 2.6.0) +if(CMAKE_SYSTEM_NAME STREQUAL \"Linux\") + # We prefer to support only the latest CMake version because it + # tends to be more free of issues and more consistent with recent + # software releases of software that PLplot depends on than earlier versions. + # However, as a special concession to our modern (not enterprise or + # LTS) Linux distro users so they can avoid a download of recent CMake, + # we allow them to use the system version of + # CMake which at this time (2011-10) is typically 2.8.2 or later. + cmake_minimum_required(VERSION 2.8.2 FATAL_ERROR) +else(CMAKE_SYSTEM_NAME STREQUAL \"Linux\") + # For non-Linux platforms we prefer to support only the most recent + # CMake version since that tends to be most free of issues and most + # consistent with releases of software that PLplot depends on. The + # most recently released CMake is 2.8.6 at this time (2011-10). + cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR) +endif(CMAKE_SYSTEM_NAME STREQUAL \"Linux\") message(STATUS \"CMAKE_GENERATOR = ${CMAKE_GENERATOR}\") #enable_language(${language} OPTIONAL) enable_language(${language}) @@ -62,18 +69,7 @@ language_support/cmake/Platform/Windows-gdc.cmake ) elseif(language STREQUAL "Fortran") - if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(language_special ON) - set(language_files - language_support/cmake-2.6/CMakeFortranInformation.cmake - language_support/cmake-2.6/Platform/Cygwin-GNU-Fortran.cmake - language_support/cmake-2.6/Platform/Windows-GNU-Fortran.cmake - language_support/cmake-2.6/Platform/Windows-df.cmake - language_support/cmake-2.6/Platform/Windows-f90.cmake - ) - else(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(language_special OFF) - endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) + set(language_special OFF) else(language STREQUAL "Ada") set(language_special OFF) endif(language STREQUAL "Ada") @@ -129,5 +125,3 @@ #message("Java_language_works = ${Java_language_works}") # Just to terminate temporary test for convenience. #message(FATAL_ERROR "") - - Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2011-11-29 21:03:33 UTC (rev 12068) +++ trunk/examples/CMakeLists.txt 2011-11-29 22:47:37 UTC (rev 12069) @@ -182,15 +182,15 @@ endif(NOT PLD_pdfqt) if(FORCE_EXTERNAL_STATIC) - # This experiment option untested, but it should work as well as - # FORCE_EXTERNAL_STATIC does for the CMake linking case for the - # core build in the build tree. That is, not well at all (drivers - # limited to those without external dependencies and languages limited - # to C, C++, D, Fortran 77, and Fortran 95) because - # of severe limitations in static library support on Linux. + # This experiment option untested, but it should work as well as + # FORCE_EXTERNAL_STATIC does for the CMake linking case for the + # core build in the build tree. That is, not well at all (drivers + # limited to those without external dependencies and languages limited + # to C, C++, D, Fortran 77, and Fortran 95) because + # of severe limitations in static library support on Linux. - # pkg-config does use --static option for traditional installed examples build. - set(PC_STATIC_OPTION "--static") + # pkg-config does use --static option for traditional installed examples build. + set(PC_STATIC_OPTION "--static") else(FORCE_EXTERNAL_STATIC) # pkg-config does not use --static option for traditional installed examples build. set(PC_STATIC_OPTION) @@ -340,18 +340,6 @@ ) endif(ENABLE_d) - if(ENABLE_f77 OR ENABLE_f95) - if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(LANG_SUPPORT_FILES ${LANG_SUPPORT_FILES} - language_support/cmake-2.6:CMakeFortranInformation.cmake - language_support/cmake-2.6/Platform:Cygwin-GNU-Fortran.cmake - language_support/cmake-2.6/Platform:Windows-GNU-Fortran.cmake - language_support/cmake-2.6/Platform:Windows-df.cmake - language_support/cmake-2.6/Platform:Windows-f90.cmake - ) - endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - endif(ENABLE_f77 OR ENABLE_f95) - if(LANG_SUPPORT_FILES) foreach(LANG_SUPPORT_info ${LANG_SUPPORT_FILES}) string(REGEX REPLACE "^(.*):.*$" "\\1" LANG_SUPPORT_DIR ${LANG_SUPPORT_info}) @@ -366,21 +354,29 @@ else(CORE_BUILD) project(installed_plplot_examples NONE) - CMAKE_MINIMUM_REQUIRED(VERSION 2.6.4 FATAL_ERROR) + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # We prefer to support only the latest CMake version because it + # tends to be more free of issues and more consistent with recent + # software releases of software that PLplot depends on than earlier versions. + # However, as a special concession to our modern (not enterprise or + # LTS) Linux distro users so they can avoid a download of recent CMake, + # we allow them to use the system version of + # CMake which at this time (2011-10) is typically 2.8.2 or later. + cmake_minimum_required(VERSION 2.8.2 FATAL_ERROR) + else(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # For non-Linux platforms we prefer to support only the most recent + # CMake version since that tends to be most free of issues and most + # consistent with releases of software that PLplot depends on. The + # most recently released CMake is 2.8.6 at this time (2011-10). + cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR) + endif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # Locations where PLplot cmake build system first looks for cmake modules. - if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(CMAKE_MODULE_PATH - ${PROJECT_SOURCE_DIR}/cmake/modules - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.6 - ) - else(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(CMAKE_MODULE_PATH - ${PROJECT_SOURCE_DIR}/cmake/modules - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.8 - ) - endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) + set(CMAKE_MODULE_PATH + ${PROJECT_SOURCE_DIR}/cmake/modules + ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake + ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.8 + ) #Configure variables and enable languages as needed. include(plplot_configure) @@ -566,7 +562,7 @@ ) endif(ENABLE_DYNDRIVERS) #message("DEBUG:file_device_depends_${device} = ${file_device_depends_${device}}") - list_example_files(${CMAKE_CURRENT_BINARY_DIR} ${device} c output_list) + list_example_files(${CMAKE_CURRENT_BINARY_DIR} ${device} c output_list) add_custom_command( OUTPUT ${output_list} COMMAND ${CMAKE_COMMAND} -E echo "Generate C results for ${device} file device" @@ -620,13 +616,13 @@ endif(ENABLE_DYNDRIVERS) if(PLD_extcairo) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ext-cairo-test.ps - COMMAND ext-cairo-test -drvopt set_background=1 - DEPENDS - ext-cairo-test - ${cairo_target} - ) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ext-cairo-test.ps + COMMAND ext-cairo-test -drvopt set_background=1 + DEPENDS + ext-cairo-test + ${cairo_target} + ) add_custom_target(test_extcairo DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ext-cairo-test.ps ) @@ -899,7 +895,7 @@ add_dependencies(test_tk_01 test_xwin_dyndriver) endif(FILE_DEPENDS_xwin) list(APPEND targets_examples_tk test_tk_01) - + add_custom_target(test_tk_03 COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/tk03 DEPENDS ${xwin_target} @@ -995,7 +991,7 @@ endif(FILE_DEPENDS_xwin) list(APPEND targets_examples_tk test_tk_04) endif(ENABLE_itk) - + endif(ENABLE_tk AND PLD_tk) if(targets_examples_tk) Modified: trunk/plplot_test/CMakeLists.txt =================================================================== --- trunk/plplot_test/CMakeLists.txt 2011-11-29 21:03:33 UTC (rev 12068) +++ trunk/plplot_test/CMakeLists.txt 2011-11-29 22:47:37 UTC (rev 12069) @@ -471,18 +471,15 @@ ${SH_EXECUTABLE} -c "./test_diff.sh" ) # There is a bug in 2.8.x with x < 5 where tests are run out of - # the order in which they are declared by default. - # Also, 2.8.x can run repeat tests out of order due - # to some optimizations that have been implemented. So for - # 2.8.x and above always force examples_compare to be run - # after the other tests it depends on. - if(CMAKE_MAJOR_VERSION EQUAL 2 AND NOT CMAKE_MINOR_VERSION LESS 8) - #message(STATUS "DEBUG: examples_compare_DEPENDS = ${examples_compare_DEPENDS}") - set_tests_properties(examples_compare - PROPERTIES - DEPENDS "${examples_compare_DEPENDS}" - ) - endif(CMAKE_MAJOR_VERSION EQUAL 2 AND NOT CMAKE_MINOR_VERSION LESS 8) + # the order in which they are declared by default. Also, 2.8.x + # can run repeat tests out of order due to some optimizations that + # have been implemented. Thus, always force examples_compare to + # be run after the other tests it depends on. + #message(STATUS "DEBUG: examples_compare_DEPENDS = ${examples_compare_DEPENDS}") + set_tests_properties(examples_compare + PROPERTIES + DEPENDS "${examples_compare_DEPENDS}" + ) endif(CMP_EXECUTABLE OR DIFF_EXECUTABLE AND TAIL_EXECUTABLE) if(BUILD_TEST) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |