[CMake] Problem with get_filename_component() and CMAKE_CXX_COMPILER when finding Qt4
Petr Kmoch
petr.kmoch at gmail.com
Mon Apr 22 08:26:57 EDT 2013
Hi all.
I'm using CMake 2.8.10.2 to do a Visual Studio 2010 64-bit build, and I
encountered a weird problem with the CMake configure step failing, with the
following output:
CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeCXXInformation.cmake:37
(get_filename_component):
get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
CMakeLists.txt:2 (PROJECT)
I managed to pinpoint this to an issue with try_compile in FindQt4. I am
attaching a minimal test case as well as output of cmake --trace. The
CMakeList is just this:
#
cmake_minimum_required(VERSION 2.8.10.2)
project(MyTest C CXX)
find_package(Qt4 COMPONENTS QtCore REQUIRED)
#
The C and CXX compilers are discovered OK, but then the find reports the
error.
I've seen similar errors related to Visual Studio 2010 & 2012 parallel
installs, but the machine has never had 2012 installed on it; it just has
2005 and 2010.
Would anyone have any ideas how to fix this? Thanks in advance for any
pointers.
Petr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130422/b2bc1ef4/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake-test.zip
Type: application/zip
Size: 25023 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130422/b2bc1ef4/attachment-0001.zip>
More information about the CMake
mailing list