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>
This commit is contained in:
Noel Eck 2016-11-29 12:25:25 -08:00
parent 2d94c2ed90
commit 09144e712b
3 changed files with 5 additions and 9 deletions

View File

@ -36,7 +36,7 @@ script:
- sudo make install - sudo make install
- sudo ldconfig - sudo ldconfig
# Build/install UPM # Build/install UPM
- cd $UPM_ROOT && mkdir $UPM_BUILD && cd $_ && cmake -DNODE_ROOT_DIR:PATH="${NODE_ROOT_DIR}" -DBUILDSWIGJAVA=$BUILDJAVA -DBUILDEXAMPLES=ON -DBUILDJAVAEXAMPLES=$BUILDJAVA -DBUILDTESTS=ON -DBUILDFTI=ON .. && sudo make install && sudo ldconfig && ctest --output-on-failure -E examplenames_js - cd $UPM_ROOT && mkdir $UPM_BUILD && cd $_ && cmake -DNODE_ROOT_DIR:PATH="${NODE_ROOT_DIR}" -DBUILDSWIGJAVA=$BUILDJAVA -DBUILDEXAMPLES=ON -DBUILDTESTS=ON -DBUILDFTI=ON .. && sudo make install && sudo ldconfig && ctest --output-on-failure -E examplenames_js
addons: addons:
apt: apt:
sources: sources:

View File

@ -8,8 +8,7 @@ option (BUILDFTI "Build Funtion Table Interface (FTI) in C sensor libraries" OFF
option (BUILDSWIGPYTHON "Build swig python modules" ON) option (BUILDSWIGPYTHON "Build swig python modules" ON)
option (BUILDSWIGNODE "Build swig node modules" ON) option (BUILDSWIGNODE "Build swig node modules" ON)
option (BUILDSWIGJAVA "Build swig java modules" OFF) option (BUILDSWIGJAVA "Build swig java modules" OFF)
option (BUILDEXAMPLES "Build C/C++ example binaries" OFF) option (BUILDEXAMPLES "Build C/C++/JAVA examples" OFF)
option (BUILDJAVAEXAMPLES "Build java example jars" OFF)
option (IPK "Generate IPK using CPack" OFF) option (IPK "Generate IPK using CPack" OFF)
option (RPM "Generate RPM using CPack" OFF) option (RPM "Generate RPM using CPack" OFF)
option (NPM "Generate NPM/GYP tarballs" OFF) option (NPM "Generate NPM/GYP tarballs" OFF)
@ -417,7 +416,8 @@ if(BUILDEXAMPLES)
endif(BUILDCPP) endif(BUILDCPP)
endif() endif()
if(BUILDJAVAEXAMPLES) # Build java examples
if(BUILDSWIGJAVA AND BUILDEXAMPLES)
add_subdirectory (examples/java) add_subdirectory (examples/java)
endif() endif()

View File

@ -80,14 +80,10 @@ Building documentation
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
-DBUILDDOC=ON -DBUILDDOC=ON
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
Build C++ example binaries Build C/C++/JAVA examples
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
-DBUILDEXAMPLES=ON -DBUILDEXAMPLES=ON
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
Build Java examples
~~~~~~~~~~~~~
-DBUILDJAVAEXAMPLES=ON
~~~~~~~~~~~~~
If you intend to turn on all the options and build everything at once If you intend to turn on all the options and build everything at once
(C++, Java, Node, Python and Documentation) you will have to edit the (C++, Java, Node, Python and Documentation) you will have to edit the