summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKevin Rocard <kevin.rocard@intel.com>2015-03-11 11:46:32 +0100
committerEric Laurent <elaurent@google.com>2015-04-24 13:32:47 -0700
commit747bb84d27518ba1ab0c49d619a812b43222fdcf (patch)
treec3761b748c87883d4fbd77fefd69177dee58c9c5 /CMakeLists.txt
parent7fe36eead17ee1afb9ba26e1e4eb8613b559f71d (diff)
downloadexternal_parameter-framework-747bb84d27518ba1ab0c49d619a812b43222fdcf.zip
external_parameter-framework-747bb84d27518ba1ab0c49d619a812b43222fdcf.tar.gz
external_parameter-framework-747bb84d27518ba1ab0c49d619a812b43222fdcf.tar.bz2
Modularise build using cmake options
The parameter framework can build lots of components including but not limited to core c++ lib, c api, python api, bash completion... All those modules are not always wanted, especially if they have external dependencies as it force the builder to install them. Conditionally define non core build modules. The builder can disable feature by providing -D <FEATURE>=OFF to deactivate them. The following options are available: - PYTHON_BINDINGS: Break swig dependencies - BASH_COMPLETION: If the target does not have bash - COVERAGE: Default to off, set to on to build c/c++ with coverage flags. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fcef282..0cddfd3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,6 +38,12 @@ project(parameter-framework)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra")
+option(COVERAGE "Build with coverage support" OFF)
+if(COVERAGE)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
+endif()
+
add_subdirectory(xmlserializer)
add_subdirectory(parameter)
add_subdirectory(utility)
@@ -52,7 +58,11 @@ configure_file(CTestCustom.cmake ${CMAKE_BINARY_DIR} COPYONLY)
add_subdirectory(test/test-platform)
add_subdirectory(test/test-fixed-point-parameter)
-add_subdirectory(tools/bash_completion)
+option(BASH_COMPLETION "Install bash completion configuration" ON)
+if (BASH_COMPLETION)
+ add_subdirectory(tools/bash_completion)
+endif()
+
add_subdirectory(tools/xmlGenerator)
add_subdirectory(tools/xmlValidator)