From: <ai...@us...> - 2010-12-20 23:23:03
|
Revision: 11380 http://plplot.svn.sourceforge.net/plplot/?rev=11380&view=rev Author: airwin Date: 2010-12-20 22:29:38 +0000 (Mon, 20 Dec 2010) Log Message: ----------- Make determination of Octave version a little more proof against errors. I have checked this logic works on Linux for the normal "octave --version" command. It also gives a soft landing when "octave --version" is replaced by a bad octave command like "octave whatever". However, the new logic cannot give a soft landing for internal octave errors as occurs, for example, on wine. Modified Paths: -------------- trunk/cmake/modules/octave.cmake Modified: trunk/cmake/modules/octave.cmake =================================================================== --- trunk/cmake/modules/octave.cmake 2010-12-19 23:26:40 UTC (rev 11379) +++ trunk/cmake/modules/octave.cmake 2010-12-20 22:29:38 UTC (rev 11380) @@ -69,9 +69,20 @@ if(ENABLE_octave) #OCTAVE_VERSION is the (dotted triplet) octave version. execute_process( - COMMAND ${OCTAVE} --version - OUTPUT_VARIABLE _OCTAVE_VERSION - ) + COMMAND ${OCTAVE} --version + OUTPUT_VARIABLE _OCTAVE_VERSION + ERROR_VARIABLE OCTAVE_ERROR + RESULT_VARIABLE return_code + ) + if(return_code) + message(STATUS "OCTAVE_ERROR = ${OCTAVE_ERROR}") + message(STATUS "WARNING: " + "${OCTAVE} --version generates an error (non-zero return code). Disabling octave bindings") + set(ENABLE_octave OFF CACHE BOOL "Enable Octave bindings" FORCE) + endif(return_code) +endif(ENABLE_octave) + +if(ENABLE_octave) string(REGEX REPLACE "^.*version ([0-9]\\.[0-9]\\.[0-9]*).*$" "\\1" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2010-12-23 20:16:22
|
Revision: 11384 http://plplot.svn.sourceforge.net/plplot/?rev=11384&view=rev Author: airwin Date: 2010-12-23 20:16:16 +0000 (Thu, 23 Dec 2010) Log Message: ----------- Implement ENABLE_swig_octave option (defaults to OFF) to try to use the forthcoming SWIG-generated octave bindings rather than the traditional matwrap-geneated bindings. Modified Paths: -------------- trunk/cmake/modules/octave.cmake Modified: trunk/cmake/modules/octave.cmake =================================================================== --- trunk/cmake/modules/octave.cmake 2010-12-22 08:12:20 UTC (rev 11383) +++ trunk/cmake/modules/octave.cmake 2010-12-23 20:16:16 UTC (rev 11384) @@ -231,4 +231,5 @@ if(PL_DOUBLE) set(DEFINE_PL_DOUBLE "#define PL_DOUBLE") endif(PL_DOUBLE) + option(ENABLE_swig_octave "Enable Octave bindings generated by SWIG" OFF) endif(ENABLE_octave) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2010-12-29 00:24:40
|
Revision: 11397 http://plplot.svn.sourceforge.net/plplot/?rev=11397&view=rev Author: airwin Date: 2010-12-29 00:24:34 +0000 (Wed, 29 Dec 2010) Log Message: ----------- Improved octave configuration for the Windows case. Find path of hdf5.h. (We got away with not finding the path to this header on Linux because it is in a standard location, /usr/include.) Take more care with PATH issues so that the native form is tranformed to the CMake internal form. (This is a no-op on Linux, but it translates the native \ form to CMake / form of path on Windows.) Modified Paths: -------------- trunk/cmake/modules/octave.cmake Modified: trunk/cmake/modules/octave.cmake =================================================================== --- trunk/cmake/modules/octave.cmake 2010-12-29 00:16:53 UTC (rev 11396) +++ trunk/cmake/modules/octave.cmake 2010-12-29 00:24:34 UTC (rev 11397) @@ -148,6 +148,29 @@ CACHE INTERNAL "" ) endif(NOT OCTAVE_INCLUDE_PATH_TRIMMED STREQUAL "${OCTAVE_INCLUDE_PATH}") + # Octave has a huge number of dependencies and therefore an + # impossible-to-untangle set of header #includes that depend on + # other packages headers. And there is no information from + # mkoctfile or the octave octave_config_info command about where + # those header directories are located. But from experiments + # with both the Linux and Windows binary versions of octave, it + # appears that hdf5.h is one external header that is necessary, + # and it is never part of the octave-${OCTAVE_VERSION}/octave + # hierarchy so that PATH_SUFFIXES signature is dropped. + find_path( + OCTAVE_INCLUDE_PATH_EXTERNAL + hdf5.h + ) + if(OCTAVE_INCLUDE_PATH_EXTERNAL) + set(OCTAVE_INCLUDE_PATH + ${OCTAVE_INCLUDE_PATH_EXTERNAL} ${OCTAVE_INCLUDE_PATH} + CACHE INTERNAL "" + ) + else(OCTAVE_INCLUDE_PATH_EXTERNAL) + message(STATUS "WARNING: " + "Required external octave header, hdf5.h, not found. Disabling octave bindings") + set(ENABLE_octave OFF CACHE BOOL "Enable Octave bindings" FORCE) + endif(OCTAVE_INCLUDE_PATH_EXTERNAL) else(OCTAVE_INCLUDE_PATH AND OCTAVE_LIBRARIES AND OCTINTERP_LIBRARIES) message(STATUS "WARNING: " "octave headers and/or library not found. Disabling octave bindings") @@ -188,6 +211,8 @@ OUTPUT_VARIABLE OCTAVE_PREFIX ) #message(STATUS "OCTAVE_PREFIX = ${OCTAVE_PREFIX}") + file(TO_CMAKE_PATH ${OCTAVE_PREFIX} OCTAVE_PREFIX) + #message(STATUS "(CMake) OCTAVE_PREFIX = ${OCTAVE_PREFIX}") # octave-2.1 (or higher) logic. #_OCTAVE_M_DIR @@ -199,18 +224,25 @@ WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_VARIABLE _OCTAVE_M_DIR ) + #message(STATUS "_OCTAVE_M_DIR = ${_OCTAVE_M_DIR}") + file(TO_CMAKE_PATH ${_OCTAVE_M_DIR} _OCTAVE_M_DIR) + #message(STATUS "(CMake) _OCTAVE_M_DIR = ${_OCTAVE_M_DIR}") + #OCTAVE_OCT_DIR if(NOT DEFINED OCTAVE_OCT_DIR) - file(WRITE ${CMAKE_BINARY_DIR}/octave_command - "printf(octave_config_info(\"localoctfiledir\"));" - ) - execute_process( - COMMAND ${OCTAVE} -q -f octave_command - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - OUTPUT_VARIABLE OCTAVE_OCT_DIR - ) + file(WRITE ${CMAKE_BINARY_DIR}/octave_command + "printf(octave_config_info(\"localoctfiledir\"));" + ) + execute_process( + COMMAND ${OCTAVE} -q -f octave_command + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + OUTPUT_VARIABLE OCTAVE_OCT_DIR + ) + #message(STATUS "OCTAVE_OCT_DIR = ${OCTAVE_OCT_DIR}") + file(TO_CMAKE_PATH ${OCTAVE_OCT_DIR} OCTAVE_OCT_DIR) + #message(STATUS "(CMake) OCTAVE_OCT_DIR = ${OCTAVE_OCT_DIR}") endif(NOT DEFINED OCTAVE_OCT_DIR) - + # Replace the OCTAVE_PREFIX with the PLplot prefix in OCTAVE_M_DIR string(REPLACE "${OCTAVE_PREFIX}" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-01-03 07:45:15
|
Revision: 11432 http://plplot.svn.sourceforge.net/plplot/?rev=11432&view=rev Author: airwin Date: 2011-01-03 07:45:09 +0000 (Mon, 03 Jan 2011) Log Message: ----------- Enable swig-generated octave bindings (as opposed to matwrapped ones) by default. Modified Paths: -------------- trunk/cmake/modules/octave.cmake Modified: trunk/cmake/modules/octave.cmake =================================================================== --- trunk/cmake/modules/octave.cmake 2011-01-03 07:38:30 UTC (rev 11431) +++ trunk/cmake/modules/octave.cmake 2011-01-03 07:45:09 UTC (rev 11432) @@ -263,5 +263,5 @@ if(PL_DOUBLE) set(DEFINE_PL_DOUBLE "#define PL_DOUBLE") endif(PL_DOUBLE) - option(ENABLE_swig_octave "Enable Octave bindings generated by SWIG" OFF) + option(ENABLE_swig_octave "Enable Octave bindings generated by SWIG" ON) endif(ENABLE_octave) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-01-12 02:07:10
|
Revision: 11488 http://plplot.svn.sourceforge.net/plplot/?rev=11488&view=rev Author: airwin Date: 2011-01-12 02:07:03 +0000 (Wed, 12 Jan 2011) Log Message: ----------- Make build system fall back to matwrapped Octave bindings if swig is not available. Modified Paths: -------------- trunk/cmake/modules/octave.cmake Modified: trunk/cmake/modules/octave.cmake =================================================================== --- trunk/cmake/modules/octave.cmake 2011-01-12 01:11:42 UTC (rev 11487) +++ trunk/cmake/modules/octave.cmake 2011-01-12 02:07:03 UTC (rev 11488) @@ -264,4 +264,10 @@ set(DEFINE_PL_DOUBLE "#define PL_DOUBLE") endif(PL_DOUBLE) option(ENABLE_swig_octave "Enable Octave bindings generated by SWIG" ON) + if(NOT SWIG_FOUND AND ENABLE_swig_octave) + message(STATUS "WARNING: " + "SWIG not found. Falling back to deprecated matwrapped octave bindings.") + set(ENABLE_swig_octave OFF CACHE BOOL "Enable Octave bindings generated by SWIG" FORCE) + endif(NOT SWIG_FOUND AND ENABLE_swig_octave) + endif(ENABLE_octave) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-04-08 19:13:22
|
Revision: 11688 http://plplot.svn.sourceforge.net/plplot/?rev=11688&view=rev Author: airwin Date: 2011-04-08 19:13:16 +0000 (Fri, 08 Apr 2011) Log Message: ----------- AWI for Orion Poplawski. Use oct-config command to find octave locations more reliably than before. Modified Paths: -------------- trunk/cmake/modules/octave.cmake Modified: trunk/cmake/modules/octave.cmake =================================================================== --- trunk/cmake/modules/octave.cmake 2011-04-07 07:30:32 UTC (rev 11687) +++ trunk/cmake/modules/octave.cmake 2011-04-08 19:13:16 UTC (rev 11688) @@ -1,6 +1,6 @@ # cmake/modules/octave.cmake # -# Copyright (C) 2006 Alan W. Irwin +# Copyright (C) 2006-2010 Alan W. Irwin # # This file is part of PLplot. # @@ -73,28 +73,34 @@ endif(ENABLE_octave) if(ENABLE_octave) + find_program(OCTAVE_CONFIG octave-config) + if(OCTAVE_CONFIG) + message(STATUS "OCTAVE_CONFIG = ${OCTAVE_CONFIG}") + else(OCTAVE_CONFIG) + message(STATUS "WARNING: " + "octave-config not found. Disabling octave bindings") + set(ENABLE_octave OFF CACHE BOOL "Enable Octave bindings" FORCE) + endif(OCTAVE_CONFIG) +endif(ENABLE_octave) + +if(ENABLE_octave) #OCTAVE_VERSION is the (dotted triplet) octave version. execute_process( - COMMAND ${OCTAVE} --version - OUTPUT_VARIABLE _OCTAVE_VERSION + COMMAND ${OCTAVE_CONFIG} -p VERSION + OUTPUT_VARIABLE OCTAVE_VERSION ERROR_VARIABLE OCTAVE_ERROR RESULT_VARIABLE return_code + OUTPUT_STRIP_TRAILING_WHITESPACE ) if(return_code) message(STATUS "OCTAVE_ERROR = ${OCTAVE_ERROR}") message(STATUS "WARNING: " - "${OCTAVE} --version generates an error (non-zero return code). Disabling octave bindings") + "${OCTAVE_CONFIG} -p VERSION generates an error (non-zero return code). Disabling octave bindings") set(ENABLE_octave OFF CACHE BOOL "Enable Octave bindings" FORCE) endif(return_code) endif(ENABLE_octave) if(ENABLE_octave) - string(REGEX REPLACE - "^.*version ([0-9]\\.[0-9]\\.[0-9]*).*$" - "\\1" - OCTAVE_VERSION - ${_OCTAVE_VERSION} - ) message(STATUS "OCTAVE_VERSION = ${OCTAVE_VERSION}") # Logic that depends on octave version transform_version(NUMERICAL_OCTAVE_TESTING_MINIMUM_VERSION "2.9.0") @@ -123,22 +129,35 @@ # if OCTAVE_INCLUDE_PATH is defined from the previous cmake run should be # fine. if(NOT DEFINED OCTAVE_INCLUDE_PATH) + execute_process( + COMMAND ${OCTAVE_CONFIG} -p OCTINCLUDEDIR + OUTPUT_VARIABLE OCTAVE_INCLUDE_DIR + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + find_path( OCTAVE_INCLUDE_PATH oct.h - PATH_SUFFIXES octave-${OCTAVE_VERSION}/octave + PATHS ${OCTAVE_INCLUDE_DIR} + PATH_SUFFIXES octave ) + execute_process( + COMMAND ${OCTAVE_CONFIG} -p OCTLIBDIR + OUTPUT_VARIABLE OCTAVE_LIB_DIR + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + find_library( OCTAVE_LIBRARIES octave - PATH_SUFFIXES octave-${OCTAVE_VERSION} + PATHS ${OCTAVE_LIB_DIR} ) find_library( OCTINTERP_LIBRARIES octinterp - PATH_SUFFIXES octave-${OCTAVE_VERSION} + PATHS ${OCTAVE_LIB_DIR} ) if(OCTAVE_INCLUDE_PATH AND OCTAVE_LIBRARIES AND OCTINTERP_LIBRARIES) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2012-01-21 21:58:21
|
Revision: 12145 http://plplot.svn.sourceforge.net/plplot/?rev=12145&view=rev Author: andrewross Date: 2012-01-21 21:58:15 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Update minimum octave version to 3.2.0 for cmake check. Modified Paths: -------------- trunk/cmake/modules/octave.cmake Modified: trunk/cmake/modules/octave.cmake =================================================================== --- trunk/cmake/modules/octave.cmake 2012-01-21 21:56:43 UTC (rev 12144) +++ trunk/cmake/modules/octave.cmake 2012-01-21 21:58:15 UTC (rev 12145) @@ -103,7 +103,7 @@ if(ENABLE_octave) message(STATUS "OCTAVE_VERSION = ${OCTAVE_VERSION}") # Logic that depends on octave version - transform_version(NUMERICAL_OCTAVE_TESTING_MINIMUM_VERSION "2.9.0") + transform_version(NUMERICAL_OCTAVE_TESTING_MINIMUM_VERSION "3.2.0") transform_version(NUMERICAL_OCTAVE_VERSION "${OCTAVE_VERSION}") if( NUMERICAL_OCTAVE_VERSION @@ -111,7 +111,7 @@ "${NUMERICAL_OCTAVE_TESTING_MINIMUM_VERSION}" ) message(STATUS "WARNING: " - "plplot require octave version 2.9 or greater. Disabling octave bindings") + "plplot require octave version 3.2 or greater. Disabling octave bindings") set(ENABLE_octave OFF CACHE BOOL "Enable Octave bindings" FORCE) endif( NUMERICAL_OCTAVE_VERSION This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-10-23 08:47:00
|
Revision: 12621 http://sourceforge.net/p/plplot/code/12621 Author: andrewross Date: 2013-10-23 08:46:57 +0000 (Wed, 23 Oct 2013) Log Message: ----------- If CMAKE_INSTALL_PREFIX is different to the prefix used to install octave, then make sure .oct files go in ${CMAKE_INSTALL_LIBDIR}/octave , i.e. in a library directory rather than a data directory. They are binary files so should not live under CMAKE_INSTALL_DATADIR. Modified Paths: -------------- trunk/cmake/modules/octave.cmake Modified: trunk/cmake/modules/octave.cmake =================================================================== --- trunk/cmake/modules/octave.cmake 2013-10-23 06:04:04 UTC (rev 12620) +++ trunk/cmake/modules/octave.cmake 2013-10-23 08:46:57 UTC (rev 12621) @@ -277,7 +277,7 @@ # Transform OCTAVE_OCT_DIR if prefixes not the same. if(NOT CMAKE_INSTALL_PREFIX STREQUAL "${OCTAVE_PREFIX}") - set(OCTAVE_OCT_DIR ${PLPLOT_OCTAVE_DIR}) + set(OCTAVE_OCT_DIR ${CMAKE_INSTALL_LIBDIR}/octave) endif(NOT CMAKE_INSTALL_PREFIX STREQUAL "${OCTAVE_PREFIX}") message(STATUS "OCTAVE_OCT_DIR = ${OCTAVE_OCT_DIR}") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |