From: <ai...@us...> - 2014-01-27 01:39:10
|
Revision: 12961 http://sourceforge.net/p/plplot/code/12961 Author: airwin Date: 2014-01-27 01:39:07 +0000 (Mon, 27 Jan 2014) Log Message: ----------- Implement ADD_SPECIAL_CONSISTENCY_CHECKING build system option that adds some custom check targets that ordinarily are not added to a normal build because of the extra dependencies. One of these targets is the already existing check_plplot_h.inc target (to check consistency of the octave binding). Also implement the check_api_xml_consistency target which is an additional target of this kind. That target uses H?\199?\142ili?\195?\160ng Wang's check application (written in Go and available from https://github.com/hailiang/go-plplot/tree/master/c/check) to check the consistency of api.xml with plplot.h. Modified Paths: -------------- trunk/cmake/modules/ocaml.cmake trunk/cmake/modules/plplot.cmake trunk/doc/docbook/src/CMakeLists.txt Modified: trunk/cmake/modules/ocaml.cmake =================================================================== --- trunk/cmake/modules/ocaml.cmake 2014-01-27 01:30:31 UTC (rev 12960) +++ trunk/cmake/modules/ocaml.cmake 2014-01-27 01:39:07 UTC (rev 12961) @@ -145,9 +145,13 @@ endif(ENABLE_ocaml) if(ENABLE_ocaml) - # Leave this OFF by default since this target requires extra - # dependencies such as libpcre-ocaml-dev package on Debian. - option(GENERATE_PLPLOT_H_INC "Generate generated_plplot_h.inc" OFF) + if(ADD_SPECIAL_CONSISTENCY_CHECKING) + option(GENERATE_PLPLOT_H_INC "Generate generated_plplot_h.inc" ON) + else(ADD_SPECIAL_CONSISTENCY_CHECKING) + # Leave this OFF by default since this target requires extra + # dependencies such as libpcre-ocaml-dev package on Debian. + option(GENERATE_PLPLOT_H_INC "Generate generated_plplot_h.inc" OFF) + endif(ADD_SPECIAL_CONSISTENCY_CHECKING) if(GENERATE_PLPLOT_H_INC) find_program(OCAML ocaml) Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2014-01-27 01:30:31 UTC (rev 12960) +++ trunk/cmake/modules/plplot.cmake 2014-01-27 01:39:07 UTC (rev 12961) @@ -19,6 +19,8 @@ # Module for determining all configuration variables for PLplot. +option(ADD_SPECIAL_CONSISTENCY_CHECKING "Add extra source-tree consistency checking targets that require special tools" OFF) + # libraries are all shared by default option(BUILD_SHARED_LIBS "Build shared libraries" ON) Modified: trunk/doc/docbook/src/CMakeLists.txt =================================================================== --- trunk/doc/docbook/src/CMakeLists.txt 2014-01-27 01:30:31 UTC (rev 12960) +++ trunk/doc/docbook/src/CMakeLists.txt 2014-01-27 01:39:07 UTC (rev 12961) @@ -19,6 +19,35 @@ # You should have received a copy of the GNU Library General Public License # along with PLplot; if not, write to the Free Software +if(ADD_SPECIAL_CONSISTENCY_CHECKING) + # For this special case, must have access to a build of Hǎiliàng Wang's + # "check" application. To build that tool (written in the Go language) + # follow these simple directions (which worked fine on 2014-01-26): + # Install go-lang package from your distro (I used the Debian testing + # version, go-lang version 1.2). + # cd /home/software/golang_apps #(or wherever you like) + # export GOPATH=$(pwd) + # go get -u github.com/hailiang/go-plplot/c/check + # go build github.com/hailiang/go-plplot/c/check + ## The above creates the "check" executable in $GOPATH/bin + ## That is too generic a name so symlink a more individual name + # cd $GOPATH/bin; ln -s check api.xml_consistency_checker; + ## Now put $GOPATH/bin on your PATH and CMake should do the rest. + find_program(API_XML_CONSISTENCY_CHECKER api.xml_consistency_checker) + if(API_XML_CONSISTENCY_CHECKER) + add_custom_target(check_api_xml_consistency + # Currently the checker needs plplot.h to be in the same directory + # as the configured header files. + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_SOURCE_DIR}/include/plplot.h + ${CMAKE_BINARY_DIR}/include/plplot.h + COMMAND ${API_XML_CONSISTENCY_CHECKER} -header=${CMAKE_BINARY_DIR}/include/plplot.h -apixml=${CMAKE_SOURCE_DIR}/doc/docbook/src/api.xml + ) + else(API_XML_CONSISTENCY_CHECKER) + message(STATUS "WARNING: cannot find the api.xml_consistency_checker application so cannot check the consistency of api.xml with plplot.h") + endif(API_XML_CONSISTENCY_CHECKER) +endif(ADD_SPECIAL_CONSISTENCY_CHECKING) + set(BINDIR ${CMAKE_CURRENT_SOURCE_DIR}/../bin) set(PLPLOTDOC plplotdoc) if(NOT DEFINED HTML_EXT) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |