[CMake] CMake 2.8.5 problem with include directories with response files
Peter Visser
pervulgo at gmail.com
Fri Aug 12 07:42:30 EDT 2011
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.
More information about the CMake
mailing list