[CMake] Problem with flags under Windows/

2010-02-23 Thread Alexander Camek
Hi all,

Currently I am using a CompilerFlags.cmake file for setting all my flags, done 
with:

set(CMAKE_USER_MAKE_RULES_OVERRIDE 
${CMAKE_CURRENT_SOURCE_DIR}/cmake/CompilerFlags.cmake CACHE
STRING Override makefile generation rules.)

In this CompilerFlags.cmake all targets (DEBUG, RELEASE,...) are set. After 
invoking my script on
the commandline of Windows7 with:
cmake -DCMAKE_BUILD_TYPE=DEBUG -Dbuild_hmi=on -G MinGW Makefiles 
..\..\work\trunk

I would expect that all flags are correctly setted. But when I take a look at 
the corresponding
files the flags are strange setted.

My c flags are setted twice (flags.make).
C_FLAGS = -g -ggdb -ansi -std=c99 -DDEBUG -W -Wextra -Wall -Wbad-function-cast 
-Wcomments
-Wunused-macros -Wendif-labels -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs
-Wold-style-definition -Wstrict-prototypes -Wdeclaration-after-statement 
-fprofile-arcs
-ftest-coverage -fmessage-length=0 -g -ggdb -ansi -std=c99 -DDEBUG -W -Wextra 
-Wall
-Wbad-function-cast -Wcomments -Wunused-macros -Wendif-labels 
-Wmissing-declarations
-Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wstrict-prototypes
-Wdeclaration-after-statement -fprofile-arcs -ftest-coverage -fmessage-length=0

On the other side my c++ flags are not set (flags.make).
CXX_FLAGS = -g

My system is Windows7 and I am using CMake 2.8.0.

Thanks for your help.

Greetings

Alexander
###
#
###

# platform check first then check for environmente.
if(WIN32)
# visual studio
if(MSVC)
# C
set(CMAKE_C_FLAGS_DEBUG  /D_DEBUG /W3 /Wall /Tc /MTd /Zi /Ob0 
/Od /RTC1)
set(CMAKE_C_FLAGS_RELEASE/D NDEBUG /W3 /Wall /Tc /MT /O2 /Og 
/Ob2/GL)
set(CMAKE_C_FLAGS_MINSIZEREL /D NDEBUG /W3 /Wall /Tc /MT /Ox /GL)
set(CMAKE_C_FLAGS_RELWITHDEBINFO /D NDEBUG /W3 /Wall /Tc /MT /ZI /O2 
/Ob1 /GL)

# C++ 
set(CMAKE_CXX_FLAGS_DEBUG  /D_DEBUG /W3 /Wall /Tp /MTd /Zi 
/Ob0 /Od /RTC1)
set(CMAKE_CXX_FLAGS_RELEASE/D NDEBUG /W3 /Wall /Tp /MT /O2 /Og 
/Ob2 /GL)
set(CMAKE_CXX_FLAGS_MINSIZEREL /D NDEBUG /W3 /Wall /Tp /MT /Ox 
/GL)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO /D NDEBUG /W3 /Wall /Tp /MT /ZI /O2 
/Ob1 /GL)

#MinGW
elseif(MINGW)
# C
#set(CMAKE_C_FLAGS-g -ggdb -ansi -std=c99 -DDEBUG -W 
-Wextra -Wall -Wbad-function-cast -Wcomments -Wunused-macros -Wendif-labels 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs 
-Wold-style-definition -Wstrict-prototypes -Wdeclaration-after-statement 
-fprofile-arcs -ftest-coverage -fmessage-length=0)
set(CMAKE_C_FLAGS_DEBUG  -g -ggdb -ansi -std=c99 -DDEBUG -W 
-Wextra -Wall -Wbad-function-cast -Wcomments -Wunused-macros -Wendif-labels 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs 
-Wold-style-definition -Wstrict-prototypes -Wdeclaration-after-statement 
-fprofile-arcs -ftest-coverage -fmessage-length=0)
set(CMAKE_C_FLAGS_RELEASE-O2 -DNDEBUG -W -Wextra -Wall 
-Wbad-function-cast -Wcomments -Wunused-macros -Wendif-labels 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs 
-Wold-style-definition -Wstrict-prototypes -Wdeclaration-after-statement 
-fmessage-length=0)
set(CMAKE_C_FLAGS_MINSIZEREL -O3 -Os -DNDEBUG -W -Wextra -Wall 
-Wbad-function-cast -Wcomments -Wunused-macros -Wendif-labels 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs 
-Wold-style-definition -Wstrict-prototypes -Wdeclaration-after-statement 
-fmessage-length=0)
set(CMAKE_C_FLAGS_RELWITHDEBINFO -g -O2 -DNDEBUG -W -Wextra -Wall 
-Wbad-function-cast -Wcomments -Wunused-macros -Wendif-labels 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs 
-Wold-style-definition -Wstrict-prototypes -Wdeclaration-after-statement 
-fprofile-arcs -ftest-coverage -fmessage-length=0)

# C++
#set(CMAKE_CXX_FLAGS-g -DDEBUG -W -Wextra -Wall 
-Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused 
-Wno-system-headers -Wno-deprecated -Woverloaded-virtual -Wwrite-strings 
-fprofile-arcs -ftest-coverage -fmessage-length=0)
set(CMAKE_CXX_FLAGS_DEBUG  -g -DDEBUG -W -Wextra -Wall 
-Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused 
-Wno-system-headers -Wno-deprecated -Woverloaded-virtual -Wwrite-strings 
-fprofile-arcs -ftest-coverage -fmessage-length=0)
set(CMAKE_CXX_FLAGS_RELEASE-O2 -DNDEBUG -W -Wextra -Wall 
-Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused 
-Wno-system-headers -Wno-deprecated -Woverloaded-virtual -Wwrite-strings 
-fmessage-length=0)
set(CMAKE_CXX_FLAGS_MINSIZEREL -O3 -Os -DNDEBUG -W -Wextra -Wall 
-Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused 

[CMake] Bug in Darwin CMAKE_SYSTEM_PROCESSOR

2010-02-23 Thread Luis Kornblueh

Hi,

for me it looks like a small bug in determining the processor type
in Darwin (MacOSX):

uname -m returns always i386 despite of the processor used

uname -p returns on a laptop (Core2duo) running 10.5.x i386
  (32bit kernel)

uname -p returns on a MacPro (Nehalem)  running 10.6.x x86_64
  (64bit kernel)

It seems that cmake_system_processor is using for Darwin uname -m 
instead of uname -p.


I checked as well config.guess, which returns the uname -p results
(more or less ;-) - i686 instead of i386).

I think, it would be nice, to fix this.

Thanks a lot,
Luis

--
 \\
 (-0^0-)
--oOO--(_)--OOo-

 Luis Kornblueh   Tel. : +49-40-41173289
 Max-Planck-Institute for Meteorology Fax. : +49-40-41173298
 Bundesstr. 53
 D-20146 Hamburg   Email: luis.kornbl...@zmaw.de
 Federal Republic of Germany



smime.p7s
Description: S/MIME Cryptographic Signature
___
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] [vtkusers] cmake language syntax highlighting added to wiki

2010-02-23 Thread Mathieu Malaterre
Could someone please point me to the configuration file for this mode
? I need to create a cmake syntax highlighting mode for docbook.

Thanks

On Wed, Jan 6, 2010 at 11:21 PM, David Doria daviddoria+...@gmail.com wrote:
 FYI anyone writing wiki pages -

 On the Kitware wiki's, you can now use:

 source lang=cmake
 ... cmake code here ...
 /source

 (versus the old source lang=text or manual syntax highlighting )

 This looks much nicer than plain text, and is must less painful than
 manual syntax highlighting.  I know many of the Paraview wiki pages
 (http://www.cmake.org/Wiki/Plugin_HowTo#Writing_Plugins) use manual
 syntax highlighting - should I update them to use lang=cmake?

 A comparison with plain text is here (for a few days - before I remove
 the old text-only version):
 http://www.vtk.org/Wiki/Distance_between_two_points

 Thanks,

 David D.
 ___
 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 VTK FAQ at: 
 http://www.vtk.org/Wiki/VTK_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.vtk.org/mailman/listinfo/vtkusers




-- 
Mathieu
___
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: Avoid buggy SIGCHLD on Interix

2010-02-23 Thread Markus Duft
Brad King wrote:
 On Interix we cannot rely on SIGCHLD because it is only sometimes
 delivered.  Our SIGCHLD handler wakes up any current select() call to
 check if its child terminated, but the handler itself does not care
 about any child.  Therefore we can use the same handler with SIGALRM to
 poll at regular intervals.

the patch is ok as-is now. it fixes my issues on multi-core interix. in
combination with my interix patch (attached again), interix seems to
work rather good. i get the following test results (which i find
surprisingly good, knowing of the many hickups interix can have ;)):

97% tests passed, 5 tests failed out of 156

Total Test time (real) = 2058.00 sec

The following tests FAILED:
 49 - ExportImport (Failed)
 73 - CMakeTestMultipleConfigures (SEGFAULT)
 96 - Plugin (Failed)
106 - CTest.UpdateGIT (Failed)
123 - CTestTestTimeout (Failed)
Errors while running CTest

Opinions?

Thanks!

Cheers, Markus

 
 Patch from Markus Duft, posted to cmake@cmake.org, 2010-02-18.
 ---
 
 Markus Duft wrote:
 with this check it seems that all sub-processes time out immediately.
 
 On this front, it turns out that you're correct.  The polling timeout
 code path was wrong...in CMake 2.6.4.  When I responded before I was
 looking at the latest development sources which have already fixed the
 problem by calling GetTimeoutLeft correctly.
 
 so now i have two patches to make it work - which one should i prefer?
 
 Here is a patch based on your sigalrm patch.  We can get better than
 1 second intervals by using uslarm(), which I hope exists on Interix.
 
 Please build CMake 2.8.0 with this patch and try it.
 
 -Brad
 
  Source/kwsys/ProcessUNIX.c |   29 +
  1 files changed, 29 insertions(+), 0 deletions(-)
 
 diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
 index 373e906..a70c172 100644
 --- a/Source/kwsys/ProcessUNIX.c
 +++ b/Source/kwsys/ProcessUNIX.c
 @@ -2526,6 +2526,13 @@ static kwsysProcessInstances kwsysProcesses;
  /* The old SIGCHLD handler.  */
  static struct sigaction kwsysProcessesOldSigChldAction;
 
 +#if defined(__INTERIX)
 +/* Interix does not deliver SIGCHLD reliably when a child terminates
 +   so we simulate it at regular intervals using SIGALRM.  */
 +# define KWSYSPE_SIGALRM_INTERVAL 10 /* usec */
 +static struct sigaction kwsysProcessesOldSigAlrmAction;
 +#endif
 +
  
 /*--*/
  static void kwsysProcessesUpdate(kwsysProcessInstances* newProcesses)
  {
 @@ -2536,6 +2543,9 @@ static void kwsysProcessesUpdate(kwsysProcessInstances* 
 newProcesses)
sigset_t oldset;
sigemptyset(newset);
sigaddset(newset, SIGCHLD);
 +#if defined(KWSYSPE_SIGALRM_INTERVAL)
 +  sigaddset(newset, SIGALRM);
 +#endif
sigprocmask(SIG_BLOCK, newset, oldset);
 
/* Store the new set in that seen by the signal handler.  */
 @@ -2642,6 +2652,13 @@ static int kwsysProcessesAdd(kwsysProcess* cp)
  while((sigaction(SIGCHLD, newSigChldAction,
   kwsysProcessesOldSigChldAction)  0) 
(errno == EINTR));
 +
 +#if defined(KWSYSPE_SIGALRM_INTERVAL)
 +while((sigaction(SIGALRM, newSigChldAction,
 + kwsysProcessesOldSigAlrmAction)  0) 
 +  (errno == EINTR));
 +ualarm(KWSYSPE_SIGALRM_INTERVAL, KWSYSPE_SIGALRM_INTERVAL);
 +#endif
  }
}
 
 @@ -2680,6 +2697,12 @@ static void kwsysProcessesRemove(kwsysProcess* cp)
while((sigaction(SIGCHLD, kwsysProcessesOldSigChldAction, 0)  0) 
  (errno == EINTR));
 
 +#if defined(KWSYSPE_SIGALRM_INTERVAL)
 +  ualarm(0, 0);
 +  while((sigaction(SIGALRM, kwsysProcessesOldSigAlrmAction, 0)  0) 
 +(errno == EINTR));
 +#endif
 +
/* Free the table of process pointers since it is now empty.
   This is safe because the signal handler has been removed.  */
newProcesses.Size = 0;
 @@ -2736,6 +2759,12 @@ static void kwsysProcessesSignalHandler(int signum
while((sigaction(SIGCHLD, newSigChldAction,
 kwsysProcessesOldSigChldAction)  0) 
  (errno == EINTR));
 +
 +#if defined(KWSYSPE_SIGALRM_INTERVAL)
 +  while((sigaction(SIGALRM, newSigChldAction,
 +   kwsysProcessesOldSigAlrmAction)  0) 
 +(errno == EINTR));
 +#endif
}
  #endif
  }

reported upstream: 
http://www.cmake.org/pipermail/cmake/2010-February/035186.html

diff -ruN cmake-2.6.0.orig/Modules/Platform/Interix.cmake 
cmake-2.6.0/Modules/Platform/Interix.cmake
--- cmake-2.6.0.orig/Modules/Platform/Interix.cmake 1970-01-01 01:00:00 
+0100
+++ cmake-2.6.0/Modules/Platform/Interix.cmake  2008-06-02 14:22:45 +0200
@@ -0,0 +1,31 @@
+# This is a proposed Platform definition for Interix GCC/G++
+
+SET(CMAKE_DL_LIBS dl)
+SET(CMAKE_SHARED_LIBRARY_C_FLAGS )
+SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS -shared)
+SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS )

Re: [CMake] multicore interix'en testing

2010-02-23 Thread Markus Duft
Bill Hoffman wrote:
 I did not want to get into the technical thread on this issue, so I
 created a new message.  Markus, will you be able to run a dashboard for
 this platform?  It is sort of a requirement for accepting patches like
 this into CMake.  Otherwise, we are sure to break things in the future
 and not notice it.   Once we get all the tests passing we can help you
 setup a CDash client to submit nightly builds.

my boss isn't quite happy with running nightly builds for another
company... but still i guess i'll be running cdash in a vm here, since i
_want_ interix support upstream ;). am i right that the cdash client
checks out a copy, builds, tests and then reports the results to you
(over http?)? so there is no need for any inbound connections? i'll be
behind proxy/firewall/etc... is this configuration possible?

Cheers, Markus

 
 Thanks.
 
 -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

___
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: Avoid buggy SIGCHLD on Interix

2010-02-23 Thread Markus Duft
Markus Duft wrote:
 Brad King wrote:
 On Interix we cannot rely on SIGCHLD because it is only sometimes
 delivered.  Our SIGCHLD handler wakes up any current select() call to
 check if its child terminated, but the handler itself does not care
 about any child.  Therefore we can use the same handler with SIGALRM to
 poll at regular intervals.
 
 the patch is ok as-is now. it fixes my issues on multi-core interix. in
 combination with my interix patch (attached again), interix seems to
 work rather good. i get the following test results (which i find
 surprisingly good, knowing of the many hickups interix can have ;)):
 
 97% tests passed, 5 tests failed out of 156
 
 Total Test time (real) = 2058.00 sec
 
 The following tests FAILED:
  49 - ExportImport (Failed)
  73 - CMakeTestMultipleConfigures (SEGFAULT)
  96 - Plugin (Failed)
 106 - CTest.UpdateGIT (Failed)
 123 - CTestTestTimeout (Failed)
 Errors while running CTest

owh - btw. the results are from 2.8.1 rc3.

 
 Opinions?
 
 Thanks!
 
 Cheers, Markus
 
 Patch from Markus Duft, posted to cmake@cmake.org, 2010-02-18.
 ---

 Markus Duft wrote:
 with this check it seems that all sub-processes time out immediately.
 On this front, it turns out that you're correct.  The polling timeout
 code path was wrong...in CMake 2.6.4.  When I responded before I was
 looking at the latest development sources which have already fixed the
 problem by calling GetTimeoutLeft correctly.

 so now i have two patches to make it work - which one should i prefer?
 Here is a patch based on your sigalrm patch.  We can get better than
 1 second intervals by using uslarm(), which I hope exists on Interix.

 Please build CMake 2.8.0 with this patch and try it.

 -Brad

  Source/kwsys/ProcessUNIX.c |   29 +
  1 files changed, 29 insertions(+), 0 deletions(-)

 diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
 index 373e906..a70c172 100644
 --- a/Source/kwsys/ProcessUNIX.c
 +++ b/Source/kwsys/ProcessUNIX.c
 @@ -2526,6 +2526,13 @@ static kwsysProcessInstances kwsysProcesses;
  /* The old SIGCHLD handler.  */
  static struct sigaction kwsysProcessesOldSigChldAction;

 +#if defined(__INTERIX)
 +/* Interix does not deliver SIGCHLD reliably when a child terminates
 +   so we simulate it at regular intervals using SIGALRM.  */
 +# define KWSYSPE_SIGALRM_INTERVAL 10 /* usec */
 +static struct sigaction kwsysProcessesOldSigAlrmAction;
 +#endif
 +
  
 /*--*/
  static void kwsysProcessesUpdate(kwsysProcessInstances* newProcesses)
  {
 @@ -2536,6 +2543,9 @@ static void 
 kwsysProcessesUpdate(kwsysProcessInstances* newProcesses)
sigset_t oldset;
sigemptyset(newset);
sigaddset(newset, SIGCHLD);
 +#if defined(KWSYSPE_SIGALRM_INTERVAL)
 +  sigaddset(newset, SIGALRM);
 +#endif
sigprocmask(SIG_BLOCK, newset, oldset);

/* Store the new set in that seen by the signal handler.  */
 @@ -2642,6 +2652,13 @@ static int kwsysProcessesAdd(kwsysProcess* cp)
  while((sigaction(SIGCHLD, newSigChldAction,
   kwsysProcessesOldSigChldAction)  0) 
(errno == EINTR));
 +
 +#if defined(KWSYSPE_SIGALRM_INTERVAL)
 +while((sigaction(SIGALRM, newSigChldAction,
 + kwsysProcessesOldSigAlrmAction)  0) 
 +  (errno == EINTR));
 +ualarm(KWSYSPE_SIGALRM_INTERVAL, KWSYSPE_SIGALRM_INTERVAL);
 +#endif
  }
}

 @@ -2680,6 +2697,12 @@ static void kwsysProcessesRemove(kwsysProcess* cp)
while((sigaction(SIGCHLD, kwsysProcessesOldSigChldAction, 0)  0) 
  (errno == EINTR));

 +#if defined(KWSYSPE_SIGALRM_INTERVAL)
 +  ualarm(0, 0);
 +  while((sigaction(SIGALRM, kwsysProcessesOldSigAlrmAction, 0)  0) 
 +(errno == EINTR));
 +#endif
 +
/* Free the table of process pointers since it is now empty.
   This is safe because the signal handler has been removed.  */
newProcesses.Size = 0;
 @@ -2736,6 +2759,12 @@ static void kwsysProcessesSignalHandler(int signum
while((sigaction(SIGCHLD, newSigChldAction,
 kwsysProcessesOldSigChldAction)  0) 
  (errno == EINTR));
 +
 +#if defined(KWSYSPE_SIGALRM_INTERVAL)
 +  while((sigaction(SIGALRM, newSigChldAction,
 +   kwsysProcessesOldSigAlrmAction)  0) 
 +(errno == EINTR));
 +#endif
}
  #endif
  }
 
 
 
 
 ___
 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

___
Powered by www.kitware.com

Visit other 

Re: [CMake] Bug in Darwin CMAKE_SYSTEM_PROCESSOR

2010-02-23 Thread Bill Hoffman

Luis Kornblueh wrote:

Hi,

for me it looks like a small bug in determining the processor type
in Darwin (MacOSX):

uname -m returns always i386 despite of the processor used

uname -p returns on a laptop (Core2duo) running 10.5.x i386
  (32bit kernel)

uname -p returns on a MacPro (Nehalem)  running 10.6.x x86_64
  (64bit kernel)

It seems that cmake_system_processor is using for Darwin uname -m 
instead of uname -p.


I checked as well config.guess, which returns the uname -p results
(more or less ;-) - i686 instead of i386).

I think, it would be nice, to fix this.

Thanks a lot,


Please create a bug report.

-Bill

--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoff...@kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
___
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] multicore interix'en testing

2010-02-23 Thread Bill Hoffman

Markus Duft wrote:

Bill Hoffman wrote:

I did not want to get into the technical thread on this issue, so I
created a new message.  Markus, will you be able to run a dashboard for
this platform?  It is sort of a requirement for accepting patches like
this into CMake.  Otherwise, we are sure to break things in the future
and not notice it.   Once we get all the tests passing we can help you
setup a CDash client to submit nightly builds.


my boss isn't quite happy with running nightly builds for another

But he is happy to use open source software from that company??

company... but still i guess i'll be running cdash in a vm here, since i
_want_ interix support upstream ;). am i right that the cdash client
checks out a copy, builds, tests and then reports the results to you
(over http?)? so there is no need for any inbound connections? i'll be
behind proxy/firewall/etc... is this configuration possible?

Yes, ctest uses http put, and there are no inbound connections.   If you 
have a build tree, you can run make Experimental to see if it will work 
for you.   I can then send you a better dashboard script for doing the 
nightly once that is working.  Thanks.


-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


Re: [CMake] [PATCH] KWSys: Avoid buggy SIGCHLD on Interix

2010-02-23 Thread Brad King
Markus Duft wrote:
 the patch is ok as-is now. it fixes my issues on multi-core interix.

Great.  Thanks for testing.  I'll include it in CMake upstream as
soon as we have finished transitioning to the new Git repository
I announced yesterday and open it for publishing.

 in combination with my interix patch (attached again)

The platform support files have been significantly refactored
in 2.8.1-rc[123] since 2.6.0.  Please port it to the new layout
and test it.  It will probably get simpler.

  49 - ExportImport (Failed)
  96 - Plugin (Failed)

These two build executables and then modules (DLLs) that link
to the executables so that they use a plugin API at dlopen time.
Likely your platform file needs some flag tweaking.  Look at

  CMAKE_EXE_EXPORTS_C_FLAG

in Linux.cmake.

  73 - CMakeTestMultipleConfigures (SEGFAULT)

I guess this one will have to be debugged manually.

 106 - CTest.UpdateGIT (Failed)
 123 - CTestTestTimeout (Failed)

These do not affect use of CMake to build a project, but
do affect CTest.  I'd need to see output to debug them.

BTW, once we get this working will you be able to submit
a nightly dashboard entry so we can keep it working?

Thanks,
-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] multicore interix'en testing

2010-02-23 Thread Markus Duft
Bill Hoffman wrote:
 Markus Duft wrote:
 Bill Hoffman wrote:
 I did not want to get into the technical thread on this issue, so I
 created a new message.  Markus, will you be able to run a dashboard for
 this platform?  It is sort of a requirement for accepting patches like
 this into CMake.  Otherwise, we are sure to break things in the future
 and not notice it.   Once we get all the tests passing we can help you
 setup a CDash client to submit nightly builds.

 my boss isn't quite happy with running nightly builds for another
 But he is happy to use open source software from that company??

hehe - somewhat like my own words ;) it won't be much of a problem :)

 company... but still i guess i'll be running cdash in a vm here, since i
 _want_ interix support upstream ;). am i right that the cdash client
 checks out a copy, builds, tests and then reports the results to you
 (over http?)? so there is no need for any inbound connections? i'll be
 behind proxy/firewall/etc... is this configuration possible?

 Yes, ctest uses http put, and there are no inbound connections.   If you
 have a build tree, you can run make Experimental to see if it will work
 for you.   I can then send you a better dashboard script for doing the
 nightly once that is working.  Thanks.

[3] mduft cmake-2.8.1-rc3 $ make Experimental
Scanning dependencies of target Experimental
make[3]: CMAKE_CTEST_COMMAND-NOTFOUND: Command not found

errr... make test works...

[3] mduft cmake-2.8.1-rc3 $ make test
Running tests...
Test project
/dev/fs/E/tools/toolsbase-2010.0/var/tmp/portage/dev-util/cmake-2.8.1_rc3/work/cmake-2.8.1-rc3
Guessing configuration NoConfig
Start   1: SystemInformationNew
...

ctest is there both in the build tree and installed:

[3] mduft cmake-2.8.1-rc3 $ type ctest
ctest is /dev/fs/E/tools/toolsbase-2010.0/usr/bin/ctest


 
 -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


Re: [CMake] multicore interix'en testing

2010-02-23 Thread Markus Duft
Bill Hoffman wrote:
 Markus Duft wrote:
 Bill Hoffman wrote:
 I did not want to get into the technical thread on this issue, so I
 created a new message.  Markus, will you be able to run a dashboard for
 this platform?  It is sort of a requirement for accepting patches like
 this into CMake.  Otherwise, we are sure to break things in the future
 and not notice it.   Once we get all the tests passing we can help you
 setup a CDash client to submit nightly builds.

 my boss isn't quite happy with running nightly builds for another
 But he is happy to use open source software from that company??
 company... but still i guess i'll be running cdash in a vm here, since i
 _want_ interix support upstream ;). am i right that the cdash client
 checks out a copy, builds, tests and then reports the results to you
 (over http?)? so there is no need for any inbound connections? i'll be
 behind proxy/firewall/etc... is this configuration possible?

 Yes, ctest uses http put, and there are no inbound connections.   If you
 have a build tree, you can run make Experimental to see if it will work
 for you.   I can then send you a better dashboard script for doing the
 nightly once that is working.  Thanks.

btw, any chance to integrate this with buildbot? i have buildbot running
already on the machines in question for our own sw, so it would be cool
from a resource management POV.

Cheers, and thanks, Markus

 
 -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


Re: [CMake] Bug in Darwin CMAKE_SYSTEM_PROCESSOR

2010-02-23 Thread Sean McBride
On 2/23/10 10:10 AM, Luis Kornblueh said:

for me it looks like a small bug in determining the processor type
in Darwin (MacOSX):

uname -m returns always i386 despite of the processor used

No, it can also return ppc or arm, depending.

uname -p returns on a laptop (Core2duo) running 10.5.x i386
   (32bit kernel)

uname -p returns on a MacPro (Nehalem)  running 10.6.x x86_64
   (64bit kernel)

It seems that cmake_system_processor is using for Darwin uname -m 
instead of uname -p.

I checked as well config.guess, which returns the uname -p results
(more or less ;-) - i686 instead of i386).

I think, it would be nice, to fix this.

There was a large discussion about uname's output some months ago...
here it is:
http://lists.apple.com/archives/Darwin-dev/2009/Aug/msg00211.html

As for changing CMake's current behaviour that would all depend
_why_ CMake wants to know the cpu type.  Another technique could be to
use sysctlbyname().  For example:
http://github.com/tcurdt/feedbackreporter/blob/master/Sources/Main/
FRSystemProfile.m

-- 

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com 
Mac Software Developer  Montréal, Québec, Canada


___
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] Trying to mix C++ and Fortran code...

2010-02-23 Thread Caron, Michael C. (US SSA)
I've just started using CMake and have great hopes for it making my life 
simpler.  I currently have a windows console project that mixes C++ and Fortran 
code.  I have the main body of the code (in Fortran), an interface to display 
code written in C++(in Fortran), and some display code (C++).  I have used 
Visual Studio .NET 2003 and Intel Fortran 9.0 to build and link these 
successfully already, by building the project files and tweaking the 
appropriate build settings.  I'd like to switch to cmake generated build files 
so I can cross compile on Linux with a minimal amount of effort.  I could build 
makefiles for the Linux side, but then I'd have the nightmare of keeping both 
builds in sync.

I have created the CMakeLists.txt files for each of the subprojects (Fortran 
executable, Fortran Lib, and C++ Lib).  I've also generated nmake makefiles for 
each of the subprojects and used them to build with expected results.  Both the 
Fortran and C++ libs are built successfully and the Fortran executable fails 
complaining about unresolved externals (makes sense since I didn't point it to 
the libs yet).  When I add the code to the Fortran executable CMakeLists.txt to 
add_subdir for each of the static libs, and add the code to link the static 
libs things start to fall apart.

When I generate the make files my C++ lib no longer builds.  Looking around 
online I discovered the FortranCInterface and the FortranCInterface_VERIFY(CXX) 
cmake command.  I added an include for the FortranCInterface and the 
FortranCInterface_VERIFY(CXX) to the executable CMakeLists.txt file figuring 
that might provide some insight.  When I try to run cmake on that 
CMakeLists.txt file cmake complains that it could not compile the simple test 
file for the verify.

I know I can mix C++ and Fortran using the compilers I have, I've done it.  I 
must be missing some cmake magic.  Hopefully it is something stupid and someone 
will be able to see it and point it out to me.

Thanks in advance,
Michael Caron

___
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] Support for languages without linking phase etc

2010-02-23 Thread Michael Wild

On 23. Feb, 2010, at 15:13 , Ivan Chernetsky wrote:

 2010/2/22 Michael Wild them...@gmail.com:
 How about languages where there is no separate compiling phase, such as e.g. 
 C#? Is there a placeholder in CMAKE_LANG_LINK_EXECUTABLE and 
 CMAKE_LANG_CREATE_SHARED_LIBRARY that gets expanded to the list of source 
 files instead of the object files? How to tell CMake to skip the 
 compile-phase without calling cmake --version a few thousand times (and 
 creating a lot of bogus output on the screen)?
 
 You can use a no-op command instead. On *nix platforms, for example,
 it's a shell command named :, though it's definitely not a right
 solution of this problem.


That's going to create a lot of output like Compiling C# object XXX.cs which 
is actually bogus and very confusing...

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] multicore interix'en testing

2010-02-23 Thread Alexander Neundorf
On Tuesday 23 February 2010, Markus Duft wrote:
 Bill Hoffman wrote:
  I did not want to get into the technical thread on this issue, so I
  created a new message.  Markus, will you be able to run a dashboard for
  this platform?  It is sort of a requirement for accepting patches like
  this into CMake.  Otherwise, we are sure to break things in the future
  and not notice it.   Once we get all the tests passing we can help you
  setup a CDash client to submit nightly builds.

 my boss isn't quite happy with running nightly builds for another
 company... 

You are not running the build for Kitware, you are running it to ensure that 
the product of your company is well supported by CMake :-)

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] multicore interix'en testing

2010-02-23 Thread Bill Hoffman

Markus Duft wrote:


btw, any chance to integrate this with buildbot? i have buildbot running
already on the machines in question for our own sw, so it would be cool
from a resource management POV.


No buildbot right now.  If you want to contribute something



[3] mduft cmake-2.8.1-rc3 $ make Experimental
Scanning dependencies of target Experimental
make[3]: CMAKE_CTEST_COMMAND-NOTFOUND: Command not found

errr... make test works...


Can you try this:

cd buildtree
ctest -D Experimental

-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


Re: [CMake] how to find out the compiler ID of a compiler which doesn't link

2010-02-23 Thread Alexander Neundorf
On Monday 22 February 2010, Brad King wrote:
 Alexander Neundorf wrote:
  Hi,
 
  it seems the IAR C/C++ compiler for AVR cannot generate executables, but
  only object files, and the linker has to be called explcitely on the
  generated object files:
  ftp://ftp.iar.se/WWWfiles/avr32/guides/ocavr32.pdf
 
  Which says:
  iccavr32 myfile.c
  xlink myfile.r82 -s __program_start -f lnkavr32.xcl
 
  Can this be made to work with the compiler ID detection in cmake via
  compiling a source file or is the only chance to use the new
  CMAKE_DETERMINE_COMPILER_ID_VENDOR() function ?

 It doesn't have to link.  We can parse the compiler id out of object files.
 Look at lines in CMakeDetermineCCompiler that set

   CMAKE_C_COMPILER_ID_TEST_FLAGS

 We already try compiling with just -c to get an object file.  Add the
 equivalent flag for this compiler if necessary.  Basically we just try
 with no flag, and then with each of the flags listed in this variable.
 After each build we scan all files for the compiler id.  If the object
 file is there it should work.

This is for the AIR compiler, and it produces an IAR .r90 file.
CMake tries to find the string in that file, but doesn't find it.

Here (http://public.kitware.com/Bug/view.php?id=10176) such a file is attached 
(main.r90), and now I actually found the text in it :-)
http://public.kitware.com/Bug/file_download.php?file_id=2896type=bug

Near the end there is the Hello world, but mixed with 6s. Very strange.

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://www.cmake.org/mailman/listinfo/cmake


[CMake] Adding a generated source to all multiple targets

2010-02-23 Thread Oliver Smith
I have a CMake project with a number of targets, and a Lua wrapper 
generated through tolua++ which is included by several of them, so that 
it is compiled with the target-specific make flags per-target.


Global make flags: -O0 -ggdb3 -Wall -Werror ... etc
Target1 make flags: -DAS_DB_PROXY ...
Target2 make flags: -DAS_GAME_SERVER ...
Target3 make flags: -DAS_CLIENT
etc - there are 10 targets in total
LuaTarget make flags: -Wno-unused

The LuaTarget is luapkg.cc generated from lua.pkg via tolua++ -n 
game -o luapkg.cc luapkg.pkg


If I add luapkg.cc to the list of sources for any given target, CMake 
barfs because luapkg.cc doesn't exist.


I've tried variations of add_custom_target and add_custom_command to no 
avail.


Is there a way to do this with CMake 2.6 or 2.8?

And it occurs to me that if I can find a solution to this, I can 
probably use the same solution for adding a precompiled header to each 
target (for my limited subset of platforms).


- Oliver

___
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] Adding a generated source to all multiple targets

2010-02-23 Thread David Cole
Or this:

http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_the_build.3F


On Wed, Feb 24, 2010 at 12:52 AM, Tyler Roscoe ty...@cryptio.net wrote:

 On Tue, Feb 23, 2010 at 10:02:44PM -0600, Oliver Smith wrote:
  If I add luapkg.cc to the list of sources for any given target, CMake
  barfs because luapkg.cc doesn't exist.

 Does this help?

 http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_sf:GENERATED

 tyler
 ___
 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

___
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] multicore interix'en testing

2010-02-23 Thread Markus Duft
Alexander Neundorf wrote:
 On Tuesday 23 February 2010, Markus Duft wrote:
 Bill Hoffman wrote:
 I did not want to get into the technical thread on this issue, so I
 created a new message.  Markus, will you be able to run a dashboard for
 this platform?  It is sort of a requirement for accepting patches like
 this into CMake.  Otherwise, we are sure to break things in the future
 and not notice it.   Once we get all the tests passing we can help you
 setup a CDash client to submit nightly builds.
 my boss isn't quite happy with running nightly builds for another
 company... 
 
 You are not running the build for Kitware, you are running it to ensure that 
 the product of your company is well supported by CMake :-)

yeah, thats what i said too :)

 
 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://www.cmake.org/mailman/listinfo/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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] multicore interix'en testing

2010-02-23 Thread Markus Duft
Bill Hoffman wrote:
 Markus Duft wrote:
 
 btw, any chance to integrate this with buildbot? i have buildbot running
 already on the machines in question for our own sw, so it would be cool
 from a resource management POV.

 No buildbot right now.  If you want to contribute something

we'll see :) depends on available time.. as always

 
 
 [3] mduft cmake-2.8.1-rc3 $ make Experimental
 Scanning dependencies of target Experimental
 make[3]: CMAKE_CTEST_COMMAND-NOTFOUND: Command not found

 errr... make test works...

it worked after i re-built cmake again after initially installing it.
seems that ctest is looked for during bootstrap of cmake, and - of
course - not found. even if it is installed during the whole process,
cmake won't check again, right?

Experimental is running now - takes some time on interix (fst, you
know ;| ).

Markus

 
 Can you try this:
 
 cd buildtree
 ctest -D Experimental
 
 -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