View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014300CMakeCMakepublic2013-07-18 05:142016-06-10 14:31
Reporterherbrechtsmeier 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
Platformx86_64OSUbuntuOS Version10.04.4
Product VersionCMake-2-8 
Target VersionFixed in Version 
Summary0014300: The _CMAKE_TOOLCHAIN_LOCATION variable doesn't work in combination with CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY.
DescriptionThe _CMAKE_TOOLCHAIN_LOCATION variable is set to the real path (including the system root) in CMakeDetermineCCompiler.cmake module. In the CMakeFindBinUtils.cmake module this path is interpreted as relative path in the find root paths. Additionally it is impossible to pass a path which is outside of the system root or the CMAKE_FIND_ROOT_PATH.

The later is used in the cross build environment OpenEmbedded which only use the compiler from the build system and therefore set CMAKE_FIND_ROOT_PATH_MODE_* to ONLY during native builds.
Steps To Reproduce- Create a toolchain file:
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_C_COMPILER /usr/bin/gcc)
set(CMAKE_CXX_COMPILER /usr/bin/g++)
set(CMAKE_FIND_ROOT_PATH /path/to/system/root)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

- Create a CMakeLists.txt
make_minimum_required(VERSION 2.8)
message("${_CMAKE_TOOLCHAIN_LOCATION}")
message("${CMAKE_C_COMPILER}")
message("${CMAKE_AR}")

- Run cmake -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake .

- Output
/usr/bin
/usr/bin/gcc
CMAKE_AR-NOTFOUND
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0042321)
Kitware Robot (administrator)
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.

 Issue History
Date Modified Username Field Change
2013-07-18 05:14 herbrechtsmeier New Issue
2016-06-10 14:29 Kitware Robot Note Added: 0042321
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team