From a9021607235444c7b660985fdc35094c9782060f Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Thu, 16 Dec 2010 15:43:18 +0100 Subject: VWR-24251: Fix -DLL_TESTS:BOOL=ON on standalone when Tut is installed in a non-standard directory. If tut/tut.hpp isn't installed in a standard include directory all tests fail because the found include directory for tut isn't passed to the compiler. This patch fixes this by passing it. Note that using include_directories() in a Find*.cmake file is bad practise. The correct way is to set an include dir variable and call include_directories() once. It certainly doesn't work for the tests anyway because the tests are all over the place and include_directories is on a per folder basis. What is needed is to set it for each (test) target. However, there is no TARGET_INCLUDE_DIRECTORIES. The closest thing that we have is to set the COMPILE_FLAGS property for a target. Fortunately, standalone is only used for linux, so we can just use -I${TUT_INCLUDE_DIR} to get the effect we want. --- indra/cmake/Tut.cmake | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/cmake/Tut.cmake') diff --git a/indra/cmake/Tut.cmake b/indra/cmake/Tut.cmake index 784560471d..738c08c42f 100644 --- a/indra/cmake/Tut.cmake +++ b/indra/cmake/Tut.cmake @@ -6,7 +6,6 @@ set(TUT_FIND_QUIETLY TRUE) if (STANDALONE) include(FindTut) - include_directories(${TUT_INCLUDE_DIR}) else (STANDALONE) use_prebuilt_binary(tut) endif (STANDALONE) -- cgit v1.2.3