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>
This commit is contained in:
Noel Eck
2017-04-03 14:39:11 -07:00
parent 76a12af15f
commit 048f1ac08e
57 changed files with 160 additions and 600 deletions

View File

@ -510,6 +510,11 @@ function (UPM_MIXED_MODULE_INIT)
target_link_libraries (${libname} utilities-c)
endif()
# Add include directories for C
target_include_directories (${libname} PUBLIC
${UPM_COMMON_HEADER_DIRS}
${CMAKE_SOURCE_DIR}/src/utilities)
## "export" the logical C lib target for the calling module's
## CMakeLists.txt
set (libnamec ${libname} PARENT_SCOPE)