163 Commits

Author SHA1 Message Date
Noel Eck
6be7012987 Werror: Enable warnings as errors
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>
2016-10-25 13:25:32 -07:00
Jon Trulson
1ae4119925 c11: enable C11 standards conformance unconditionally
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-21 15:24:46 -06:00
Jon Trulson
94cd7f185f c++11: enable c++11 compliance unconditionally.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-20 14:22:02 -06:00
Noel Eck
df5b3805c5 cmake: If git-describe failes with *-NOTFOUND, tag version dirty
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>
2016-10-17 15:29:42 -07:00
Noel Eck
c6610bdf46 tests: Switch from PYTHON_EXECUTABLE to PYTHON_DEFAULT_EXECUTABLE
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>
2016-10-05 17:12:02 -07:00
Noel Eck
62718daf0b python: Build both python2 and python3 modules
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>
2016-09-30 17:01:41 -07:00
Noel Eck
c3a5b8dd3c cmake: Updated pkg_check_modules usage for TPV libraries
* Moved CMAKE_MODULE_PATH append hier in top-level CMakeLists file
      so that it's before all calls to find_package.
    * Added pkg_check_modules for BACNET, MODBUS, JPEG, and OPENZWAVE
      to top-level CMakeLists file.
    * Removed pkg_check_modules from individual sensor libraries.
    * Simplified SWIG find_package call - require 3.0.5 for all SWIG
      wrappers.
    * Moved options to beginning of top-level CMakeLists.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-28 11:50:42 -07:00
Stefan Andritoiu
b60ecdd559 java: Added automatic pom file generation
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-09-15 10:34:00 -07:00
Noel Eck
2b6dd5f3fd cmake: Cleanup of cmake messages.
* Removed unessesary spaces.
    * Changed INFO to STATUS since INFO is not a cmake message
      keyword.
    * Changed a few messages from status/info to warning.
    * Fixed trailing carriage return on yuidoc execute_process.
    * Removed my debug messages for CXX vs C.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:08:55 -07:00
Noel Eck
c1f9d15f67 upmc: Updates for building C modules w/base UPM
Test commit for building C UPM modules.

    * Added C include directory
    * Added C utilities directory
    * Rename C++ upm.h -> upm.hpp to make room for C upm.h
    * Added upm_mixed_module_init function to src/CMakeLists.txt.  This
      function takes filesnames similar to upm_module_init and does a
      bit of processing before calling upm_module_init.
    * Added c example directory.  Changed c++ example names.
    * Added dfrph implemention for testing (C++ wraps C).  Added mraa
      to .pc requires for dfrph.  Tested against stand-alone project.
      Added dfrph c example.
    * Update implemention of pkg-config file generation.
    * Added two cmake cache variables: BUILDCPP and BUILDFTI
    * Removed src from swig_add_module calls, added libname to
      swig_link_libraries calls.  Shrinks swig'ed binaries by ~13%.
    * Added install target in upm/CMakeLists.txt to install C header,
      directory.  Is this where we want this?
    * C FTI header directory is include/fti

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-14 14:07:44 -07:00
Mihai Tudor Panu
d866b25f85 upm: v0.8.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-09-14 13:45:04 -07:00
Mihai Tudor Panu
4faa71d239 upm: v0.7.3
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-08-04 17:19:04 -07:00
Jon Trulson
49e04593d8 build: remove unnecessary BUILDSWIG option
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-08-03 11:54:36 -06:00
Jon Trulson
743730550c CMakeLists.txt: move example subdir adds after add_subdirectory(src) is called
This will ensure that all src modules are scanned first before
examples (c++/java).

In certain cases when doing parallel builds with many cores (8), the
examples for MODBUS, BACNET, and OPENZWAVE would not be built, since
their dependant libraries had not yet been located (in the src/
dir(s) via pkg_check_modules()), by the time the examples were being
compiled.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-07-06 16:49:55 -06:00
Noel Eck
1849e22154 upm: v0.7.2
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-06-30 16:28:44 -07:00
Noel Eck
dec9b2096e mraa: Updated mraa dependecy to 1.1.1
There were api changes for iio kernel support on mraa which cascade to
UPM - setting the minimum version of mraa required.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-06-30 15:15:50 -07:00
Noel Eck
634208e3dc upm: v0.7.1
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-06-28 11:37:42 -07:00
Noel Eck
19b0b0c2f1 python: Fixes for building python modules
Moved src include AFTER setter for PYTHONBUILD_VERSION.  In this way,
the src CMakeLists has a valid PYTHONBUILD_VERSION str.
Call find_package on PythonInterp prior to finding the libs (recommended).

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-06-24 17:11:28 -07:00
Mihai Tudor Panu
29bfa7ef79 upm: v0.7.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-05-12 17:09:17 -07:00
Mihai Tudor Panu
3eda1bce16 cmake: set -march=native for ARM platforms
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-05-12 11:56:19 -07:00
Brendan Le Foll
05730dba68 cmake: add dependency on mraa v1.0.0
Merged conflict in grove.cxx GroveTemp::value where new
scale factor was added.  Changed to apply scale factor
post error-check.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-05-09 17:31:38 -07:00
Mihai Tudor Panu
d355f76226 upm: v0.6.2
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-04-19 16:42:19 -07:00
Mihai Tudor Panu
b6b7d892c2 cmake: fix RPM generation when VERSION_COMMIT is empty string
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-04-15 10:01:27 -07:00
Noel Eck
527615758a cmake: Fixed builddoc flow for javascript documentation
Fixed a few small typos for handling node as well as a
small conditional for building PYTHON.

    * Fixed some NODE_EXECUTABLE->NODEJS_EXECUTABLE instances
    which must have been missed from a previous commit.

    * Added a qualifier for python documentation so both
    BUILDSWIGPYTHON AND BUILDSWIG must be set to add
    dependencies for pydoc.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-04-12 16:56:55 -07:00
Mihai Tudor Panu
16b6fcf807 cmake: set CMAKE_INSTALL_LIBDIR before using it
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-04-06 12:51:20 -07:00
Mihai Tudor Panu
655ccee9af upm: v0.6.1
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-31 17:22:16 -07:00
Mihai Tudor Panu
ba127ec4d4 cmake: honor LIB_INSTALL_DIR and also for Node install path
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-28 17:51:54 -07:00
Mihai Tudor Panu
e809016152 cmake: added back PYTHON_VERSION_* when not building docs for install path
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-28 16:22:35 -07:00
Mihai Tudor Panu
39c55b23d9 upm: version 0.6.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-25 14:13:16 -07:00
Mihai Tudor Panu
00b0092fc1 cmake: fixed flow for finding libs & include dirs
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-25 14:10:31 -07:00
Brendan Le Foll
60221dbcd6 cmake: disable TGZ from builds when IPK used
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-03-24 13:23:23 -07:00
Brendan Le Foll
10d784ea7e cmake: add BUILDPYTHON3 flag
Use the same methodology as in mraa, by default build for python2, if requested
use python3 for everything

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-03-24 13:18:50 -07:00
Jon Trulson
7a133cf891 cmake: Enable C++11 standards support
This patch checks for, and enables C++11 support for building UPM.
This should work for all cmake versions currently supported by UPM
(2.8.11+), and any compiler (clang/gcc) that was released in this
decade.

Support can be specifically disabled by passing '-DENABLECXX11=OFF' to
cmake, though modules requiring this support will not build.

C++11 support is enabled by default.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-24 11:05:54 -07:00
Stefan Andritoiu
757104e013 java: turned on sanity checks in travis
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-23 17:04:46 -07:00
Henry Bruce
b08da722f7 cmake: Updated RPM packaging config to match DEB.
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-03-17 15:50:43 -07:00
Mihai Tudor Panu
f1f9d9ec2e upm: version 0.5.1
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-02-16 18:08:35 -08:00
Mihai Tudor Panu
2098449c56 upm: sync build requirements with new MRAA version
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-02-08 12:41:03 -08:00
Mihai Tudor Panu
03b4d24e64 upm: version 0.5.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-02-01 17:03:11 -08:00
Mihai Tudor Panu
c3e3a6bb17 upm: bump MRAA dependency to 0.9.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-01-29 17:28:37 -08:00
Stefan Andritoiu
40f9135412 java: Added sanity checks and integrated them in CMake. Updated sample names and sample mapping.
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-01-28 16:13:37 -08:00
Stefan Andritoiu
9516e0720c java: added auto build java examples in cmake
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-12-21 16:04:05 -08:00
Mihai Tudor Panu
74691914fb upm: version 0.4.1
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-12-07 16:24:52 -08:00
Kevron Rees
6e2355ce9a cmake: use cmake libdir
Signed-off-by: Kevron Rees <kevron.m.rees@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-11-24 14:35:45 -08:00
Mihai Tudor Panu
4a90e2c4be cmake: more robust swig version checking based on build options
Python and Java bindings will build with SWIG 2.x but Node requires at least SWIG 3.0.5. Subject to change when SWIG 3 becomes standard in all major distros.

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-11-24 14:35:28 -08:00
Eugene Bolshakov
1adea8ecf1 cmake: changes for nodejs 4.1.1 - resubmit
Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-11-24 11:31:55 -08:00
Mihai Tudor Panu
04dc6df429 upm: version 0.4.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-23 17:45:27 -07:00
Mihai Tudor Panu
453a6eae0e upm: require mraa 0.8.0 for proper building of new APIs
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-23 17:36:41 -07:00
Mircea Bardac
5fda514544 java: Add Java Doxygen files
Signed-off-by: Mircea Bardac <mircea.bardac@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-22 13:49:58 -07:00
Mihai Tudor Panu
ea1df1b178 upm: bump mraa requirement to 0.7.6 for java bindings
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-15 16:32:40 -07:00
Mihai Tudor Panu
1e5b755b99 doxygen: generate tar archive out of doxygen xml output
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-04 17:08:14 -07:00