Re: [CMake] Include directories problem when cross compiling with MinGW

2016-09-19 Thread David Demelier
2016-09-12 23:22 GMT+02:00 Maciej Mrozowski :
> On piątek, 2 września 2016 13:12:27 CEST David Demelier wrote:
>
>> Do you have any clue?
>
> It seems your toolchain does not have include/library path built-in or they
> are different that those it was built with.


After some discuss with ngladitz, we discovered some troubles between
gcc 6 and CMake which both have safety guards. We finally added
CMAKE__IMPLICIT_INCLUDE_DIRECTORIES as workaround in our MinGW
scripts and it works fine at the moment.

Thanks for feedback :)

-- 
Demelier David
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Include directories problem when cross compiling with MinGW

2016-09-12 Thread Maciej Mrozowski
On piątek, 2 września 2016 13:12:27 CEST David Demelier wrote:

> Do you have any clue?

It seems your toolchain does not have include/library path built-in or they 
are different that those it was built with.
You can inspect them by passing one of below parameters to mingw-*-gcc:

  -print-search-dirs   Display the directories in the compiler's search 
path
  -print-libgcc-file-name  Display the name of the compiler's companion 
library
  -print-file-name=   Display the full path to library 
  -print-prog-name=  Display the full path to compiler component 
  -print-multiarch Display the target's normalized GNU triplet, used 
as
   a component in the library path
  -print-multi-directory   Display the root directory for versions of libgcc
  -print-multi-lib Display the mapping between command line options 
and
   multiple library search directories
  -print-multi-os-directory Display the relative path to OS libraries
  -print-sysroot   Display the target libraries directory
  -print-sysroot-headers-suffix Display the sysroot suffix used to find 
headers

In any case, you should additionally set sysroot via CMAKE_CXX_FLAGS (or 
CMAKE_CXX_COMPILER) in your toolchain file:

--sysroot=dir

-- 
regards
MM
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake