Quantcast

CMAKE_FIND_ROOT_PATH and cross-compilation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

CMAKE_FIND_ROOT_PATH and cross-compilation

Marcel Loose
Hi all,

Is there a way to globally set a variable or property that forces each
find_xxx() command to only use CMAKE_FIND_ROOT_PATH when searching for
files?

The reason I'm asking this is that I'm getting errors like this:

  Cannot generate a safe runtime search path for target getparsetvalue
  because files in some directories may conflict with libraries in
  implicit directories:

    runtime library [libz.so.1] in /usr/lib may be hidden by files in:
      /bgsys/drivers/ppcfloor/linux/OS/usr/lib

  Some of these libraries may not be found correctly.

I suspect it has to do with find_xxx() not only searching in
CMAKE_FIND_ROOT_PATH but also in system directories.

Now I know that you can add ONLY_CMAKE_FIND_ROOT_PATH to a find_xxx()
option. However, I only need this when cross-compiling.

In the documentation I saw a hint about CMAKE_FIND_ROOT_PATH_MODE_XXX,
but I couldn't find any more info on that. Is this the variable I'm
looking for? And if so, is it a boolean?

Best regards,
Marcel Loose.


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMAKE_FIND_ROOT_PATH and cross-compilation

Hendrik Sattler
Zitat von Marcel Loose <[hidden email]>:
> Now I know that you can add ONLY_CMAKE_FIND_ROOT_PATH to a find_xxx()
> option. However, I only need this when cross-compiling.
>
> In the documentation I saw a hint about CMAKE_FIND_ROOT_PATH_MODE_XXX,
> but I couldn't find any more info on that. Is this the variable I'm
> looking for? And if so, is it a boolean?

http://www.cmake.org/Wiki/CMake_Cross_Compiling
answers all those questions.

BTW: the variables are explained in the documentation of the find_*()  
functions that are affected by them.

HS


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Loading...