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 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>
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>
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>
* 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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>