[opensource-dev] Review Request: VWR-24247: develop.py configure still searches for the wrong header file when checking for Tut

Aleric Inglewood Aleric.Inglewood at gmail.com
Sat Dec 18 09:01:35 PST 2010


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

Review request for Viewer.


Summary
-------

There is no #include "tut.h" anywhere.
The only includes are #include "tut/tut.hpp" (which is correct).
Tut installs in <prefix>/include/tut/* among which the headerfile tut.hpp.
The changed file, indra/cmake/FindTut.cmake, is only included when configured with --standalone (and thus only on linux).
find_path searches in /usr/include and /usr/local/include anyway, so there is no way to add that.
Adding the NO_SYSTEM_ENVIRONMENT_PATH stops it from reading the PATH environment variable and looking
for tut/tut.hpp, which probably won't harm, but it simply makes no sense: we're looking for a headerfile, not an executable.

Without this patch (and without creating a fake /usr/local/include/tut.h), I get the error:
CMake Error at cmake/FindTut.cmake:26 (message):
  Could not find Tut
Call Stack (most recent call first):
  cmake/Tut.cmake:8 (include)
  llmessage/CMakeLists.txt:13 (include)

With the patch, it finds /usr/local/include/tut/tut.hpp as expected, setting TUT_INCLUDE_DIR to "/usr/local/include",
and it also finds (in my case) /usr/src/secondlife/viewers/snowstorm/viewer-development/include/tut/tut.hpp, setting
TUT_INCLUDE_DIR to "/usr/src/secondlife/viewers/snowstorm/viewer-development/include", since I have a symbolic
link from /usr/src/secondlife/viewers/snowstorm/viewer-development/include/tut to ../linden/libraries/include/tut
(which was installed manually with ./scripts/install.py tut) and I have the environment variable CMAKE_INCLUDE_PATH
set to "/usr/src/secondlife/llqtwebkit/install-imprudence/include:/usr/src/secondlife/viewers/snowstorm/viewer-development/include:/sl/usr/include".
In other words, this allows developers to install headers whereever they want and use the API of cmake as it is
intended, to find those headers.


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


Diffs
-----

  indra/cmake/FindTut.cmake b0689af42a71 

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


Testing
-------

Tested to see if it finds the header when installed in /usr/local/include as well in a path specified
with CMAKE_INCLUDE_PATH.

Note that you need to configure with --standalone in order to test this.
Also note that unless tut is installed in /usr/local, and when you configure with -DLL_TESTS:BOOL=ON,
it still won't compile because of another bug. I will submit a patch for that separately.


Thanks,

Aleric

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20101218/96d904ff/attachment-0001.htm 


More information about the opensource-dev mailing list