From 5aaddd16f2aabccf07687f1761567eb6455abe61 Mon Sep 17 00:00:00 2001 From: Adrien M Date: Fri, 20 Mar 2015 19:03:32 +0100 Subject: Dissociate 'make test' & 'make install' Possibility to run the test without having to lunch the 'make install' command. Signed-off-by: Adrien M --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CMakeLists.txt') 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) -- cgit v1.1