MantisBT - CMake
View Issue Details
0014337CMakeCMakepublic2013-08-03 12:302016-06-10 14:31
Boulougou 
Kitware Robot 
normalmajoralways
closedmoved 
x86_64Ubuntu12.10
CMake 2.8.9 
 
0014337: CMAKE_FIND_ROOT_PATH is ignored in CMake 2.8.9, works for CMake 2.8.7
I recently checked out my project on an Ubuntu 12.10 installation that has CMake 2.8.9. Until now I was working on a machine with older cmake version(CMake 2.8.7)

I have a toolchain file for cross compilation that sets CMAKE_FIND_ROOT_PATH variable. And I have several FindXXXX() in my scripts that search for installed libraries.

However when I run cmake(on the new machine) it complains that it cannot find the library(openal specifically). Adding a message(${CMAKE_FIND_ROOT_PATH}) at top of cmake-2.8/Modules/FindOpenAL.cmake reveals that CMAKE_FIND_ROOT_PATH has the correct value.

I downloaded the latest version(cmake-2.8.11.2-Linux-i386.tar.gz) and it has the same behavior.
I tried with cmake-2.8.7-Linux-i386.tar.gz and it worked. Exactly the same toolchain file, same CMakeLists.txt files, just different cmake binary.

I checked documentation and I didn't any major difference between CMake 2.8.7 and CMake 2.8.9.
No tags attached.
Issue History
2013-08-03 12:30BoulougouNew Issue
2014-03-14 06:43Dmitriy VilkovNote Added: 0035399
2014-03-14 06:44Dmitriy VilkovNote Edited: 0035399bug_revision_view_page.php?bugnote_id=35399#r1398
2014-03-14 07:01Dmitriy VilkovNote Edited: 0035399bug_revision_view_page.php?bugnote_id=35399#r1399
2015-08-28 04:21Eric BeuqueNote Added: 0039342
2016-06-10 14:29Kitware RobotNote Added: 0042343
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0035399)
Dmitriy Vilkov   
2014-03-14 06:43   
(edited on: 2014-03-14 07:01)
I have the same issue with CMake 2.8.12.
Even "ONLY_CMAKE_FIND_ROOT_PATH" for find_path does not help.
But setting "PATHS ${CMAKE_FIND_ROOT_PATH}" and "NO_CMAKE_FIND_ROOT_PATH" works.

(0039342)
Eric Beuque   
2015-08-28 04:21   
I got the same with CMake 3.3.1.

I compile with on Windows 7 using a Mingw32 compiler (i686-4.8.2-posix-dwarf-rt_v3-rev4).

Trying to find include fails. I needed to add path in the INCLUDE env variable to get it works.
(0042343)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.