[cmake-developers] [CMake 0012627]: CTest does not match catastrophic error produced by intel c++ 11.1

2011-12-15 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://public.kitware.com/Bug/view.php?id=12627 
== 
Reported By:ngladitz
Assigned To:
== 
Project:CMake
Issue ID:   12627
Category:   CTest
Reproducibility:always
Severity:   major
Priority:   normal
Status: new
== 
Date Submitted: 2011-12-15 05:05 EST
Last Modified:  2011-12-15 05:05 EST
== 
Summary:CTest does not match catastrophic error produced by
intel c++ 11.1
Description: 
I've got errors of the form:
C:\some\dir\source.cpp(17): catastrophic error: could not open source file
some_header.h

Which CTest does not detect as an error.
The closest match in cmCTestBuildHandler.cxx seems to be:
([^:]+)\\(([^\\)]+)\\) : (error|fatal error|catastrophic error)

I tried ([^:]+)\\(([^\\)]+)\\): (error|fatal error|catastrophic error) which
seems to work (I removed the space between ')' and ':').

Can this space be made optional? 
e.g. ([^:]+)\\(([^\\)]+)\\): ?(error|fatal error|catastrophic error)
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2011-12-15 05:05 ngladitz   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


[cmake-developers] [CMake 0012628]: CMake uses variable called ${OUTPUT}, causes problems when user tries to use a variable called ${OUTPUT}

2011-12-15 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://public.kitware.com/Bug/view.php?id=12628 
== 
Reported By:Colin Powers
Assigned To:
== 
Project:CMake
Issue ID:   12628
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2011-12-15 06:20 EST
Last Modified:  2011-12-15 06:20 EST
== 
Summary:CMake uses variable called ${OUTPUT}, causes
problems when user tries to use a variable called ${OUTPUT}
Description: 
I just found one of our CMakeLists.txt with the following line:

ADD_CUSTOM_TARGET(policy ALL echo
 DEPENDS ${OUTPUT}
)

Where ${OUTPUT} was populated in a for loop like this:

list(APPEND OUTPUT ${target})

The value of ${target} is not really important. It seems ${OUTPUT} was also
being manipulated by CMake, and we found that in one of the produced makefiles
(./policy/CMakeFiles/policy.dir/build.make) the following content was there
unexpectedly:

policy/CMakeFiles/policy: build dir/policy/Change\ Dir:\ build
dir/CMakeFiles/CMakeTmp

Run\ Build\ Command:/usr/bin/gmake\ cmTryCompileExec/fast
/usr/bin/gmake\ -f\ CMakeFiles/cmTryCompileExec.dir/build.make\
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]:\ Entering\ directory\ `build dir/CMakeFiles/CMakeTmp'
/usr/local/bin/cmake\ -E\ cmake_progress_report\ build
dir/CMakeFiles/CMakeTmp/CMakeFiles\ 1
Building\ CXX\ object\ CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o
/usr/local/bin/c++\ \ \ \ \ -o\
CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o\ -c\ build
dir/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking\ CXX\ executable\ cmTryCompileExec
/usr/local/bin/cmake\ -E\ cmake_link_script\
CMakeFiles/cmTryCompileExec.dir/link.txt\ --verbose=1
/usr/local/bin/c++\ \ \ \ \ \ \ \ \
CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o\ \ -o\ cmTryCompileExec\
-rdynamic\ 
gmake[1]:\ Leaving\ directory\ `build dir/CMakeFiles/CMakeTmp'

I guess this is perhaps content that ends up in ./CMakeFiles/CMakeOutput.log?

In any case, ${OUTPUT} was perhaps not the best choice of variable name for us,
and I am able to solve the problem by doing something more sensible. However, is
it sensible for CMake to be using this variable name itself? Is this variable
name reserved and is that documented anywhere? I had a quick look around and
couldn't find anything. Searching for other instances of the problem was also
difficult, as you might expect when your keyword is output.

For reference the actual error I was getting was on typing 'make': target
pattern contains no `%'

Steps to Reproduce: 
Try adding somewhere sensible in your CMakeLists.txt:

message(-- OUTPUT IS: ${OUTPUT})

Observe that it is populated with various content.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2011-12-15 06:20 Colin Powers   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] [PATCH] Remove the apparently outdated README in Source/QtDialog.

2011-12-15 Thread Brad King

On 12/13/2011 6:50 PM, Raphael Kubo da Costa wrote:

Qt has been LGPL-licensed for a few years, so the clause mentioning only
developers with a paid Qt license can change the code seems to be
outdated.


Applied, thanks:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=470bcfad

-Brad
--

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] [PATCH] QtDialog: Set Ctrl+Q as the shortcut for quitting the program.

2011-12-15 Thread Clinton Stimpson
On Tuesday, December 13, 2011 04:51:16 pm Raphael Kubo da Costa wrote:
 QKeySequence::Quit does not work on all platforms, and since it
 translates to Ctrl+Q on all platforms where it does work, Ctrl+Q was
 hardcoded instead.
 ---
  Source/QtDialog/CMakeSetupDialog.cxx |2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
 
 diff --git a/Source/QtDialog/CMakeSetupDialog.cxx
 b/Source/QtDialog/CMakeSetupDialog.cxx index 1c058d3..338eaff 100644
 --- a/Source/QtDialog/CMakeSetupDialog.cxx
 +++ b/Source/QtDialog/CMakeSetupDialog.cxx
 @@ -26,6 +26,7 @@
  #include QMimeData
  #include QUrl
  #include QShortcut
 +#include QKeySequence
  #include QMacInstallDialog.h
 
  #include QCMake.h
 @@ -99,6 +100,7 @@ CMakeSetupDialog::CMakeSetupDialog()
QObject::connect(this-DeleteCacheAction, SIGNAL(triggered(bool)),
 this, SLOT(doDeleteCache()));
this-ExitAction = FileMenu-addAction(tr(Exit));
 +  this-ExitAction-setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
QObject::connect(this-ExitAction, SIGNAL(triggered(bool)),
 this, SLOT(close()));

Can you instead make that 
+  this-ExitAction-setShortcut(QKeySequence::Quit);

Do you want to redo the patch, or shall we just make the change to use Quit?

-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com
--

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] [PATCH] QtDialog: Set Ctrl+Q as the shortcut for quitting the program.

2011-12-15 Thread Raphael Kubo da Costa
Clinton Stimpson clin...@elemtech.com writes:

 On Tuesday, December 13, 2011 04:51:16 pm Raphael Kubo da Costa wrote:
 QKeySequence::Quit does not work on all platforms, and since it
 translates to Ctrl+Q on all platforms where it does work, Ctrl+Q was
 hardcoded instead.
 ---
  Source/QtDialog/CMakeSetupDialog.cxx |2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)

 diff --git a/Source/QtDialog/CMakeSetupDialog.cxx
 b/Source/QtDialog/CMakeSetupDialog.cxx index 1c058d3..338eaff 100644
 --- a/Source/QtDialog/CMakeSetupDialog.cxx
 +++ b/Source/QtDialog/CMakeSetupDialog.cxx
 @@ -26,6 +26,7 @@
  #include QMimeData
  #include QUrl
  #include QShortcut
 +#include QKeySequence
  #include QMacInstallDialog.h

  #include QCMake.h
 @@ -99,6 +100,7 @@ CMakeSetupDialog::CMakeSetupDialog()
QObject::connect(this-DeleteCacheAction, SIGNAL(triggered(bool)),
 this, SLOT(doDeleteCache()));
this-ExitAction = FileMenu-addAction(tr(Exit));
 +  this-ExitAction-setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
QObject::connect(this-ExitAction, SIGNAL(triggered(bool)),
 this, SLOT(close()));

 Can you instead make that
 +  this-ExitAction-setShortcut(QKeySequence::Quit);

 Do you want to redo the patch, or shall we just make the change to use Quit?

As I mentioned in the commit message, QKeySequence::Quit will not work
on all platforms (the documentation says it translates to nothing on
Windows, for example, and I couldn't use it on the i3 window manager,
for example). I can change it if you prefer, though.
--

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] [PATCH] QtDialog: Set Ctrl+Q as the shortcut for quitting the program.

2011-12-15 Thread Clinton Stimpson
On Thursday, December 15, 2011 08:20:14 am Raphael Kubo da Costa wrote:
 Clinton Stimpson clin...@elemtech.com writes:
  On Tuesday, December 13, 2011 04:51:16 pm Raphael Kubo da Costa wrote:
  QKeySequence::Quit does not work on all platforms, and since it
  translates to Ctrl+Q on all platforms where it does work, Ctrl+Q was
  hardcoded instead.
  ---
  
   Source/QtDialog/CMakeSetupDialog.cxx |2 ++
   1 files changed, 2 insertions(+), 0 deletions(-)
  
  diff --git a/Source/QtDialog/CMakeSetupDialog.cxx
  b/Source/QtDialog/CMakeSetupDialog.cxx index 1c058d3..338eaff 100644
  --- a/Source/QtDialog/CMakeSetupDialog.cxx
  +++ b/Source/QtDialog/CMakeSetupDialog.cxx
  @@ -26,6 +26,7 @@
  
   #include QMimeData
   #include QUrl
   #include QShortcut
  
  +#include QKeySequence
  
   #include QMacInstallDialog.h
   
   #include QCMake.h
  
  @@ -99,6 +100,7 @@ CMakeSetupDialog::CMakeSetupDialog()
  
 QObject::connect(this-DeleteCacheAction, SIGNAL(triggered(bool)),
 
  this, SLOT(doDeleteCache()));
 
 this-ExitAction = FileMenu-addAction(tr(Exit));
  
  +  this-ExitAction-setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
  
 QObject::connect(this-ExitAction, SIGNAL(triggered(bool)),
 
  this, SLOT(close()));
  
  Can you instead make that
  +  this-ExitAction-setShortcut(QKeySequence::Quit);
  
  Do you want to redo the patch, or shall we just make the change to use
  Quit?
 
 As I mentioned in the commit message, QKeySequence::Quit will not work
 on all platforms (the documentation says it translates to nothing on
 Windows, for example, and I couldn't use it on the i3 window manager,
 for example). I can change it if you prefer, though.

Ok, the patch is fine.
Is this something that needs brought up to the Qt developer's attention?

-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com
--

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] A few more changes to automoc before 2.8.7

2011-12-15 Thread Stephen Kelly
Alexander Neundorf wrote:
 And, again a question regarding wording, currently the warnings generated
 by automoc say Better do this and that for a more robust build.
 I'd like to have a better way to express it.
 Use this and that for STRICT mode compatibility. ?
 or for qmake compatibility ?
 Better ideas ?
 
 I pushed it as branch AutomocFineTuning to stage.
 The variable is now CMAKE_AUTOMOC_RELAXED_MODE .
 
 If that's fine with everybody, I'll merge it into next in the next days.
 This should still go into 2.8.7.

I applied the attached patch and kdelibs build fails using the 
AutomocFineTuning branch (as expected).

Uncommenting the line to invert the relaxed mode makes it build again. I'm 
fine with the change.

However, the warnings/errors output by cmake don't include a reference to 
CMAKE_AUTOMOC_RELAXED_MODE (as that is not referenced in all error/warning 
cases).

Thanks,

Steve.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ad97626..5654033 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,11 +45,12 @@ if (KHTML_BUILD_TESTREGRESSION)
 endif (KHTML_BUILD_TESTREGRESSION)
 
 option(STATIC_LIBRARY Build kdelibs as static libraries. FALSE)
+#set(CMAKE_AUTOMOC_RELAXED_MODE ON)
 
 add_subdirectory( libinqt5 )
 add_subdirectory( libqtmimetypes )
 add_subdirectory( tier1 )
-
+return()
 # write platform profile file which will be installed #
 include(CreateKDEPlatformProfile.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 0012629]: bootstrap of CMake can fail when a wrong libmd is found

2011-12-15 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://public.kitware.com/Bug/view.php?id=12629 
== 
Reported By:Mark Abraham
Assigned To:
== 
Project:CMake
Issue ID:   12629
Category:   CMakeSetup
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2011-12-15 19:28 EST
Last Modified:  2011-12-15 19:28 EST
== 
Summary:bootstrap of CMake can fail when a wrong libmd is
found
Description: 
Utilities/cmlibarchive/CMakeLists.txt uses

IF(CRYPTO_LIBRARY)
  LIST(APPEND ADDITIONAL_LIBS ${CRYPTO_LIBRARY})
ELSE(CRYPTO_LIBRARY)
  IF(NOT OPENSSL_FOUND)
FIND_LIBRARY(MD_LIBRARY NAMES md)
IF(MD_LIBRARY)
  LIST(APPEND ADDITIONAL_LIBS ${MD_LIBRARY})
ENDIF(MD_LIBRARY)
  ENDIF(NOT OPENSSL_FOUND)
ENDIF(CRYPTO_LIBRARY)

This fails if libmd exists in the search path but is actually from the GROMACS
simulation package, rather than the crypto message digest library. A
try_compile() test after a successful find_library() would allow the CMake
bootstrap to be more robust.

Steps to Reproduce: 
1. Use ./bootstrap on a system with GROMACS (http://www.gromacs.org) installed
and http://martin.hinner.info/libmd/ not installed.

2. Do make

3. Observe that CMake tools cannot link because of the unsatisfied dependencies
of the inappropriate -lmd.

Additional Information: 
I was able to successfully build CMake on this system by removing the resulting
-lmd from all the links.txt files, using a combination of sed -i and find.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2011-12-15 19:28 Mark Abraham   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] Broken Cmake Behavior using --build VS2010

2011-12-15 Thread Rolf Eike Beer
 This is because we should really only allow one project command per
 CMakeLists.txt file, but since we do not error out, it's difficult to
 change at this point in time...

 --build uses the CMAKE_PROJECT_NAME cache variable to decide what sln file
 to use, and that corresponds to the first project command.

 Do you need multiple project commands in your CMakeLists.txt file?

 What benefit do you get from it?

 I'd like to understand how people are using multiple project commands, so
 we can fix this the right way.

At my last employer we used multiple projects, too. But every
CMakeLists.txt had at most one project(). We had a large number of
libraries that had many dependencies regarding their include directories
and so on. Also they could be used to build different parts of the
software more or less standalone.

So what we did was to use the add_subdirectory_once() macro I posted here
a few time which does what add_subdirectory() does but will just do
nothing if the given directory is already part of the build.

And later we did things like
include_directories(${LIB1_SOURCE_DIR}/include) to easily get the includes
without too much relative paths.

Eike
--

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


Re: [CMake] Some suggestions to TestForPosix module I wrote

2011-12-15 Thread Rolf Eike Beer
 I wrote a TestForPosix module for looking if the system supports a POSIX /
 XPG / SUS standard and I wanted for you experts to look and criticize if
 you find anything wrong. I would also ask how can I make a request for it
 to be included in CMake 2.8.7, because it is (in my opinion) a very good
 contribution to the CMakeModules...

 Well, here is the download link (unix line feeds):

 http://ge.tt/8CVeNDB

 Only put it in the Modules folder of CMake if you want to test (otherwise
 you'll have to configure the path to the .in file...)

This looks like a good idea, however I found it to duplicate much code.

Here are some suggestions:

-make the thing a function, not a macro. You need to set the result
variable using set(... PARENT_SCOPE) then.

-use RETURN() in the else() to get out of the function when the user
requests a bad standard.

-I would use a SEND_ERROR in this case since the CMakeLists.txt is clearly
broken and needs to be fixed.

-now move the message() and configure_file() from each if() behind the
whole if() so it is shared by all valid standards.

Greetings,

Eike
--

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


Re: [CMake] Transitive link question

2011-12-15 Thread Michael Hertling
On 12/13/2011 11:00 PM, Biddiscombe, John A. wrote:

 Sure, when project A is loaded into project B it either needs to search and 
 load the hdf5 cmake file or require that to be done in project B before 
 loading project A. Then the hdf5 target will be known in project B too and 
 linking will work fine.
 
 
 Using find_package in project B is an option, but what I was really trying to 
 ask is if there's a way to make the transitive link get the correct library 
 on its own. Since I have a number of different versions of the hdf5 package 
 installed, there's a chance that project B will use the wrong one (ok, not 
 when I'm doing it because I know, but if a third party needs to do the same). 
 Since project A knows the correct library and name/lib other target 
 properties, I would like it to make it available to project B/C/D etc

If A is linked against HDF5, and hdf5 is an imported target, the
latter will appear among A's transitive link dependencies with its
symbolic name instead of a full path to the library. In fact, this
separation of target names and library paths is the basic idea of
imported targets, and what you're asking for is rather the opposite.

If you really want to have HDF5's debug library mentioned explicitly
among A's prerequisites, you might query the IMPORTED_LOCATION_DEBUG
property of hdf5 and link A against that value. However, in this
way, you lose the flexibility w.r.t. choosing libraries in link
command lines based on the build/configuration type.

Generally, IMO, the best bet is to provide a full-featured config file
AConfig.cmake which includes the appropriate file(s) provided by HDF5,
so any of A's clients can issue FIND_PACKAGE(A) and receives complete
information about A and its prerequisites. This is the most powerful
solution, and you might even parameterize AConfig.cmake in a manner
so that the client can choose which HDF5 installation the config
file should look for, e.g. via an HDF5_ROOT variable.

Regards,

Michael
--

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


Re: [CMake] Some suggestions to TestForPosix module I wrote

2011-12-15 Thread David Cole


On Dec 15, 2011, at 3:23 AM, Rolf Eike Beer e...@sf-mail.de wrote:

 I wrote a TestForPosix module for looking if the system supports a POSIX /
 XPG / SUS standard and I wanted for you experts to look and criticize if
 you find anything wrong. I would also ask how can I make a request for it
 to be included in CMake 2.8.7, because it is (in my opinion) a very good
 contribution to the CMakeModules...
 
 Well, here is the download link (unix line feeds):
 
 http://ge.tt/8CVeNDB
 
 Only put it in the Modules folder of CMake if you want to test (otherwise
 you'll have to configure the path to the .in file...)
 
 This looks like a good idea, however I found it to duplicate much code.
 
 Here are some suggestions:
 
 -make the thing a function, not a macro. You need to set the result
 variable using set(... PARENT_SCOPE) then.
 
 -use RETURN() in the else() to get out of the function when the user
 requests a bad standard.
 
 -I would use a SEND_ERROR in this case since the CMakeLists.txt is clearly
 broken and needs to be fixed.
 
 -now move the message() and configure_file() from each if() behind the
 whole if() so it is shared by all valid standards.
 
 Greetings,
 
 Eike
 --
 
 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


Eike's advice is good, but even so, it's too late for this contribution to 
appear in 2.8.7. If it gets into 'master', the earliest release it could appear 
in will be the one after that: probably 2.8.8.

--

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


[CMake] How to MemCheck with a test driver?

2011-12-15 Thread Pere Mato Vila
I am running all my tests with a 'test driver' implemented as a CMake script. 
This is mainly to set the runtime environment and have some hooks to get hold 
of the error and output streams. My question is how can I  perform a memory 
check (with valgrind) in this case. Obviously by executing 'ctest -D 
MemoryCheck' does run valgrind on the cmake program itself and not on my test 
program. Does anybody has any suggestion?
 
-
Pere Mato  CERN, PH Department, CH 1211 Geneva 23, Switzerland
  e-mail: pere.m...@cern.ch  tel: +41 22 76 78696
  fax:  +41 22 76 68792gsm: +41 76 48 70855


--

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


Re: [CMake] How to MemCheck with a test driver?

2011-12-15 Thread Bill Hoffman

On 12/15/2011 7:29 AM, Pere Mato Vila wrote:

I am running all my tests with a 'test driver' implemented as a CMake

script. This is mainly to set the runtime environment and have some
hooks to get hold of the error and output streams. My question is how
can I perform a memory check (with valgrind) in this case. Obviously by
executing 'ctest -D MemoryCheck' does run valgrind on the cmake program
itself and not on my test program. Does anybody has any suggestion?

Use --trace-children=yes  .  That is what we do when testing CMake which 
is called via make.   There are options that I added to valgrind that 
will tell it to stop tracing as well.  So, in our case we tell it not to 
trace gcc and beyond.


-Bill

--

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


[CMake] How to find list of directories

2011-12-15 Thread Renato Utsch
Hello,

I am writing a plugin compiler that will do linke this:

-- main
 plugin
| CMakeLists.txt (in the plugin folder)
-- example (example plugin)
--| CMakeLists.txt (in the example folder)

The CMakeLists.txt file inside the plugin folder will do a foreach() to use
add_subdirectory() for each folder inside the plugin directory:

foreach( FOREACH_FOLDER ${FOLDERS_INSIDE_PLUGIN} )
add_subdirectory( ${FOREACH_FOLDER} )
endforeach()

Then, the CMakeLists.txt of each folder will do the compilation of the
plugin


How can I set the FOLDERS_INSIDE_PLUGIN variable to a list with all the
folder names in the plugin directory? My program will be compiled only in
UNIX (and cygwin), so if there is an UNIX command that does this, it can
work as well (couldn't remember any)...


Renato
--

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

Re: [CMake] How to find list of directories

2011-12-15 Thread Michael Hertling
On 12/15/2011 02:34 PM, Renato Utsch wrote:
 Hello,
 
 I am writing a plugin compiler that will do linke this:
 
 -- main
  plugin
 | CMakeLists.txt (in the plugin folder)
 -- example (example plugin)
 --| CMakeLists.txt (in the example folder)
 
 The CMakeLists.txt file inside the plugin folder will do a foreach() to use
 add_subdirectory() for each folder inside the plugin directory:
 
 foreach( FOREACH_FOLDER ${FOLDERS_INSIDE_PLUGIN} )
 add_subdirectory( ${FOREACH_FOLDER} )
 endforeach()
 
 Then, the CMakeLists.txt of each folder will do the compilation of the
 plugin
 
 
 How can I set the FOLDERS_INSIDE_PLUGIN variable to a list with all the
 folder names in the plugin directory? My program will be compiled only in
 UNIX (and cygwin), so if there is an UNIX command that does this, it can
 work as well (couldn't remember any)...

You might use FILE(GLOB ...), iterate over the results and pick out the
directories with IF(IS_DIRECTORY ...), but you shouldn't do this: Your
project wouldn't be aware of added/removed/renamed directories, the
typical pitfall when using FILE(GLOB ...) in CMakeLists.txt files.
Instead, play safe and explicitly specify the directories in the
FOLDERS_INSIDE_PLUGIN variable by hand.

Regards,

Michael
--

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


[CMake] cmake, eclipse cdt, and intellisense

2011-12-15 Thread Dan Kegel
It seems that cmake-2.8.4's generator for eclipse falls short
when it comes to intellisense (er, content assist).
While functions that are defined in the same source file are
handled ok, functions in other files don't seem to be.

Here's a simple example:

$ svn co http://winezeug.googlecode.com/svn/trunk/ winezeug
$ cd winezeug/cmake_examples/ex7
$ sh demo.sh
$ ~/eclipse/eclipse
Do File / Import / General / Existing Projects, navigate to
~/winezeug/cmake_examples/ex7, and click OK and Finish
Do Project / Build All
In Project Explorer, open _demo/mymain.c
In mymain.c, right click on the call to my_function() and select Open
Declaration

Eclipse then complains Could not find include file 'mylib.h' on include paths

I've poked around a bit in eclipse's settings to see if I can force it
to index everything in the workspace, but haven't found a workaround yet.
Any suggestions?

Thanks,
Dan
--

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


[CMake] [PATCH] KWSys: Correctly handle empty environment variables

2011-12-15 Thread Vladimir Panteleev
This patch fixes a crash which occurs when SystemTools::GetPath attempts
to process an empty environment variable.
---
 Source/kwsys/SystemTools.cxx |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index ed7f62c..4d83293 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -326,7 +326,7 @@ void 
SystemTools::GetPath(kwsys_stl::vectorkwsys_stl::string path, const char
   kwsys_stl::string pathEnv = cpathEnv;
 
   // A hack to make the below algorithm work.
-  if(pathEnv[pathEnv.length()-1] != ':')
+  if(!pathEnv.empty()  pathEnv[pathEnv.length()-1] != pathSep[0])
 {
 pathEnv += pathSep;
 }
-- 
1.7.6.msysgit.0.579.ga3d6f

--

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


Re: [CMake] [PATCH] KWSys: Correctly handle empty environment variables

2011-12-15 Thread Brad King

On 12/15/2011 2:56 PM, Vladimir Panteleev wrote:

This patch fixes a crash which occurs when SystemTools::GetPath attempts
to process an empty environment variable.


Applied, thanks:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c544545c

FYI, the reason you don't show up as an author is because KWSys is
actually a project shared with many other projects and still hosted
in CVS.  A robot replays the commits back to Git repositories like
CMake's.  I moved your Author: line into the commit message.

-Brad
--

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


Re: [CMake] cmake, eclipse cdt, and intellisense

2011-12-15 Thread Dan Kegel
On Thu, Dec 15, 2011 at 6:57 PM, Dan Kegel d...@kegel.com wrote:
 It seems that cmake-2.8.4's generator for eclipse falls short
 when it comes to intellisense (er, content assist).
 While functions that are defined in the same source file are
 handled ok, functions in other files don't seem to be.

 Here's a simple example:

 $ svn co http://winezeug.googlecode.com/svn/trunk/ winezeug
 $ cd winezeug/cmake_examples/ex7
 $ sh demo.sh
 $ ~/eclipse/eclipse
 Do File / Import / General / Existing Projects, navigate to
 ~/winezeug/cmake_examples/ex7, and click OK and Finish
 Do Project / Build All
 In Project Explorer, open _demo/mymain.c
 In mymain.c, right click on the call to my_function() and select Open
 Declaration

 Eclipse then complains Could not find include file 'mylib.h' on include 
 paths

 I've poked around a bit in eclipse's settings to see if I can force it
 to index everything in the workspace, but haven't found a workaround yet.
 Any suggestions?

To some extent, this is user error.  My demo.sh script added dummy
top-level projects for each source directory because the projects buried
inside Project-Debug@build are so different from what my developers expect.

If I open mymain.c not from the _demo dummy project, but rather from
Project-Debug@build/[Source Directory]/mymain.c, then right-clicking
on Open Declaration does find the line of the .h file that declares
the function.

But this doesn't work in our real world app, so I guess I have to find
a better minimal test case.  I did check the project's C/C++ Include Paths
property, and the Include Paths property does list all my source directories,
so that's not it.
I guess I'll try to put together a better minimal test case, and use
the latest cmake from git.
- Dan
--

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


[Cmake-commits] CMake branch, next, updated. v2.8.6-2219-g87a6705

2011-12-15 Thread Brad King
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project CMake.

The branch, next has been updated
   via  87a670500359d638a83c89482edf5923708e431d (commit)
   via  5d9934312d0b553eafb7c690487215cff7ddedb3 (commit)
  from  f767b8cca32bfda3e5fa35b612c8591e7908e326 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=87a670500359d638a83c89482edf5923708e431d
commit 87a670500359d638a83c89482edf5923708e431d
Merge: f767b8c 5d99343
Author: Brad King brad.k...@kitware.com
AuthorDate: Thu Dec 15 08:16:00 2011 -0500
Commit: CMake Topic Stage kwro...@kitware.com
CommitDate: Thu Dec 15 08:16:00 2011 -0500

Merge topic 'osx-dependent-libraries' into next

5d99343 Do not link private dependent shared libraries on OS X  10.4


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d9934312d0b553eafb7c690487215cff7ddedb3
commit 5d9934312d0b553eafb7c690487215cff7ddedb3
Author: Brad King brad.k...@kitware.com
AuthorDate: Wed Dec 14 13:59:39 2011 -0500
Commit: Brad King brad.k...@kitware.com
CommitDate: Thu Dec 15 08:14:30 2011 -0500

Do not link private dependent shared libraries on OS X  10.4

The default OS X 10.4 linker incorrectly searches for dependencies of
linked shared libraries only under the -isysroot location.  It fails to
find dependencies of linked shared libraries in cases such as the
ExportImport test.  It produces errors like:

 /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning can't open dynamic 
library:
 libtestLib3Imp.dylib
 referenced from: /.../ExportImport/Root/lib/libtestLib3lib.1.2.dylib
 (checking for undefined symbols may be affected) (No such file or 
directory, errno = 2)
 /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols: 
_testLib3Imp
 referenced from libtestLib3lib expected to be defined in
 libtestLib3Imp.dylib

or with CMAKE_SKIP_RPATH off to enable install_name in the Export side:

 /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning can't open dynamic 
library:
 
/Developer/SDKs/MacOSX10.4u.sdk/.../ExportImport/Export/impl/libtestLib3Imp.dylib
 referenced from: /.../ExportImport/Export/libtestLib3lib.1.2.dylib
 (checking for undefined symbols may be affected) (No such file or 
directory, errno = 2)
 /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined 
symbols:_testLib3Imp
 referenced from libtestLib3lib expected to be defined in
 /.../ExportImport/Export/impl/libtestLib3Imp.dylib

Note how /Developer/SDKs/MacOSX10.4u.sdk is prepended to the dependent
library path.

Commit 2cff26fa (Support linking to shared libs with dependent libs,
2008-01-31) and commit 82fcaebe (Pass dependent library search path to
linker on some platforms, 2008-02-01) worked around the problem by
defining platform variable CMAKE_LINK_DEPENDENT_LIBRARY_FILES.  It tells
CMake to link to dependent libraries explicitly by their path thus
telling the linker where to find them.

Unfortunately the workaround had the side effect of linking dependent
libraries and defeats most benefits of LINK_INTERFACE_LIBRARIES.
Fortunately OS X 10.5 and above do not need to find transitive
dependencies at all so we can avoid the workaround on Modern OS X.

diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index c11c8fb..867c788 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -187,11 +187,13 @@ IF(XCODE)
   SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
 ENDIF(XCODE)
 
-# Need to list dependent shared libraries on link line.  When building
-# with -isysroot (for universal binaries), the linker always looks for
-# dependent libraries under the sysroot.  Listing them on the link
-# line works around the problem.
-SET(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 1)
+IF(${_CURRENT_OSX_VERSION} VERSION_LESS 10.5)
+  # Need to list dependent shared libraries on link line.  When building
+  # with -isysroot (for universal binaries), the linker always looks for
+  # dependent libraries under the sysroot.  Listing them on the link
+  # line works around the problem.
+  SET(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 1)
+ENDIF()
 
 SET(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w)
 SET(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w)
diff --git a/Source/cmComputeLinkInformation.cxx 
b/Source/cmComputeLinkInformation.cxx
index f8ab686..edf6c35 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -161,7 +161,9 @@ listed on the command line.
   - On Windows, DLLs are not directly linked, and the import libraries
 have no transitive 

[Cmake-commits] CMake branch, next, updated. v2.8.6-2221-g2e99d2d

2011-12-15 Thread Brad King
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project CMake.

The branch, next has been updated
   via  2e99d2d5e1e50e762cb272241a3e61e5e63d77ab (commit)
   via  5f6985ac869150e468f8ad388bdbb8a39010cbb5 (commit)
  from  87a670500359d638a83c89482edf5923708e431d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e99d2d5e1e50e762cb272241a3e61e5e63d77ab
commit 2e99d2d5e1e50e762cb272241a3e61e5e63d77ab
Merge: 87a6705 5f6985a
Author: Brad King brad.k...@kitware.com
AuthorDate: Thu Dec 15 08:34:00 2011 -0500
Commit: CMake Topic Stage kwro...@kitware.com
CommitDate: Thu Dec 15 08:34:00 2011 -0500

Merge topic 'test-compiler-output-var' into next

5f6985a Avoid clobbering variable 'OUTPUT' in compiler tests (#12628)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5f6985ac869150e468f8ad388bdbb8a39010cbb5
commit 5f6985ac869150e468f8ad388bdbb8a39010cbb5
Author: Brad King brad.k...@kitware.com
AuthorDate: Thu Dec 15 08:29:43 2011 -0500
Commit: Brad King brad.k...@kitware.com
CommitDate: Thu Dec 15 08:31:17 2011 -0500

Avoid clobbering variable 'OUTPUT' in compiler tests (#12628)

Use an obscure name and clean up afterwards.

diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake
index 4d4e35f..779b2f0 100644
--- a/Modules/CMakeTestCCompiler.cmake
+++ b/Modules/CMakeTestCCompiler.cmake
@@ -35,7 +35,7 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
 { (void)argv; return argc-1;}\n)
   TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR} 
 ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
-OUTPUT_VARIABLE OUTPUT) 
+OUTPUT_VARIABLE __CMAKE_C_COMPILER_OUTPUT)
   SET(C_TEST_WAS_RUN 1)
 ENDIF(NOT CMAKE_C_COMPILER_WORKS)
 
@@ -43,7 +43,7 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
   PrintTestCompilerStatus(C  -- broken)
   FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
 Determining if the C compiler works failed with 
-the following output:\n${OUTPUT}\n\n)
+the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n)
   # if the compiler is broken make sure to remove the platform file
   # since Windows-cl configures both c/cxx files both need to be removed
   # when c or c++ fails
@@ -51,14 +51,14 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
   FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake )
   MESSAGE(FATAL_ERROR The C compiler \${CMAKE_C_COMPILER}\ 
 is not able to compile a simple test program.\nIt fails 
-with the following output:\n ${OUTPUT}\n\n
+with the following output:\n ${__CMAKE_C_COMPILER_OUTPUT}\n\n
 CMake will not be able to correctly generate this project.)
 ELSE(NOT CMAKE_C_COMPILER_WORKS)
   IF(C_TEST_WAS_RUN)
 PrintTestCompilerStatus(C  -- works)
 FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
   Determining if the C compiler works passed with 
-  the following output:\n${OUTPUT}\n\n) 
+  the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n)
   ENDIF(C_TEST_WAS_RUN)
   SET(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL )
 
@@ -84,3 +84,4 @@ ELSE(NOT CMAKE_C_COMPILER_WORKS)
   ENDIF()
 ENDIF(NOT CMAKE_C_COMPILER_WORKS)
 
+UNSET(__CMAKE_C_COMPILER_OUTPUT)
diff --git a/Modules/CMakeTestCXXCompiler.cmake 
b/Modules/CMakeTestCXXCompiler.cmake
index 494add3..87022e9 100644
--- a/Modules/CMakeTestCXXCompiler.cmake
+++ b/Modules/CMakeTestCXXCompiler.cmake
@@ -28,7 +28,7 @@ IF(NOT CMAKE_CXX_COMPILER_WORKS)
 int main(){return 0;}\n)
   TRY_COMPILE(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR} 
 ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
-OUTPUT_VARIABLE OUTPUT)
+OUTPUT_VARIABLE __CMAKE_CXX_COMPILER_OUTPUT)
   SET(CXX_TEST_WAS_RUN 1)
 ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
 
@@ -41,17 +41,17 @@ IF(NOT CMAKE_CXX_COMPILER_WORKS)
   FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake )
   FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
 Determining if the CXX compiler works failed with 
-the following output:\n${OUTPUT}\n\n)
+the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n)
   MESSAGE(FATAL_ERROR The C++ compiler \${CMAKE_CXX_COMPILER}\ 
 is not able to compile a simple test program.\nIt fails 
-with the following output:\n ${OUTPUT}\n\n
+with the following output:\n ${__CMAKE_CXX_COMPILER_OUTPUT}\n\n
 CMake will not be able to correctly generate this project.)
 ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
   IF(CXX_TEST_WAS_RUN)
 PrintTestCompilerStatus(CXX  -- works)
 FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
   Determining if the CXX compiler works 

[Cmake-commits] CMake branch, next, updated. v2.8.6-2227-g5bcab87

2011-12-15 Thread Brad King
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project CMake.

The branch, next has been updated
   via  5bcab87427884780041f128f88e37f5faacf0f0c (commit)
   via  56f29f48c2f93251838519cade02ce57dd77510f (commit)
  from  9480e7ebb160853e21f794f5b7aeee79deb7dfbc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5bcab87427884780041f128f88e37f5faacf0f0c
commit 5bcab87427884780041f128f88e37f5faacf0f0c
Merge: 9480e7e 56f29f4
Author: Brad King brad.k...@kitware.com
AuthorDate: Thu Dec 15 09:38:41 2011 -0500
Commit: CMake Topic Stage kwro...@kitware.com
CommitDate: Thu Dec 15 09:38:41 2011 -0500

Merge topic 'intel-error-regex-issue-12627' into next

56f29f4 CTest: Recognize Intel errors without space before colon (#12627)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=56f29f48c2f93251838519cade02ce57dd77510f
commit 56f29f48c2f93251838519cade02ce57dd77510f
Author: Brad King brad.k...@kitware.com
AuthorDate: Thu Dec 15 09:30:33 2011 -0500
Commit: Brad King brad.k...@kitware.com
CommitDate: Thu Dec 15 09:31:12 2011 -0500

CTest: Recognize Intel errors without space before colon (#12627)

Fix the regex meant to match errors of the form:

 C:\some\dir\source.cpp(17): catastrophic error: could not open source file 
some_header.h

to make the space between ')' and ':' optional.

diff --git a/Source/CTest/cmCTestBuildHandler.cxx 
b/Source/CTest/cmCTestBuildHandler.cxx
index 86bd85d..34a3e60 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -57,7 +57,7 @@ static const char* cmCTestErrorMatches[] = {
   ^ild:([ \\t])*\\(undefined symbol\\),
   ([^ :]+) : (error|fatal error|catastrophic error),
   ([^:]+): (Error:|error|undefined reference|multiply defined),
-  ([^:]+)\\(([^\\)]+)\\) : (error|fatal error|catastrophic error),
+  ([^:]+)\\(([^\\)]+)\\) ?: (error|fatal error|catastrophic error),
   ^fatal error C[0-9]+:,
   : syntax error ,
   ^collect2: ld returned 1 exit status,

---

Summary of changes:
 Source/CTest/cmCTestBuildHandler.cxx |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v2.8.6-2230-g35cb1ce

2011-12-15 Thread Clinton Stimpson
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project CMake.

The branch, next has been updated
   via  35cb1ce43316532bb4c358e9705fd44d89e7a8ac (commit)
   via  56e04991048ff27e2af1fdcf98fc731ca59280a3 (commit)
   via  0a6543d957463f0a7f7a585cc43468174c1204a0 (commit)
  from  5bcab87427884780041f128f88e37f5faacf0f0c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=35cb1ce43316532bb4c358e9705fd44d89e7a8ac
commit 35cb1ce43316532bb4c358e9705fd44d89e7a8ac
Merge: 5bcab87 56e0499
Author: Clinton Stimpson clin...@elemtech.com
AuthorDate: Thu Dec 15 10:52:09 2011 -0500
Commit: CMake Topic Stage kwro...@kitware.com
CommitDate: Thu Dec 15 10:52:09 2011 -0500

Merge topic 'qtdialog-quit' into next

56e0499 QtDialog: Set Ctrl+Q as the shortcut for quitting the program.
0a6543d KWSys Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=56e04991048ff27e2af1fdcf98fc731ca59280a3
commit 56e04991048ff27e2af1fdcf98fc731ca59280a3
Author: Raphael Kubo da Costa rak...@freebsd.org
AuthorDate: Tue Dec 13 21:51:16 2011 -0200
Commit: Clinton Stimpson clin...@elemtech.com
CommitDate: Thu Dec 15 08:51:50 2011 -0700

QtDialog: Set Ctrl+Q as the shortcut for quitting the program.

QKeySequence::Quit does not work on all platforms, and since it
translates to Ctrl+Q on all platforms where it does work, Ctrl+Q was
hardcoded instead.

diff --git a/Source/QtDialog/CMakeSetupDialog.cxx 
b/Source/QtDialog/CMakeSetupDialog.cxx
index 1c058d3..338eaff 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -26,6 +26,7 @@
 #include QMimeData
 #include QUrl
 #include QShortcut
+#include QKeySequence
 #include QMacInstallDialog.h
 
 #include QCMake.h
@@ -99,6 +100,7 @@ CMakeSetupDialog::CMakeSetupDialog()
   QObject::connect(this-DeleteCacheAction, SIGNAL(triggered(bool)),
this, SLOT(doDeleteCache()));
   this-ExitAction = FileMenu-addAction(tr(Exit));
+  this-ExitAction-setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
   QObject::connect(this-ExitAction, SIGNAL(triggered(bool)),
this, SLOT(close()));
 

---

Summary of changes:
 Source/QtDialog/CMakeSetupDialog.cxx |2 ++
 Source/kwsys/kwsysDateStamp.cmake|2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v2.8.6-2236-g950c9c1

2011-12-15 Thread Brad King
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project CMake.

The branch, next has been updated
   via  950c9c1d7522120f33ba3b28683f009a3b317602 (commit)
   via  b03ac6d0cf1d2f18fa634a1f495b3a8f863b8c48 (commit)
   via  e19be21f620de693a56519a343b51139b704422d (commit)
   via  bf5e1908376ebd13eec1a8cb7352f786f46c0ec5 (commit)
   via  a1c71baae06717d17ad8fb7e4bd545a0cd7fb026 (commit)
   via  490b750c80bda9694f1802aa50bd92f85d940baf (commit)
  from  35cb1ce43316532bb4c358e9705fd44d89e7a8ac (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=950c9c1d7522120f33ba3b28683f009a3b317602
commit 950c9c1d7522120f33ba3b28683f009a3b317602
Merge: 35cb1ce b03ac6d
Author: Brad King brad.k...@kitware.com
AuthorDate: Thu Dec 15 11:43:27 2011 -0500
Commit: CMake Topic Stage kwro...@kitware.com
CommitDate: Thu Dec 15 11:43:27 2011 -0500

Merge topic 'cmake_add_fortran_subdirectory' into next

b03ac6d cmake_add_fortran_subdirectory: Validate gfortran architecture
e19be21 cmake_add_fortran_subdirectory: Find gfortran in PATH
bf5e190 cmake_add_fortran_subdirectory: Do not hard-code 'lapack'
a1c71ba cmake_add_fortran_subdirectory: Fix documentation format and typos
490b750 cmake_add_fortran_subdirectory: Allow full paths to directories


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b03ac6d0cf1d2f18fa634a1f495b3a8f863b8c48
commit b03ac6d0cf1d2f18fa634a1f495b3a8f863b8c48
Author: Brad King brad.k...@kitware.com
AuthorDate: Thu Dec 15 11:39:42 2011 -0500
Commit: Brad King brad.k...@kitware.com
CommitDate: Thu Dec 15 11:42:11 2011 -0500

cmake_add_fortran_subdirectory: Validate gfortran architecture

Verify that MINGW_GFORTRAN not only points to a MinGW gfortran but also
one that compiles for the target architecture.  This prevents using a
32-bit gfortran in a 64-bit MSVC build.

diff --git a/Modules/CMakeAddFortranSubdirectory.cmake 
b/Modules/CMakeAddFortranSubdirectory.cmake
index 7116d96..ac40efd 100644
--- a/Modules/CMakeAddFortranSubdirectory.cmake
+++ b/Modules/CMakeAddFortranSubdirectory.cmake
@@ -57,12 +57,28 @@ function(_setup_mingw_config_and_build source_dir)
   Or set the cache variable MINGW_GFORTRAN to the full path. 
This is required to build)
   endif()
-  execute_process(COMMAND ${MINGW_GFORTRAN} -v ERROR_VARIABLE out)
-  if(NOT ${out} MATCHES Target:.*mingw32)
-message(FATAL_ERROR Non-MinGW gfortran found: ${MINGW_GFORTRAN}\n
-  output from -v [${out}]\n
-  set MINGW_GFORTRAN to the path to MinGW fortran.)
+
+  # Validate the MinGW gfortran we found.
+  if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+set(_mingw_target Target:.*64.*mingw)
+  else()
+set(_mingw_target Target:.*mingw32)
   endif()
+  execute_process(COMMAND ${MINGW_GFORTRAN} -v
+ERROR_VARIABLE out ERROR_STRIP_TRAILING_WHITESPACE)
+  if(NOT ${out} MATCHES ${_mingw_target})
+string(REPLACE \n \n   out   ${out})
+message(FATAL_ERROR
+  MINGW_GFORTRAN is set to\n
+${MINGW_GFORTRAN}\n
+  which is not a MinGW gfortran for this architecture.  
+  The output from -v does not match \${_mingw_target}\:\n
+  ${out}\n
+  Set MINGW_GFORTRAN to a proper MinGW gfortran for this architecture.
+  )
+  endif()
+
+  # Configure scripts to run MinGW tools with the proper PATH.
   get_filename_component(MINGW_PATH ${MINGW_GFORTRAN} PATH)
   file(TO_NATIVE_PATH ${MINGW_PATH} MINGW_PATH)
   string(REPLACE \\  MINGW_PATH ${MINGW_PATH})

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e19be21f620de693a56519a343b51139b704422d
commit e19be21f620de693a56519a343b51139b704422d
Author: Brad King brad.k...@kitware.com
AuthorDate: Thu Dec 15 10:50:55 2011 -0500
Commit: Brad King brad.k...@kitware.com
CommitDate: Thu Dec 15 11:41:59 2011 -0500

cmake_add_fortran_subdirectory: Find gfortran in PATH

In the find_program(MINGW_GFORTRAN) call use the PATHS option for
hard-coded guesses instead of HINTS.  This allows the user environment
to override the guesses and corrects usage of the command options.

diff --git a/Modules/CMakeAddFortranSubdirectory.cmake 
b/Modules/CMakeAddFortranSubdirectory.cmake
index e7c23b2..7116d96 100644
--- a/Modules/CMakeAddFortranSubdirectory.cmake
+++ b/Modules/CMakeAddFortranSubdirectory.cmake
@@ -44,10 +44,13 @@ include(ExternalProject)
 include(CMakeParseArguments)
 
 function(_setup_mingw_config_and_build source_dir)
-  find_program(MINGW_GFORTRAN NAMES gfortran
-HINTS
-c:/MinGW/bin
-
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin
 )
+  # Look for a MinGW 

[Cmake-commits] CMake branch, master, updated. v2.8.6-375-gc544545

2011-12-15 Thread KWSys Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project CMake.

The branch, master has been updated
   via  c544545c6364ed7081d60772505278c9f199ecf8 (commit)
  from  0a6543d957463f0a7f7a585cc43468174c1204a0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c544545c6364ed7081d60772505278c9f199ecf8
commit c544545c6364ed7081d60772505278c9f199ecf8
Author: Brad King brad.k...@kitware.com
AuthorDate: Thu Dec 15 15:45:09 2011 -0500
Commit: Brad King brad.k...@kitware.com
CommitDate: Thu Dec 15 15:45:09 2011 -0500

KWSys: Correctly handle empty environment variables

Fix a crash which occurs when SystemTools::GetPath attempts to process
an empty environment variable.

Author: Vladimir Panteleev vladi...@thecybershadow.net

diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index ed7f62c..4d83293 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -326,7 +326,7 @@ void 
SystemTools::GetPath(kwsys_stl::vectorkwsys_stl::string path, const char
   kwsys_stl::string pathEnv = cpathEnv;
 
   // A hack to make the below algorithm work.
-  if(pathEnv[pathEnv.length()-1] != ':')
+  if(!pathEnv.empty()  pathEnv[pathEnv.length()-1] != pathSep[0])
 {
 pathEnv += pathSep;
 }

---

Summary of changes:
 Source/kwsys/SystemTools.cxx |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v2.8.6-2238-gd1aea18

2011-12-15 Thread Brad King
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project CMake.

The branch, next has been updated
   via  d1aea18b90fec1a91e1d7420bcb4af279fd1758d (commit)
   via  c544545c6364ed7081d60772505278c9f199ecf8 (commit)
  from  950c9c1d7522120f33ba3b28683f009a3b317602 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1aea18b90fec1a91e1d7420bcb4af279fd1758d
commit d1aea18b90fec1a91e1d7420bcb4af279fd1758d
Merge: 950c9c1 c544545
Author: Brad King brad.k...@kitware.com
AuthorDate: Thu Dec 15 15:45:25 2011 -0500
Commit: Brad King brad.k...@kitware.com
CommitDate: Thu Dec 15 15:45:25 2011 -0500

Merge branch 'master' into next


---

Summary of changes:
 Source/kwsys/SystemTools.cxx |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v2.8.6-2240-g454db3a

2011-12-15 Thread Bill Hoffman
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project CMake.

The branch, next has been updated
   via  454db3a71dee0748f70c3fd2ce123270a13e5ef3 (commit)
   via  ecf0e06b61327af4be5005281a6a92f9ac6de466 (commit)
  from  d1aea18b90fec1a91e1d7420bcb4af279fd1758d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=454db3a71dee0748f70c3fd2ce123270a13e5ef3
commit 454db3a71dee0748f70c3fd2ce123270a13e5ef3
Merge: d1aea18 ecf0e06
Author: Bill Hoffman bill.hoff...@kitware.com
AuthorDate: Thu Dec 15 22:00:01 2011 -0500
Commit: CMake Topic Stage kwro...@kitware.com
CommitDate: Thu Dec 15 22:00:01 2011 -0500

Merge topic 'fix_double_project_cmake_build' into next

ecf0e06 Fix the case where cmake --build failed with two project cmds in 
one file.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ecf0e06b61327af4be5005281a6a92f9ac6de466
commit ecf0e06b61327af4be5005281a6a92f9ac6de466
Author: Bill Hoffman bill.hoff...@kitware.com
AuthorDate: Thu Dec 15 21:56:34 2011 -0500
Commit: Bill Hoffman bill.hoff...@kitware.com
CommitDate: Thu Dec 15 21:56:34 2011 -0500

Fix the case where cmake --build failed with two project cmds in one file.

This adds a test that uses two project commands in the same CMakeLists.txt
file.  It also adds a fix so that cmake --build will work in that case.
The fix sets the name of the last project command in the top level
CMakeLists.txt in the cache variable CMAKE_PROJECT_NAME.  This variable
is used by cmake --build to find the project name.

diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 1a831d9..6e3b6af 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -47,9 +47,13 @@ bool cmProjectCommand
   this-Makefile-AddDefinition(PROJECT_NAME, args[0].c_str());
 
   // Set the CMAKE_PROJECT_NAME variable to be the highest-level
-  // project name in the tree.  This is always the first PROJECT
-  // command encountered.
-  if(!this-Makefile-GetDefinition(CMAKE_PROJECT_NAME))
+  // project name in the tree. If there are two project commands
+  // in the same CMakeLists.txt file, and it is the top level
+  // CMakeLists.txt file, then go with the last one, so that
+  // CMAKE_PROJECT_NAME will match PROJECT_NAME, and cmake --build
+  // will work.
+  if(!this-Makefile-GetDefinition(CMAKE_PROJECT_NAME)
+ || (this-Makefile-GetLocalGenerator()-GetParent() == 0) )
 {
 this-Makefile-AddDefinition(CMAKE_PROJECT_NAME, args[0].c_str());
 this-Makefile-AddCacheDefinition
diff --git a/Tests/CMakeBuildTest.cmake.in b/Tests/CMakeBuildTest.cmake.in
index 9c3002b..a8bb750 100644
--- a/Tests/CMakeBuildTest.cmake.in
+++ b/Tests/CMakeBuildTest.cmake.in
@@ -32,21 +32,21 @@ set(CMAKE_CONFIGURATION_TYPES @CMAKE_CONFIGURATION_TYPES@)
 # run the executable out of the Debug directory if there 
 # are configuration types
 if(CMAKE_CONFIGURATION_TYPES)
-  set(RUN_TEST @CMAKE_BUILD_TEST_BINARY_DIR@/Debug/COnly)
+  set(RUN_TEST @CMAKE_BUILD_TEST_BINARY_DIR@/Debug/@CMAKE_BUILD_TEST_EXE@)
 else(CMAKE_CONFIGURATION_TYPES)
-  set(RUN_TEST @CMAKE_BUILD_TEST_BINARY_DIR@/COnly)
+  set(RUN_TEST @CMAKE_BUILD_TEST_BINARY_DIR@/@CMAKE_BUILD_TEST_EXE@)
 endif(CMAKE_CONFIGURATION_TYPES)
 # run the test results
 message(running [${RUN_TEST}])
 execute_process(COMMAND ${RUN_TEST} RESULT_VARIABLE RESULT)
 if(RESULT)
-  message(FATAL_ERROR Error running test COnly)
+  message(FATAL_ERROR Error running test @CMAKE_BUILD_TEST_EXE@)
 endif(RESULT)
 
-# build it again with clean and only COnly target
+# build it again with clean and only @CMAKE_BUILD_TEST_EXE@ target
 execute_process(COMMAND ${CMAKE_COMMAND} 
   --build @CMAKE_BUILD_TEST_BINARY_DIR@ --config Debug 
-  --clean-first --target COnly
+  --clean-first --target @CMAKE_BUILD_TEST_EXE@
   RESULT_VARIABLE RESULT)
 if(RESULT)
   message(FATAL_ERROR Error running cmake --build)
@@ -55,5 +55,5 @@ endif(RESULT)
 # run it again after clean 
 execute_process(COMMAND ${RUN_TEST} RESULT_VARIABLE RESULT)
 if(RESULT)
-  message(FATAL_ERROR Error running test COnly after clean )
+  message(FATAL_ERROR Error running test @CMAKE_BUILD_TEST_EXE@ after clean )
 endif(RESULT)
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 1851f7a..903bb52 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -220,11 +220,21 @@ IF(BUILD_TESTING)
 
   SET(CMAKE_BUILD_TEST_SOURCE_DIR ${CMake_SOURCE_DIR}/Tests/COnly)
   SET(CMAKE_BUILD_TEST_BINARY_DIR ${CMake_BINARY_DIR}/Tests/CMakeBuildCOnly)
+  SET(CMAKE_BUILD_TEST_EXE COnly)
   CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/CMakeBuildTest.cmake.in