163 Commits

Author SHA1 Message Date
Mihai Tudor Panu
9501488709 targetarch: remove arch detection logic as it is not needed at upm level
This removes the DETECTED_ARCH cmake variable and device arch detection module as this is irrelevant for UPM. Also removing toolchain files since they are not really needed by this project.

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-05-04 18:34:27 -07:00
Mihai Tudor Panu
8f3f2a7de2 cmake: remove ipk and rpm generation as handled through recipes
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-05-03 23:18:05 -07:00
Mihai Tudor Panu
2a948ca687 cmake: handle tinyb dependency through upm_init_module macro
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-11 04:36:13 +00:00
Mihai Tudor Panu
d282d479bb cmake: check compiler version before adding -Wno-misleading-indentation flag
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-10 23:02:44 +00:00
Mihai Tudor Panu
9cddd4a8b1 cmake: add check for tinyb and set as dependency for 2jciebu01-ble
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2019-04-10 23:02:39 +00:00
Mihai Tudor Panu
16e72d2ff7 upm: version 1.7.1
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-10-11 21:47:41 -07:00
Mihai Tudor Panu
4927311a0c upm: bump minimum MRAA required to 2.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-09-28 15:38:22 -07:00
Mihai Tudor Panu
67b77b78aa upm: version 1.7.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-09-06 08:00:22 -07:00
Noel Eck
757683b2ca Cordova: Renamed cmake Find module for bindings
Renamed find module from FindCordova to FindUpmCordovaGenerator to be
more descriptive with the intent of the find module.  Updated the find
module to use find_package_handle_standard_args so a version can be
specified and handle REQUIRED keyword.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-04-02 09:45:48 -07:00
Lin Sun
f45429e1f0 cordova: Add UPM cordova binding via Java packages
The UPM Cordova binding generator creates Cordova plugs for each Java
package when BUILDCORDOVA=ON and BUILDSWIGJAVA=ON.  This requires an NPM
install of the UPM Cordova plugin generator.  Cordova bindings are built
under <build-dir>/cordova.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-04-02 09:42:12 -07:00
Noel Eck
f907ebcf2e mraa: Temporarily turn off deprecated warnings
MRAA deprecated mraa_gpio_use_mmaped which gets flagged as a warning
in UPM and then fails since -Werror is set.

For now, don't flag deprecations as warnings.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-03-13 14:48:53 -07:00
Noel Eck
41e80d611e json: Added nlohmann's JSON C++ header
Adding JSON header for serializing/deserializing library descriptor JSON
files.

    * Added header
    * Added simple unit test to verify functionality

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-03-02 16:19:04 -08:00
Noel Eck
829da899fc docs: Updated doc dependencies for all languages
This commit changes how the UPM doc targets build.  The doc targets no
longer rebuild each time.

    * doc (doxygen) target depends only on C/C++ source
    * jsdoc (yuidoc) depends on doc and a stamp file
    * pydoc (sphinx) depends on the output index.xml from doc
    * pyupm_doxy2swig depends on python2 python extensions

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-02-21 15:08:03 -08:00
Mihai Tudor Panu
cc7fec9ae0 upm: version 1.6.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-02-20 07:45:15 -08:00
Noel Eck
38817b72dc pydoc: Fixed mix of python2/3 modules with pydoc
The pydoc target copies python binaries and modules to pyupm.  Since the
find command didn't make a distinction between python2/3 modules, a mix
of each could end up in pyupm.  If sphinx runs under a mismatching
interpreter (mismatching against the python binaries) the build would
fail with load errors

    * Only copy python2 modules (and binaries) to pyupm directory
    * Explicitly run the sphinx tools w/python2
    * Removed doc dependency to each library target (not needed).

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-02-12 16:15:59 -08:00
Noel Eck
fe7bd75c91 C: Fixes for sign compares in C libraries
Added explicit error for sign compares to CMake.  Updated a handful of C
source which compared unsigned vs signed.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-02-07 14:29:35 -08:00
Noel Eck
6f72c52a44 CMake: Update FindNpm module and usage
FindNpm REQUIRE functionality was not provided by FindNpm.cmake.
UpdatedUpdated FindNpm to extract version, global node_modules
directory, and to fail if REQUIRE was set and npm was not found.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-02-06 14:11:28 -08:00
Noel Eck
f848deb35b components: Refactor UPM install components
Removed the per-target install component in favor of a limited set of
insinstall components.

Available install components are: "upm" "upm-dev" "upm-java"
"upm-nodejs" "upm-python2" "upm-python3"

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-11-16 12:00:42 -08:00
Mihai Tudor Panu
b9010059ad upm: v1.5.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-10-10 12:07:59 -07:00
Nicolas Oliver
40e73e648a docs: require specific version of doc tools
Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
2017-10-05 09:48:26 -07:00
Abhishek Malik
694034d052 Cmake: Bumping up required MRAA version
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2017-09-26 18:58:54 -07:00
Abhishek Malik
303323fa3a JSON: Adding ctest
This commit adds node based tests provided by Nico to the ctest
framework already established in UPM.

Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2017-09-14 17:52:52 -07:00
Nicolas Oliver
9e09f899cf Travis CI and Documentation Generation Improvements
* Use docker images from docker hub instead of building them on Travis
* Fix doxygen warnings for Markdown Files
* Modify Travis build matrix to include stages and additional jobs
* Add doxygen2jsdoc submodule
* Add doxyport submodule
* Remove duplicated code in doxy/node directory
* Generate documentation for each language in Travis

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
2017-08-14 12:46:31 -07:00
Noel Eck
34f2799c53 CMakeLists.txt: Hint to libmraa/mraajava
Small change - updated from PATHS to HINTS.  Search HINTS paths first to
provide location for mraa libraries.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-05-19 16:25:08 -07:00
Mihai Tudor Panu
106b6c7062 upm: v1.3.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-05-12 11:33:47 -07:00
Noel Eck
c78da687d4 CMakeLists.txt: Removed force to -march=native
Setting the arch to native for arm.* should not generally be necessary.
If this is absolutely required, it can be passed manually.  Setting
-march=native seems to fail on some versions of gnu gcc for arm.
Removed the force to -march=native in favor of letting cmake set the
arch.

If at some point, this would be required, a better way would be to add
the compile flag after testing if it is supported.

Example:
    upm_add_compile_flags(CXX "-march=native")

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-05-09 11:28:20 -07:00
Mihai Tudor Panu
cdb735c34e cmake: required mraajava version now checks against MRAA_MINIMUM
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-05-03 16:59:29 -07:00
Noel Eck
0bd68e4e2b ANDROID: CMake/src changes to build on android-24
* Updated pom file generation: Generate pom files after all sensor
      library targets have been created - allows for dependencies
    * Changes for compiling on Android
    * Check for mraa build options: Look at symbols in mraa library to
      determine UPM build options (example: mraa_iio_init, mraa_firmata_init)
    * Add per target summary for C/C++/java/nodejs/python
    * Added hierarchy to fti include directory...
        old: #include "upm_voltage.h"
        new: #include "fti/upm_voltage.h"
    * Removed unimplemented methods from mpu9150 library and java example
    * Add utilities-c target for all c examples.  Most of the C examples
      rely on the upm_delay methods.  Add a dependency on the utilities-c
      target for all c examples.
    * Updated the examples/CMakeLists.txt to add dependencies passed via
      TARGETS to the target name parsed from the example name.  Also updated
      the interface example names to start with 'interfaces'.
    * Updated src/examples/CMakeLists.txt to ALWAYS remove examples from the
      example_src_list (moved this from end of function to beginning).

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-04-24 10:27:35 -07:00
sisinty sasmita patra
b2aa2515b0 upm_version: Added get version functionality for UPM as provided by MRAA
* Renamed version.c to version.hpp
    * Updated CMakelist file
    * Updated upm.i file to support version
    * Updated/modified src Cmakelists to support base upm and wrapper dependency

Signed-off-by: sisinty sasmita patra <sisinty.s.patra@intel.com>
2017-04-20 13:49:13 -07:00
Mihai Tudor Panu
78eb975435 upm: v1.2.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-04-10 20:38:25 -07:00
Noel Eck
048f1ac08e examples: C/C++ examples use transitive dependencies
Updated the examples to comprehend transitive dependencies.  This means
that each example target will no longer have a giant list of -I includes
(the examples at the end of the list had includes for all previous
examples, upwards of 200 -I's on the command line).

    * Created a CMakeLists.txt in the upm/examples directory, moved
      common functionality to this level.
    * C/C++ examples now look to the filename for their dependency
      target name, ie; gas-mq2.cxx adds a dependency to the 'gas' target
    * Updated a handful of C/C++ example names to reflect this
    * Example CMake flow - glob the list of files, add targets for any
      special case examples, then att targets for all the rest

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-04-05 15:16:20 -07:00
Noel Eck
8048e8734f doxygen: Relative paths in generated docs - update
Reverted changes to CMakeLists.txt, change is done solely in
Doxygen.in.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-03-28 12:29:11 -07:00
Noel Eck
8262a4203b doxygen: Use relative paths in generated docs
Updated cmake to use strip the full path to the base UPM directory
from generated documentation.  This removes the build server full-
path from UPM documentation.

Old html:

upm: /iotdk/jenkins/workspace/upm-doc-stable/src/moisture/moisture.h File Reference

New html:

upm: src/moisture/moisture.h File Reference

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-03-28 11:35:11 -07:00
Mihai Tudor Panu
b9988469ba upm: v1.1.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-02-13 16:11:37 -08:00
Noel Eck
567476b89a cmake: Explicit dependency for mraa and interfaces
A handful of modules do not require mraa.  Captured this in
    src/CMakeLists.txt - only add mraa dependency for targets which
    use:

        upm_module_init(mraa ... )
            or
        upm_mixed_module_init(... REQUIRES mraa)

    All sensors which use UPM interfaces (src/interfaces) now
    explicitly add the interfaces target:

        upm_module_init(interfaces ... )
            or
        upm_mixed_module_init(... REQUIRES interfaces)

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-02-06 16:52:27 -08:00
Jon Trulson
8d5278b9d4 CMakeLists.txt: Bump minimum MRAA version to 1.4.0
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-19 16:26:48 -07:00
Mihai Tudor Panu
cde747439f upm: v1.0.2
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-12-08 15:47:13 -08:00
Noel Eck
232089f400 cmake: Check for JAVA in top-level CMakeLists.txt
Moved require for Java/JNI/mraajava to top-level CMakeLists.txt
which will fail early if these are NOT found (vs failing in
the src-level CMakeLists.txt

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-11-29 15:14:32 -08:00
Noel Eck
09144e712b cmake: Consolidated BUILDJAVAEXAMPLES and BUILDEXAMPLES
The java examples will now build if BUILDSWIGJAVA=on and
BUILDEXAMPLES=on.  This is similar to the C/C++ examples.

    * Replaced BUILDJAVAEXAMPLES w/BUILDEXAMPLES
    * Updated docs
    * Updated travis-ci

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-11-29 12:25:25 -08:00
Noel Eck
d4559878df cmake: Removed -dirty from VERSION if git_describe fails
* Removed -dirty
    * Also removed redundant set(PACK_PACKAGE_VERSION ...
      since the first gets overwritten by the second

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-11-22 15:03:14 -08:00
Noel Eck
a2698fd560 upm: v1.0.1
Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-11-21 12:20:03 -08:00
Jon Trulson
7bc9ef0150 cmake: disable some other warnings seen with edison gcc 4.9.1
Also, fix possible uninitialized access in ds1808lc C++ example.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-11-11 10:44:43 -07:00
Noel Eck
cdc33ceb9f bitbake: Fix for pthreads C test w/yocto
Fixed a problem where the C/CXX compile flags were getting
overwritten.  Fixed warnings in a few sensor drivers.

This commit fixes #485

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-11-08 16:28:54 -08:00
Noel Eck
68091dcf43 werror: Don't emit -Wmisleading-indentation warnings
GCC-6 added -Wmisleading-indentation to -Wall.  Skip these for now.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-11-07 16:46:57 -08:00
Noel Eck
9be920dbcd cxx_warnings: Misc changes to enable Werror
* CMake option to enable -Werror as default
    * Change to make sure all cxx examples have correct target name
    * Added PUBLIC CXX compiler flags to ads1x15 and ozw targets to
      work around compiler warnings
    * Renamed cmake variable for compiler warnings

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-11-03 16:45:32 -07:00
Mihai Tudor Panu
13e2e7aeb8 upm: v1.0.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-10-31 14:37:19 -07:00
Mihai Tudor Panu
ebda525f85 npm: add target to generate tarballs with sources needed by NPM for publishing modules
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-10-31 10:13:08 -07:00
Noel Eck
585f2eb331 cmake: Added return/clear variable to function
Made sure output_variable gets cleared for case where
target compiler is not supported.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-10-26 11:42:20 -07:00
Noel Eck
e21e05a039 tests: Default ctest option to off
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>
2016-10-26 11:32:57 -07:00
Jon Trulson
df0a23f702 CMakeLists.txt: make sure compiler standards extensions are disabled.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-25 16:13:41 -06:00