summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAdrien M <adrienx.martin@intel.com>2015-03-20 19:03:32 +0100
committerEric Laurent <elaurent@google.com>2015-04-24 13:39:12 -0700
commit5aaddd16f2aabccf07687f1761567eb6455abe61 (patch)
tree62a4adda1e9f000614247e06f88db3359e637961 /CMakeLists.txt
parent19aa05b33990302d2388b8c90eeb71a3509e6320 (diff)
downloadexternal_parameter-framework-5aaddd16f2aabccf07687f1761567eb6455abe61.zip
external_parameter-framework-5aaddd16f2aabccf07687f1761567eb6455abe61.tar.gz
external_parameter-framework-5aaddd16f2aabccf07687f1761567eb6455abe61.tar.bz2
Dissociate 'make test' & 'make install'
Possibility to run the test without having to lunch the 'make install' command. Signed-off-by: Adrien M <adrienx.martin@intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e42b6be..e5614a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,6 +38,9 @@ project(parameter-framework)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra")
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
+
option(COVERAGE "Build with coverage support" OFF)
if(COVERAGE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
@@ -55,6 +58,13 @@ include(CTest)
# Ctest requires its configuration to be placed at the build root
configure_file(CTestCustom.cmake ${CMAKE_BINARY_DIR} COPYONLY)
+function(set_test_env TestName)
+ set_property(TEST ${TestName} PROPERTY ENVIRONMENT
+ PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}:$ENV{PATH}
+ LD_LIBRARY_PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:$ENV{LD_LIBRARY_PATH}
+ PYTHONPATH=${CMAKE_BINARY_DIR}/bindings/python:$ENV{PYTHONPATH})
+endfunction()
+
add_subdirectory(test/test-platform)
add_subdirectory(test/test-fixed-point-parameter)
add_subdirectory(test/tokenizer)