[cmake-developers] Modifying RPATH feature to run tests uninstalled

Marcel Loose loose at astron.nl
Fri Feb 17 06:24:01 EST 2012


Hi Stephen,

On Fri, 2012-02-17 at 12:06 +0100, Stephen Kelly wrote:

-- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< --

> diff --git a/templates/tests/CMakeLists.txt
b/templates/tests/CMakeLists.txt
> index d2e37d2..ad471c7 100644
> --- a/templates/tests/CMakeLists.txt
> +++ b/templates/tests/CMakeLists.txt
> @@ -83,6 +83,7 @@ macro(GRANTLEE_TEMPLATES_UNIT_TESTS)
>                    ${_testresource_rcc_src}
>      )
>      add_test(${_testname} ${_testname}_exec )
> +    set_property(TEST ${testname} PROPERTY ENVIRONMENT 
> "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/templates/lib")
> 
> 
> Do you see anything wrong there?

You should use ${_testname} in the set_property() command. Don't you get
an error message from CMake? Or do you happen to have a variable
"testname" as well.

> 
> Thanks,
> 
> Steve.

Cheers,
Marcel.





More information about the cmake-developers mailing list