[cmake-developers] [CMake 0012551]: New CMAKE_AUTOMOC feature breaks when re-configuring

2011-11-02 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://public.kitware.com/Bug/view.php?id=12551 
== 
Reported By:Paul Gideon Dann
Assigned To:
== 
Project:CMake
Issue ID:   12551
Category:   CMake
Reproducibility:always
Severity:   major
Priority:   normal
Status: new
== 
Date Submitted: 2011-11-02 08:09 EDT
Last Modified:  2011-11-02 08:09 EDT
== 
Summary:New CMAKE_AUTOMOC feature breaks when re-configuring
Description: 
When re-configuring  generating with ccmake, the automoc build.cmake file adds
a leading slash to the cmake command, causing it to break.

Follow the steps below using the testcase provided to reproduce the bug.

Steps to Reproduce: 
* Create build directory and run cmake .. inside.
* Note that running make at this point yields a good compile.
* Start again with a clean directory, but instead of building, run ccmake ..
* Configure  Generate
* Try to build again

You'll get a /cmake: Command not found error.  This is caused by a leading
slash that has been introduced in CMakeFiles/example_automoc.dir/build.make
(line 48), in the CMakeFiles/example_automoc rule.  Removing the slash from
/cmake fixes the problem, and the testcase builds correctly.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2011-11-02 08:09 Paul Gideon DannNew Issue
2011-11-02 08:09 Paul Gideon DannFile Added: testcase.tar.bz2   

==

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[cmake-developers] [CMake 0012552]: CMake ignores toolchain file

2011-11-02 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://public.kitware.com/Bug/view.php?id=12552 
== 
Reported By:bert
Assigned To:
== 
Project:CMake
Issue ID:   12552
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2011-11-02 10:06 EDT
Last Modified:  2011-11-02 10:06 EDT
== 
Summary:CMake ignores toolchain file
Description: 
CMake seems to ignore a (possibly faulty) toolchain file. Regardless whether I
use the CMAKE_TOOLCHAIN_FILE option or not, the exact same Makefile is
generated. Furthermore, CMake doesn't even throw errors on faulty or
non-exisiting toolchain files. I'm not sure whether this is intended behavior,
though.

Steps to Reproduce: 
$ cmake .
-- Entering Project Cmake File...
-- Configuring the ... Library...
-- Configuring for Standard-Linux...
-- Configuring done
-- Generating done
-- Build files have been written to: ...
$ cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-that-should-work.cmake .
-- Entering Project Cmake File...
-- Configuring the ... Library...
-- Configuring for Standard-Linux...
-- Configuring done
-- Generating done
-- Build files have been written to: ...
$ echo fubar  dummy-toolchain.cmake
$ cmake -DCMAKE_TOOLCHAIN_FILE=dummy-toolchain.cmake .
-- Entering Project Cmake File...
-- Configuring the ... Library...
-- Configuring for Standard-Linux...
-- Configuring done
-- Generating done
-- Build files have been written to: ...
$ cmake -DCMAKE_TOOLCHAIN_FILE=nonexisting-file.cmake .
-- Entering Project Cmake File...
-- Configuring the ... Library...
-- Configuring for Standard-Linux...
-- Configuring done
-- Generating done
-- Build files have been written to: ...

A diff on all the generated Makefiles shows no differences.

Additional Information: 
$ uname -a
Linux PC 2.6.35-30-generic http://public.kitware.com/Bug/view.php?id=61-Ubuntu
SMP Tue Oct 11 17:52:57 UTC 2011 x86_64 GNU/Linux
$ cmake --version
cmake version 2.8.2
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2011-11-02 10:06 bert   New Issue
==

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [Development] Installing Qt5Config.cmake from the Qt repo?

2011-11-02 Thread Alexander Neundorf
On Tuesday 01 November 2011, craig.sc...@csiro.au wrote:
...
 If you do that, you create a circular dependency, since CMake requires Qt
 to build its GUI application. Yes, you could build CMake's command line
 tools only, then Qt, then build CMake's GUI app, or alternatively you
 could install some previously built CMake package before building Qt, but
 these are steps that should not be necessary. 

I don't think that's a problem.

CMake has the same issue itself, you need cmake to build cmake.
So, what you do is you can either bootstrap cmake (then first a stripped down 
version of cmake is built, which then builds the full cmake), or use an older 
version of cmake to build the new cmake.

The same could be done here.
Use cmake and cmake-gui built against Qt x.y to build Qt x.y+1.
If there is no Qt at all, cmake-gui will not be built, it is optional.

Alex
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[cmake-developers] [CMake 0012553]: FindMPI.cmake fails if MPI_LINK_CMDLINE contains multiple lines.

2011-11-02 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://public.kitware.com/Bug/view.php?id=12553 
== 
Reported By:K. R. Walker
Assigned To:
== 
Project:CMake
Issue ID:   12553
Category:   Modules
Reproducibility:always
Severity:   major
Priority:   normal
Status: new
== 
Date Submitted: 2011-11-02 15:41 EDT
Last Modified:  2011-11-02 15:41 EDT
== 
Summary:FindMPI.cmake fails if MPI_LINK_CMDLINE contains
multiple lines.
Description: 
On at least two systems, mpif90 -show returns a 3-line script (see attached
reproduce.cmake) which causes the link command-line to be parsed incorrectly.
This leads to MPI not finding rt\nrm (notice embedded newline).






Steps to Reproduce: 
cmake -P reproduce.cmake # see attached.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2011-11-02 15:41 K. R. Walker   New Issue
2011-11-02 15:41 K. R. Walker   File Added: reproduce.cmake
==

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[cmake-developers] [CMake 0012554]: Qt4 macros should quote arguments to shell commands

2011-11-02 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://www.cmake.org/Bug/view.php?id=12554 
== 
Reported By:Pierre-Francois Laquerre
Assigned To:
== 
Project:CMake
Issue ID:   12554
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2011-11-02 16:40 EDT
Last Modified:  2011-11-02 16:40 EDT
== 
Summary:Qt4 macros should quote arguments to shell commands
Description: 
The macros in Modules/Qt4Macros.cmake do not properly quote their arguments when
calling external commands through ADD_CUSTOM_COMMAND. This leads to issues when
building projects with files whose name contains spaces or parentheses.

Adding VERBATIM to ADD_CUSTOM_COMMAND fixes this issue.


Steps to Reproduce: 
1) Call any of the following macros when building a project in /tmp/foo(bar)/:
QT4_CREATE_MOC_COMMAND (only on non-WIN32), QT4_WRAP_UI, QT4_ADD_RESOURCES,
QT4_ADD_DBUS_INTERFACE, QT4_GENERATE_INTERFACE, QT4_ADD_DBUS_ADAPTOR,
QT4_CREATE_TRANSLATION, QT4_ADD_TRANSLATION.

Expected behaviour: whatever these macros are supposed to do
Current behaviour: failure at the shell level, e.g.

 cd /tmp/test(foo)/build.rel/qtlua/qlua  /usr/lib64/qt4/bin/rcc -name qlua
-o /tmp/test(foo)/build.rel/qtlua/qlua/qrc_qlua.cxx
/tmp/test(foo)/qtlua/qlua/qlua.qrc
 /bin/sh: -c: line 0: syntax error near unexpected token `('
 /bin/sh: -c: line 0: `cd /tmp/test(foo)/build.rel/qtlua/qlua 
/usr/lib64/qt4/bin/rcc -name qlua -o
/tmp/test(foo)/build.rel/qtlua/qlua/qrc_qlua.cxx
/tmp/test(foo)/qtlua/qlua/qlua.qrc'
 make[2]: *** [qtlua/qlua/qrc_qlua.cxx] Error 1
 make[2]: Leaving directory `/tmp/test(foo)/build.rel'
 make[1]: *** [qtlua/qlua/CMakeFiles/libqlua.dir/all] Error 2
 make[1]: Leaving directory `/tmp/test(foo)/build.rel'
 make: *** [all] Error 2

whereas the proper command should have been (notice the quotes):

 cd /tmp/test(foo)/build.rel/qtlua/qlua  /usr/lib64/qt4/bin/rcc -name
qlua -o /tmp/test(foo)/build.rel/qtlua/qlua/qrc_qlua.cxx
/tmp/test(foo)/qtlua/qlua/qlua.qrc


Additional Information: 
Related mailing post:
http://www.cmake.org/pipermail/cmake/2011-October/047101.html. Adding VERBATIM
to the ADD_CUSTOM_COMMAND calls fixes this. Patch included.

== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2011-11-02 16:40 Pierre-Francois LaquerreNew Issue  
 
2011-11-02 16:40 Pierre-Francois LaquerreFile Added:
fix-qt4-macro-path-quoting.patch
==

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake automoc breaks kde

2011-11-02 Thread Stephen Kelly

On 11/02/2011 06:32 PM, David Faure wrote:

On Monday 31 October 2011 21:47:31 Alexander Neundorf wrote:
No, it's the other way around, in KDE. $ grep Q_OBJECT kautosavefile.* 
kautosavefile.h: Q_OBJECT $ grep moc kautosavefile.cpp #include 
kautosavefile.moc

If it did additionally other things, this was more or less accidentially.

How does qmake handle such cases ?
Checking
Indeed qmake expects moc_foo.cpp for the standard case (Q_OBJECT in header).
This is why kde4automoc was made to support both moc filenames, so that it
could be compatible with the kde way of doing it (foo.moc) and with the qmake
way of doing it (moc_foo.cpp).

Oh well, if you want to stick to that we'll change all of KDE, for the benefit
of a clearer future indeed... At least it won't be an source incompatible
change for app developers since they will have to enable CMAKE_AUTOMOC to get
into this situation. Merely upgrading cmake or KDE (even to frameworks 5)
won't trigger it. OK not exactly, find_package(kde4) will stop working so they
will -have- to port to CMAKE_AUTOMOC, it will be the only solution
available...


If cmake in master is already doing what qmake does wrt the names of 
these files, and KDE wants the opposite, maybe we can make


set(CMAKE_AUTOMOC_KDE_HACK ON)

enable the opposite, and then we in KDE can actively port away from it 
without needing it immediately.


Thanks,

Steve.


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake automoc breaks kde

2011-11-02 Thread Stephen Kelly

On 11/02/2011 06:32 PM, David Faure wrote:
  
  #include foo.moc

  #include moc_foo.cpp
  
  This would have generated twice the same moc file, I think. IMO this is

  really confusing.

Well there is no reason to include both, unless you have Q_OBJECT in the .cpp
file too:-)



I'm sure I've seen this in several places in Qt code. Grepping I found 
one in


qt48/src/scripttools/debugging/qscriptenginedebugger.cpp


QT_END_NAMESPACE

#include qscriptenginedebugger.moc

#include moc_qscriptenginedebugger.cpp


From memory, there are others.

Thanks,

Steve.

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers