Commit graph

18,756 commits

Author SHA1 Message Date
William S Fulton
9aa0f85cda Workaround Appveyor random failures due to nuget install errors
Add and use nuget-install.cmd based on
https://github.com/appveyor/ci/blob/master/scripts/nuget-restore.cmd
2015-08-12 18:27:20 +01:00
Joseph C Wang
834a93f449 Revert "Merge pull request #494 from richardbeare/enumR2015B"
This reverts commit cb8973f313, reversing
changes made to ac3284f78c.
2015-08-11 09:57:57 +08:00
joequant
cb8973f313 Merge pull request #494 from richardbeare/enumR2015B
replacement for enumR2015 - tidied and rebased
2015-08-10 13:37:27 +08:00
Richard Beare
da1c6c60d3 This is a modification to support use of tricky enumerations in R. It
includes the addition of a _runme for an existing test - preproc_constants
that was previously not run. That tests includes a preprocessor based
setting of an enumeration which is ignored by the existing r enumeration
infrastructure. The new version correctly reports the enumeration value
as 4 - previous versions set it to 0. Traditional enumerations are unchanged.

The approach used to deal with these enumerations is similar to that of
other languages, and requires a call to a C function at runtime to return
the enumeration value. The previous approach figured out the values statically
and this is still used where possible. The need for a runtime call leads to
changes in when swig code is used in packages - see below.

One test that previously passed now fails - namely the R sourcing of
preproc_constants.R, as the enumeration code requires the shared library,
which isn't loaded by that script.

There is also a modification to the way the R _runme.R files are used.
The call to R CMD BATCH now includes a --args option that indicates
the source folder for the unittest.R file, and the first couple
of lines of the _runme.R files deal with correctly locating this.
Out of source tests now run correctly.

This work was motivated by problems generating the SimpleITK binding,
specifically with some of the more complex enumerations.

This approach does have some issues wrt to code in packages, but I can't
see an alternative. The problem with packages is that the R code setting
up the enumeration structures requires the shared library so that the C
functions returning enumeration values can be called. The enumeration
setup code thus needs to be moved to the package initialisation section.
For SimpleITK I do this using an R script, which I think is an acceptable
solution. The core part of the process is the following function. I dump
all the enumeration stuff into a .onload function. This is only necessary
if some of the enumerations are tricky.

splitSwigFile <- function(filename, onloadfile, mainfile)
{
p1 <- parse(file=filename)

getdefineEnum <- function(X)
{
return (is.call(X) & (X[[1]]=="defineEnumeration"))
}

dd <- sapply(p1, getdefineEnum)

enums <- p1[dd]
enums <- unlist(lapply(enums, deparse))

enums <- c(".onLoad <- function(libname, pkgname) {", enums, "}")

everythingelse <- p1[!dd]
everythingelse <- unlist(lapply(everythingelse, deparse))
writeLines(everythingelse, mainfile)
writeLines(enums, onloadfile)

}
2015-08-10 09:37:04 +10:00
William S Fulton
ac3284f78c Merge branch 'talby--surgical-perlprimtypes-fix'
* talby--surgical-perlprimtypes-fix:
  update CHANGES.current
  check ranges in perlprimtype.swg more carefully to avoid clang warnings
  capture the current behavior of perlprimtypes.swg is more detail
2015-08-09 21:55:30 +01:00
Ian Lance Taylor
01edfef3b8 Merge pull request #493 from michael-schaller/dir-examples
[Go] Undelete and updated the 'callback' and 'extend' examples.
2015-08-09 07:31:09 -07:00
Michael Schaller
608ef60ecf [Go] Renamed 'FooBarAbs' to 'FooBarAbstract' in the documentation and examples. 2015-08-09 14:37:16 +02:00
Michael Schaller
85037c3a33 [Go] Updated the 'callback' and 'extend' examples to match the 'director' one.
After the documentation update on how to utilize the director feature with
commit @17b1c1c the 'callback' and 'extend' examples needed an update as well.
2015-08-09 14:37:16 +02:00
Michael Schaller
a941e5b605 [Go] Revert commit 5e88857 to undelete the 'callback' and 'extend' examples.
The 'callback' and 'extend' examples were presumed to be obsoleted by the new
'director' example.  The examples are helpful though to have similar examples
across target languages and hence the commit @5e88857 which removed these
examples got reverted.
2015-08-09 14:36:58 +02:00
Robert Stone
96e282b791 update CHANGES.current 2015-08-08 13:21:24 -07:00
Robert Stone
9d19640141 check ranges in perlprimtype.swg more carefully to avoid clang warnings 2015-08-08 11:39:19 -07:00
Robert Stone
8ac4a8147b capture the current behavior of perlprimtypes.swg is more detail 2015-08-08 11:39:16 -07:00
William S Fulton
19a20c794b Changes entry for numpydoc conforming docstrings.
Changes entry for 92328a. Closes #383.
2015-08-07 22:23:31 +01:00
xantares
92328a2016 pep257 & numpydoc conforming docstrings 2015-08-07 22:15:13 +01:00
William S Fulton
263847e704 Merge pull request #487 from vadz/char-bin-type
Make (char*, size_t) typemap usable for strings of other types in Java.
2015-08-07 20:57:57 +01:00
Vadim Zeitlin
a1bddd56eb Make (char*, size_t) typemap usable for strings of other types in Java.
Notably it now works for "unsigned char*" strings.

Add a test to check that it now works in Java and also showing that it already
worked for the other languages with support for this typemap.
2015-08-07 19:44:45 +02:00
Ian Lance Taylor
95a08b3950 [Go] update build instructions in Examples/go/index.html 2015-08-05 07:19:05 -07:00
Ian Lance Taylor
5e88857760 Merge pull request #486 from michael-schaller/dir-cleanup
[Go] Cleanup of obsolete 'callback' and 'extend' examples.
2015-08-05 06:49:53 -07:00
Michael Schaller
736613e26c [Go] Documentation cleanup of obsolete 'callback' and 'extend' examples.
After commit 17b1c1c (pull request 447; issue 418) the 'callback' and 'extend'
examples have been removed in favor of the 'director' example.
2015-08-05 10:01:15 +02:00
Ian Lance Taylor
17b1c1c2d3 Merge pull request #447 from michael-schaller/doc
Fleshed out Go's documentation about the director feature and added a director example.
2015-08-04 10:36:33 -07:00
Michael Schaller
d9d26149e7 Some minor changes after first code review by ianlancetaylor.
Renamed overwritenMethodsOnFooBarAbs to overwrittenMethodsOnFooBarAbs.
Changed some line breaks.
2015-08-04 09:50:56 +02:00
Michael Schaller
e47d87e404 Fixed Examples/go/director/Makefile as there might be no copy of director.go during clean if a separate build directory is in use. 2015-08-04 09:34:26 +02:00
Michael Schaller
0db9a6ba7b Fixed Examples/go/director/Makefile as the copy of director.go wasn't cleaned up in separate build directories. 2015-08-04 09:34:26 +02:00
Michael Schaller
afd6a55ce1 Fixed Examples/go/director/Makefile as director.go was missing in separate build directories. 2015-08-04 09:34:26 +02:00
Michael Schaller
94994a749e Removed empty line in table of contents of the Go documentation. 2015-08-04 09:34:26 +02:00
Michael Schaller
a17c9727bd Fleshed out Go's documentation about the director feature and added a director example.
Fixes issues #418.
2015-08-04 09:34:26 +02:00
William S Fulton
5d363276f5 Bump version to 3.0.8 2015-08-03 22:33:52 +01:00
William S Fulton
9babc26634 Update Scilab test-suite output wording 2015-08-03 08:12:38 +01:00
William S Fulton
9d509ba92b Add 3.0.7 release summary and release date 2015-08-02 22:51:59 +01:00
William S Fulton
c0de963191 Test case warning suppression for visual c++ fix 2015-08-02 22:22:24 +01:00
William S Fulton
892aaf577a Test case warning suppression for visual c++ 2015-08-02 21:50:32 +01:00
William S Fulton
c6f8aadc64 Cosmetic corrections - Mac OS X 2015-08-02 20:14:20 +01:00
William S Fulton
f970d9aae5 testcase warning fix 2015-08-02 19:58:10 +01:00
William S Fulton
9c23981992 HTML fix in docs 2015-08-02 19:47:02 +01:00
William S Fulton
442ed8812b Merge branch 'vadz-better-no-all'
* vadz-better-no-all:
  Don't check for all the languages in Travis language-specific builds.
  Skip check for pep8 if Python is disabled in configure.
  Make configure --without-alllang option actually useful.
  Cosmetic: fix wrong configure options indentation in --help.
2015-08-02 19:42:27 +01:00
William S Fulton
2d4416136b Tweak configure output for Java 2015-08-02 19:41:10 +01:00
William S Fulton
fa16701d5c Merge branch 'vadz-java-home'
* vadz-java-home:
  Don't duplicate Java headers path under OS X in configure.
  Use JAVA_HOME value in configure to detect Java.
  Remove executable permission from appveyor.yml.
2015-08-02 19:18:56 +01:00
Vadim Zeitlin
43b2075918 Don't check for all the languages in Travis language-specific builds.
This should speed up configure and shorten its output.
2015-08-02 19:58:37 +02:00
Vadim Zeitlin
a9c6edb3fb Skip check for pep8 if Python is disabled in configure.
There is no need for it, nor any other Python-related variables, to be defined
if Python is not used.
2015-08-02 19:57:59 +02:00
Vadim Zeitlin
1824cabcbc Make configure --without-alllang option actually useful.
Use it to disable all languages by default, but still allow enabling
individual languages by explicitly using --with-lang options for them.

E.g. to enable tests for Java only "--without-alllang --with-java" can now be
used to skip the configure checks for all the other languages.
2015-08-02 19:57:59 +02:00
Vadim Zeitlin
11974efe2e Cosmetic: fix wrong configure options indentation in --help.
Ensure that help for all options starts in the same column (unless the options
are too long, as --with-guile-config=path, but at least avoid indenting it by
a tab stop then).
2015-08-02 19:57:33 +02:00
Vadim Zeitlin
651ad3030c Don't duplicate Java headers path under OS X in configure.
Use /System/Library/Frameworks/JavaVM.framework/Headers in a single place only
to make it easier to change it later and, hopefully, make the rather
convoluted process of Java detection under OS X slightly more clear.
2015-08-02 15:40:41 +02:00
William S Fulton
a1771cb8a0 Fix potential security exploit in generated Java classes 2015-08-02 11:22:46 +01:00
William S Fulton
130834aac2 Merge branch 'vadz-msw-srcdir'
* vadz-msw-srcdir:
  SWIG_LIB fix for out of source MinGW builds
  Use "mixed" path to source directory under Cygwin.
2015-08-02 10:07:59 +01:00
William S Fulton
f5db2b43e6 SWIG_LIB fix for out of source MinGW builds 2015-08-02 10:05:09 +01:00
William S Fulton
026d879058 Move MinGW mixed path conversion code to the pathconvert tool
In preparation for adding MinGW support to patch #438.
2015-08-01 23:08:53 +01:00
Vadim Zeitlin
2e7331964a Use JAVA_HOME value in configure to detect Java.
This is simpler than having to use --with-java, --with-javac and
--with-javaincl options and, even more importantly, will usually just work by
default.
2015-08-01 18:50:27 +02:00
William S Fulton
cc6804724f Improve configure output when python is not installed 2015-08-01 17:43:36 +01:00
Vadim Zeitlin
2837550c4b Remove executable permission from appveyor.yml.
This is not an executable file.
2015-08-01 18:04:50 +02:00
William S Fulton
4ffbe8fc2c Merge branch 'kkaempf-fix-configure-ocamlc-setting'
* kkaempf-fix-configure-ocamlc-setting:
  Ocaml configure changes
  Set OCAMLC to empty if Ocaml compiler not found
2015-07-30 23:35:12 +01:00