View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013800CMakeCMakepublic2012-12-17 06:282014-06-02 08:37
ReporterJonathan De Wachter 
Assigned ToStephen Kelly 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0013800: Only one directory taken into account (CMAKE_FIND_ROOT_PATH)
DescriptionCMake doesn't search at *all* path defined by CMAKE_FIND_ROOT_PATH (at least for headers include).

I can get my headers found for the first path defined but the second, the third... it doesn't work.

My scenario is a compiler split and located at different location (you'll find some headers and libraries located in several external directories).

This is the case for Android compilers provided by the NDK which include the STL library version according:
- the Android API you are targeting
- the compiler brand/version.

This is the main compiler directory:
$NDK/toolchains/arm-compiler/bin/<compilers here>
$NDK/toolchains/arm-compiler/include/<several files but no stl headers>

This is an external directory including some headers and libraries:
$NDK/platforms/android-9/include<again some several files but no stl headers>
$NDK/platforms/android-14/include<again some several files but no stl headers>

This is another external directory including several STL versions:
$NDK/sources/cxx-stl/gnu-libstdc++/4.6/<stl headers>
$NDK/sources/cxx-stl/gnu-libstdc++/4.4.3/<stl headers>
$NDK/sources/cxx-stl/stlport/stlport/<stl headers>

The goal is pick up the right headers/libraries and so make a customized compiler suitable for the targeted mobile and the targeted os.
Additional InformationI know I actually should use a script which generates a standalone compiler with all headers/libraries at a same location. But I don't want that.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0033465)
Stephen Kelly (developer)
2013-07-03 12:02

I can't reproduce this. It works for me with a simple CMakeLists:


cmake_minimum_required(VERSION 2.8)
project(Foo)

find_path(DIR1_RESULT dir1.h)
find_path(DIR2_RESULT dir2.h)

message("DIR1 : ${DIR1_RESULT}")
message("DIR2 : ${DIR2_RESULT}")


stephen@hal:~/dev/src/playground/cmake/build{master}$ mkdir -p prefix{1,2}/include
stephen@hal:~/dev/src/playground/cmake/build{master}$ touch prefix1/include/dir1.h
stephen@hal:~/dev/src/playground/cmake/build{master}$ touch prefix2/include/dir2.h
stephen@hal:~/dev/src/playground/cmake/build{master}$ cmake .. -DCMAKE_FIND_ROOT_PATH="$PWD/prefix1;$PWD/prefix2"
-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler: /usr/lib/icecc/bin/cc
-- Check for working C compiler: /usr/lib/icecc/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/icecc/bin/c++
-- Check for working CXX compiler: /usr/lib/icecc/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
DIR1 : /home/stephen/dev/src/playground/cmake/build/prefix1/include
DIR2 : /home/stephen/dev/src/playground/cmake/build/prefix2/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stephen/dev/src/playground/cmake/build
(0035980)
Robert Maynard (manager)
2014-06-02 08:37

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-12-17 06:28 Jonathan De Wachter New Issue
2013-07-03 12:02 Stephen Kelly Note Added: 0033465
2013-11-02 09:08 Stephen Kelly Status new => resolved
2013-11-02 09:08 Stephen Kelly Resolution open => no change required
2013-11-02 09:08 Stephen Kelly Assigned To => Stephen Kelly
2014-06-02 08:37 Robert Maynard Note Added: 0035980
2014-06-02 08:37 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team