The UPM ctests require python which will fail cmake configure if not
available. Defaulting to OFF for now.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Added C/CXX warning messages similar to MRAA (w/ -Werror).
* Added syslog warning for missing switch cases
* Cleaned up uint vs int usage
* Fixed redifinition errors for C structs
* Added virtual destructors for base classes
* Removed redundant CMAKE_CXX_FLAGS from COMPILE_FLAGS for all three
wrapper languages. The CMAKE_CXX_FLAGS were showing up twice in
the compile commands for the wrappers.
* Added CMake WERROR option to enable/disable warnings as errors for
all targets.
* Disable a handful of compiler warnings for the wrapper cxx files,
this minimizes the number of warnings from auto-generated code).
Signed-off-by: Noel Eck <noel.eck@intel.com>
There is a bug in the UseSWIG.cmake file for cmake < 3.0.0
where it does not use the SWIG outdir correctly.
This fix instead sets the CMAKE_CURRENT_BINARY_DIR which is used
by UseSWIG.cmake to place the wrapper file (and other collateral).
Before (w/cmake < 3):
build/src/dfrph/pyupm_dfrphPYTHON_wrap.cxx
After:
build/src/dfrph/python2.7/pyupm_dfrphPYTHON_wrap.cxx
Signed-off-by: Noel Eck <noel.eck@intel.com>
In certain cases (debian/ubuntu multi-arch machines) the jar files
were bing installed in <prefix>/lib/lib/java/.
Regardless of platform or architecture, these files need to be in
<prefix>/lib/java/ .
Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit touches a subset of UPM sensors which contain C source.
Cleaned up the CMakeLists.txt DESCRIPTION field to better represent
the library.
Signed-off-by: Noel Eck <noel.eck@intel.com>
There is a case where git_describe was returning 'HEAD-HASH-NOTFOUND'
which missed the STREQUAL check and VERSION was set incorrectly.
Changed the STREQUAL to a MATCH on -NOTFOUND. In this way, any of the
-NOTFOUND returns change the version to dirty.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Updated the changelog.md to reflect the recent python modules changes.
Added a vnext which can be replaced with the next UPM release version
number.
Signed-off-by: Noel Eck <noel.eck@intel.com>
* Grouped UPM python modules into upm directory, for example:
/usr/local/lib/python2.7/dist-packages/upm
* Updated UPM example import statements
* Removed unused RPATH statements from UPM src CMakeLists.txt,
currently build collateral contains an explicit RPATH which
is stripped from the install collateral.
* Converted python examples to work on both python2 AND python3
* Added ctest for loading examples w/python3
* Removed returns from swig macros
* UPM python module use will change...
Before:
import pyupm_dfrph
After:
from upm import pyupm_dfrph
or
import upm.pyupm_dfrph
etc...
* This commit fixes#468
Signed-off-by: Noel Eck <noel.eck@intel.com>
The DetectPython cmake script now outputs a default python executable.
Updated other cmake scripts to use this concept. Used default where
python2/3 will work, use explicit PYTHON2/3_EXECUTABLE where an
explicit version is needed. Also, fail if python is required and NO
version of python was found.
Signed-off-by: Noel Eck <noel.eck@intel.com>
* Moved body of each python example to main. This allows for basic
load module testing for CI
* General cleanup of python modules (crlf/tabs/prints/etc)
* Chmod'ed to 755 to allow running examples without specifying the
python interpreter
* Added ctest for loading python2/3 modules
* Added jniclasscode pragma for java swig interface files.
* Updated check_examplenames.py module to check all languages vs. a
cxx example name
* Added tests for checking python module and test loading
* Added 'make test' to travis-ci run (run ctests)
* Print a more meaningful message when not building cxx docs into
python modules
* Updated check_clean.py to only check java wrapper files
* ENABLED ctests for UPM
* Deleted using_carrays.py python example - this is covered by other
examples
Signed-off-by: Noel Eck <noel.eck@intel.com>
Updated UPM cmake to build both python2/3 modules if the necessary
python libs are available.
* Removed BUILDPYTHON3 cmake option in favor of building both
versions
* Added cmake module to find both python2 and python3
* Added macro which can be called from per-sensor cmake files
to add dependency libraries via target_link_libraries as well
as swig_link_libraries (for java, nodejs, and python)
* Python2 is required for python documentation builds
* Cleanup of python usage throughout UPM cmakelists.
* Make find_package for Node required. Removed check for NODE_FOUND
(which should have been NODEJS_FOUND) in favor of REQUIRED.
* The cxx and .py wrapper files get generated in python2/3 (instead
of the same directory). It appears these files are identical,
however since the targets can be built in parallel it's safer to split
them out.
* Updated all cmake dependencies related to building documentation.
* Removed unused classname from cmake files
Signed-off-by: Noel Eck <noel.eck@intel.com>
In certain cases with the Arduino 101/Zephyr, using the upm_delay*()
functions can cause hangs and/or exceptions. Adding a single tick to
the generated offset resolves these issues.
The documentation warns that this is a good idea to ensure that a
timer does not expire early. Adding this made the random hangs and
CPU exceptions go away.
Signed-off-by: Jon Trulson <jtrulson@ics.com>