[CMake] CMake 2.8.5 problem with include directories with response files

David Cole david.cole at kitware.com
Fri Aug 12 09:17:12 EDT 2011


Sounds like you're using "MSYS Makefiles" but then running make from a
non-MSYS shell.

If you want to run in a non-MSYS shell, then you should use "MinGW
Makefiles" instead. (Start over with an entirely clean build tree if
you do this...)

If you use "MSYS Makefiles", you should run make from an MSYS shell,
where "/usr/local" should be an acceptable path.


HTH,
David


On Fri, Aug 12, 2011 at 7:42 AM, Peter Visser <pervulgo at gmail.com> wrote:
> Hello,
>
> I experience a problem with "include directories with response files" when
> upgrading from CMake 2.8.4 to CMake 2.8.5. The problem is probably that gcc
> does not handle the response files correctly. Is it possible to disable the
> response files with an option in CMake ?
>
> I have a small "HelloWorld" wxWidgets example.
> The makefile is generated for MSYS : cmake -G "MSYS Makefiles"
> wxWidgets include directories are set with  FIND_PACKAGE(wxWidgets)
>
> The compile line:
> /C/Programs/MinGWGet/bin/g++.exe   -D__WXMSW__ -mthreads -O3 -DNDEBUG
> @CMakeFiles/HelloWorld.dir/includes_CXX.rsp   -o
> CMakeFiles/HelloWorld.dir/HelloWorld.cpp.obj -c
> /D/examples/001_HelloWorld/src/HelloWorld.cpp
>
> The problem:
> HelloWorld.cpp:7:20: fatal error: wx/wx.h: No such file or directory
> compilation terminated.
>
> The content of the response file is good:
> -isystem
> /usr/local/wx2812-release-static/lib/wx/include/msw-ansi-release-static-2.8
> -isystem /usr/local/wx2812-release-static/include/wx-2.8
>
> when the content is put on the command line, the include files are found and
> HelloWorld compiles just fine.
>
> Playing a bit with (--verbose) gave the following result:
>
> GNU C++ (GCC) version 4.5.2 (mingw32)
>        compiled by GNU C version 4.5.2, GMP version 5.0.1, MPFR version
> 2.4.1, MPC version 0.8.1
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
> ignoring nonexistent directory
> "/usr/local/wx2812-release-static/lib/wx/include/msw-ansi-release-static-2.8"
> ignoring nonexistent directory
> "/usr/local/wx2812-release-static/include/wx-2.8"
>
> The paths are valid but not understood by gcc when read from the response
> file. If I change the content of the response file to:
> -Ic:/programs/mingw/msys/1.0/local/wx2812-release-static/lib/wx/include/msw-ansi-release-static-2.8/
> -Ic:/programs/mingw/msys/1.0/local/wx2812-release-static/include/wx-2.8
>
> It also works fine, so in short when -isystem is in a response file it does
> not work :-(
> Is there a way to influence the way CMake generates the response file,
> disabling it or forcing an absolute path instead of the -isystem path ?
> Or should the FIND_PACKAGE(wxWidgets) generate an absolute path ?
>
> Best regards,
>
> Peter.
> _______________________________________________
> 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
>


More information about the CMake mailing list