View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013392CMakeCMakepublic2012-07-11 10:222013-04-17 08:54
ReporterStephen Kelly 
Assigned ToDavid Cole 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformWindows NMake MakefilesOSOS Version
Product VersionCMake 2.8.9 
Target VersionCMake 2.8.11Fixed in VersionCMake 2.8.11 
Summary0013392: Lazy Qt resource loading does not work with NMake Makefiles
DescriptionThe patch in 9ce67d30011db4528d3d0bbee36412e13cfb80cc does not work with NMake Makefiles. Using the test at

http://qt.gitorious.org/qt/qtbase/blobs/HEAD/tests/auto/cmake/test_add_resources_delyed_file/CMakeLists.txt [^]

:


C:\dev\steve_cmake_test\build>cmake .. -G "NMake Makefiles"
-- The C compiler identification is MSVC 16.0.40219.1
-- The CXX compiler identification is MSVC 16.0.40219.1
-- Check for CL compiler version
-- Check for CL compiler version - 1600
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - no
-- Check for working C compiler: c:/Program Files (x86)/Microsoft Visual Studio
10.0/VC/bin/cl.exe
-- Check for working C compiler: c:/Program Files (x86)/Microsoft Visual Studio
10.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe
-- Check for working CXX compiler: c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found.
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt4: c:/dev/4.8vs10/bin/qmake.exe (found version "4.8.2")
-- Configuring done
-- Generating done
-- Build files have been written to: C:/dev/steve_cmake_test/build
 
C:\dev\steve_cmake_test\build>nmake
 
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
 
CMakeFiles\test_cmake.dir\build.make(54) : fatal error U1033: syntax error : ':' unexpected
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
 
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0030626)
David Cole (manager)
2012-08-13 15:41

Clinton, this one had been requested for 2.8.9 -- do you have time to get to it for 2.8.10, or should we put it in the backlog for now?
(0030628)
Clinton Stimpson (developer)
2012-08-13 22:59

This looks more like a problem with the NMake generator.

Its giving a build.make file with
qrc_my.cxx : c:\path\to\dir\
qrc_my.cxx : my.qrc
  \path\to\rcc.exe ....

The add_custom_command() call in Qt4Macros.cmake isn't giving that directory, so it appears to be put there by the NMake generator.
If I edit build.make and remove the trailing '\' then the problem goes away.
(0030629)
Clinton Stimpson (developer)
2012-08-13 23:11

Oh, I see where it is coming from... Here's an easy way to reproduce it.
There is an quoted empty variable on the DEPENDS line. The quotes are to safeguard against spaces.

====

set(extra_dep)

add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/qrc_my.cxx
                   COMMAND ${CMAKE_COMMAND} -E touch "${CMAKE_BINARY_DIR}/qrc_my.cxx"
                   DEPENDS "${extra_dep}" "${CMAKE_BINARY_DIR}/my.qrc" )

add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/my.qrc
                   COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/my.qrc)

add_library(qrc SHARED ${CMAKE_BINARY_DIR}/qrc_my.cxx)
=====

The empty strings in DEPENDS result in directories being added to the rules.
(0030634)
David Cole (manager)
2012-08-14 07:07

OK -- thanks for the info. We can probably fix that (hopefully without ill side-effects) in the NMake generator.
(0031272)
David Cole (manager)
2012-10-18 11:19

Not enough time left to address this issue for 2.8.10, deferring to 2.8.11
(0031644)
David Cole (manager)
2012-11-21 14:25

Fix pushed and merged to the 'next' branch:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ae7d6650344f7a36216af8424abbf0b834688d1 [^]

The parent commit adds a test that failed before the fix commit, and passes afterwards:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=078e35defbe6e0ee3b216dd2e83ca85d49920fc3 [^]
(0032876)
Robert Maynard (manager)
2013-04-17 08:54

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

 Issue History
Date Modified Username Field Change
2012-07-11 10:22 Stephen Kelly New Issue
2012-07-11 10:22 Stephen Kelly Status new => assigned
2012-07-11 10:22 Stephen Kelly Assigned To => Clinton Stimpson
2012-08-08 13:07 David Cole Target Version CMake 2.8.9 => CMake 2.8.10
2012-08-13 15:41 David Cole Note Added: 0030626
2012-08-13 22:59 Clinton Stimpson Note Added: 0030628
2012-08-13 23:11 Clinton Stimpson Note Added: 0030629
2012-08-14 07:07 David Cole Note Added: 0030634
2012-08-14 07:08 David Cole Assigned To Clinton Stimpson => David Cole
2012-10-18 11:19 David Cole Note Added: 0031272
2012-10-18 11:19 David Cole Target Version CMake 2.8.10 => CMake 2.8.11
2012-11-21 14:25 David Cole Note Added: 0031644
2012-11-21 14:25 David Cole Status assigned => resolved
2012-11-21 14:25 David Cole Fixed in Version => CMake 2.8.11
2012-11-21 14:25 David Cole Resolution open => fixed
2013-04-17 08:54 Robert Maynard Note Added: 0032876
2013-04-17 08:54 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team