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

Boroondas Gupte sllists at boroon.dasgupta.ch
Sun Dec 19 04:03:39 PST 2010


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



indra/cmake/FindTut.cmake
<http://codereview.secondlife.com/r/39/#comment27>

    According to the CMake 2.8.1 man page, NO_SYSTEM_ENVIRONMENT_PATH makes find_path not only skip $PATH but also $INCLUDE. I think we should respect the latter when looking for headers.


- Boroondas


On 2010-12-18 09:01:35, Aleric Inglewood wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/39/
> -----------------------------------------------------------
> 
> (Updated 2010-12-18 09:01:35)
> 
> 
> 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/20101219/8f34eda7/attachment.htm 


More information about the opensource-dev mailing list