[opensource-dev] Review Request: VWR-24251: Fix -DLL_TESTS:BOOL=ON on standalone when Tut is installed in a non-standard directory.

Aleric Inglewood Aleric.Inglewood at gmail.com
Sun Dec 19 07:18:51 PST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/44/
-----------------------------------------------------------

Review request for Viewer.


Summary
-------

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.


This addresses bug VWR-24251.
    http://jira.secondlife.com/browse/VWR-24251


Diffs
-----

  indra/cmake/LLAddBuildTest.cmake b0689af42a71 
  indra/cmake/Tut.cmake b0689af42a71 
  indra/test/CMakeLists.txt b0689af42a71 

Diff: http://codereview.secondlife.com/r/44/diff


Testing
-------

Tested with standalone and tut.hpp installed in a non-standard place *after applying VWR-24247* of course.
All tests compile and pass (on linux 64bit).


Thanks,

Aleric

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20101219/d3e0746f/attachment.htm 


More information about the opensource-dev mailing list