From: <ai...@us...> - 2012-10-02 20:13:15
|
Revision: 12233 http://plplot.svn.sourceforge.net/plplot/?rev=12233&view=rev Author: airwin Date: 2012-10-02 20:13:08 +0000 (Tue, 02 Oct 2012) Log Message: ----------- Only warn about using a deprecated device if the DEFAULT value was set by DRIVERS_DEVICE. This removes confusing WARNING messages that occur if you are using other means to set defaults such as -DDEFAULT_NO_DEVICES=ON. Modified Paths: -------------- trunk/cmake/modules/drivers-init.cmake Modified: trunk/cmake/modules/drivers-init.cmake =================================================================== --- trunk/cmake/modules/drivers-init.cmake 2012-10-02 16:08:29 UTC (rev 12232) +++ trunk/cmake/modules/drivers-init.cmake 2012-10-02 20:13:08 UTC (rev 12233) @@ -228,6 +228,9 @@ "xwin:xwin:ON:I:OFF" ) +# PRESET_DEFAULT keeps track of whether the DEFAULT value has been +# preset. + if(DEFAULT_ALL_DEVICES) set(DEFAULT ON) set(PRESET_DEFAULT ON) @@ -248,22 +251,26 @@ message(FATAL_ERROR "Invalid combination of REQUIRE_FAMILYING = ${REQUIRE_FAMILYING} AND KIND = ${KIND} for DEVICE = ${DEVICE}") endif(REQUIRE_FAMILYING AND NOT KIND STREQUAL "F") + # DRIVERS_DEVICE only used in one case below: + set(USED_DRIVERS_DEVICE OFF) if(NOT PRESET_DEFAULT) + # must set DEFAULT value since it hasn't been preset. if(DEFAULT_NO_QT_DEVICES AND DEVICE MATCHES ".*qt.*" AND NOT DEVICE STREQUAL "aqt") set(DEFAULT OFF) elseif(DEFAULT_NO_CAIRO_DEVICES AND DEVICE MATCHES ".*cairo.*") set(DEFAULT OFF) else(DEFAULT_NO_QT_DEVICES AND DEVICE MATCHES ".*qt.*" AND NOT DEVICE STREQUAL "aqt") string(REGEX REPLACE "^.*:.*:(.*):.*:.*$" "\\1" DEFAULT ${DRIVERS_DEVICE}) + set(USED_DRIVERS_DEVICE ON) endif(DEFAULT_NO_QT_DEVICES AND DEVICE MATCHES ".*qt.*" AND NOT DEVICE STREQUAL "aqt") endif(NOT PRESET_DEFAULT) #message(STATUS "DEBUG: DEVICE = ${DEVICE}") #message(STATUS "DEBUG: DEFAULT= ${DEFAULT}") option(PLD_${DEVICE} "Enable ${DEVICE} device" ${DEFAULT}) - if(PLD_${DEVICE} AND NOT ${DEFAULT}) + if(PLD_${DEVICE} AND USED_DRIVERS_DEVICE AND NOT ${DEFAULT}) message(STATUS "WARNING: You have enabled the PLD_${DEVICE} device which is disabled by " - "default either because it is deprecated, or because there are know issues " + "default either because it is deprecated or because there are know issues " "with it. Please check the documentation / release notes for details.") - endif(PLD_${DEVICE} AND NOT ${DEFAULT}) + endif(PLD_${DEVICE} AND USED_DRIVERS_DEVICE AND NOT ${DEFAULT}) endforeach(DRIVERS_DEVICE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |