RE: [CMake] Compile/install on HPUX on ia64 (Itanium)

2006-06-29 Thread David Akdikmen
Hi,

What version of the compiler you got?  I'm getting all sorts of problems
now trying to build ITK with the cmake I made from the CVS tree.  My new
Itanium has been commandeered as the new Sub-version server and this old
box I'm using has HP ANSI C Version A.05.50 [September 03].  Notice that
there are 4 newer versions available from HP, A.05.55, A.05.60, A.06.05,
and A.06.10. 

I have general question on how cmake works, does it take the compiler
and options you specify in the CMakeCache.txt file and test to see if
various headers and feature exist with that compiler/options or does it
look when it was being created?  Or does it just look for the header
files?  Or some mixture of some built-in settings and others tested?

I tried setting the -AP compiler option in the CMakeCache.txt, which
disables iostream and re-enables iostream.h, but the configurations
still says it detected support for the new style IO streams?

-David
-Original Message-
From: William A. Hoffman [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 28, 2006 5:05 PM
To: David Akdikmen; Brad King
Cc: cmake@cmake.org
Subject: RE: [CMake] Compile/install on HPUX on ia64 (Itanium)

My HP does this:


Performing C SOURCE FILE Test ATTR_UNUSED_VAR succeded with the
following output:
gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.
dir/build
gmake[1]: Entering directory
`/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8
-aCC/cmake-ia64/CMakeFiles/CMakeTmp'
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/Bootst
rap.cmk/cmake -E cmake_progress_report
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/CMakeF
iles/CMakeTmp/CMakeFiles 100
Building C object CMakeFiles/cmTryCompileExec.dir/src.o
/usr/bin/cc  -Aa -Ae -o CMakeFiles/cmTryCompileExec.dir/src.o   -c
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/CMakeF
iles/CMakeTmp/src.c
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/CMake
Files/CMakeTmp/src.c, line 6: warning #2001-D: last line of file ends
without a newline
  int main() { int x __attribute__((__unused__)) ; return 0; }
  ^

The problem seems to be that the file should have a newline on it. 
We have checked in a change to the source to put the newline in the
file.

-Bill


At 04:37 PM 6/28/2006, David Akdikmen wrote:
Odd, I'm not sure what's going on.  When I cc the file at the command
prompt, it doesn't complain about the __attribute__ symbols. It looks
like it is complaining about not having a LF at the end of the file?

It looks like it thinks __attribute__ is just some function returning
int?

Does your version of the HPUX compiler have __attribute__ defined?
What
happens on your machine for the ATTR_UNUSED_VAR test?

I'll include both the results, one with +p and one without +p

I unset the +p flag and re-ran the configure (after deleting all the
CMakeCache.txt files)

Here is the CMakeOutput.log (it claims success with out the +p)

Performing C SOURCE FILE Test ATTR_UNUSED_VAR succeded with the
following output:
make -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
Building C object CMakeFiles/cmTryCompileExec.dir/src.o
/usr/bin/cc  -Aa -Ae -o
CMakeFiles/cmTryCompileExec.dir/src.o   -c
/home/khoros/cmake-2.4.2/CMakeFiles/CMakeTmp/src.c
Error (future) 690:
/home/khoros/cmake-2.4.2/CMakeFiles/CMakeTmp/src.c, line 6 # Nonempty
source files must end with a newline that is not preceded by a
backslash.
Warning:1 future errors were detected and ignored. Add a '+p'
option to detect and fix them before they become fatal errors in a
future release. Behavior of this ill-formed program is not guaranteed
to
match that of a well-formed program
Linking C executable cmTryCompileExec
/home/khoros/cmake-2.4.2/Bootstrap.cmk/cmake -P
CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake
/usr/bin/cc -Aa -Ae+Z
CMakeFiles/cmTryCompileExec.dir/src.o   -o cmTryCompileExec -Wl,+s
-Wl,-E

Source file was:
#include stdio.h
#include stdarg.h
#include sys/ioctl.h
#include wchar.h

int main() { int x __attribute__((__unused__)) ; return 0; }
APPEND---

Here is the CMakeError.log when +p is added to the CFLAG.

Performing C SOURCE FILE Test ATTR_UNUSED_VAR failed with the following
output:
make -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompi
leExec.dir/build
Building C object CMakeFiles/cmTryCompileExec.dir/src.o
/usr/bin/cc  +p  -Aa -Ae -o
CMakeFiles/cmTryCompileExec.dir/src.o
-c /home/khoros/cmake-2.4.2/CMakeFiles/CMakeTmp/src.c
Error 690: /home/khoros/cmake-2.4.2/CMakeFiles/CMakeTmp/src.c, line 6
# Nonempty source files must end with a newline that is not preceded by
a backslash.
*** Error exit code 2

Stop.
*** Error exit code 1

Stop.

Source 

RE: [CMake] Compile/install on HPUX on ia64 (Itanium)

2006-06-29 Thread William A. Hoffman
How can you tell what version it is?


At 11:16 AM 6/29/2006, David Akdikmen wrote:
Hi,

What version of the compiler you got?  I'm getting all sorts of problems

How can you tell what version it is?  

 

I have general question on how cmake works, does it take the compiler
and options you specify in the CMakeCache.txt file and test to see if

Try setting CXXFLAGS and CFLAGS, CC and CXX BEFORE running cmake, and
make sure you delete the build tree if you have any old builds around.
You should also be using out of source builds.


various headers and feature exist with that compiler/options or does it
look when it was being created?  Or does it just look for the header
files?  Or some mixture of some built-in settings and others tested?

The features are all tested.

I tried setting the -AP compiler option in the CMakeCache.txt, which
disables iostream and re-enables iostream.h, but the configurations
still says it detected support for the new style IO streams?

Put it in CXXFLAGS.

-David
-Original Message-
From: William A. Hoffman [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 28, 2006 5:05 PM
To: David Akdikmen; Brad King
Cc: cmake@cmake.org
Subject: RE: [CMake] Compile/install on HPUX on ia64 (Itanium)

My HP does this:


Performing C SOURCE FILE Test ATTR_UNUSED_VAR succeded with the
following output:
gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.
dir/build
gmake[1]: Entering directory
`/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8
-aCC/cmake-ia64/CMakeFiles/CMakeTmp'
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/Bootst
rap.cmk/cmake -E cmake_progress_report
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/CMakeF
iles/CMakeTmp/CMakeFiles 100
Building C object CMakeFiles/cmTryCompileExec.dir/src.o
/usr/bin/cc  -Aa -Ae -o CMakeFiles/cmTryCompileExec.dir/src.o   -c
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/CMakeF
iles/CMakeTmp/src.c
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/CMake
Files/CMakeTmp/src.c, line 6: warning #2001-D: last line of file ends
without a newline
  int main() { int x __attribute__((__unused__)) ; return 0; }
  ^

The problem seems to be that the file should have a newline on it. 
We have checked in a change to the source to put the newline in the
file.

-Bill


At 04:37 PM 6/28/2006, David Akdikmen wrote:
Odd, I'm not sure what's going on.  When I cc the file at the command
prompt, it doesn't complain about the __attribute__ symbols. It looks
like it is complaining about not having a LF at the end of the file?

It looks like it thinks __attribute__ is just some function returning
int?

Does your version of the HPUX compiler have __attribute__ defined?
What
happens on your machine for the ATTR_UNUSED_VAR test?

I'll include both the results, one with +p and one without +p

I unset the +p flag and re-ran the configure (after deleting all the
CMakeCache.txt files)

Here is the CMakeOutput.log (it claims success with out the +p)

Performing C SOURCE FILE Test ATTR_UNUSED_VAR succeded with the
following output:
make -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
Building C object CMakeFiles/cmTryCompileExec.dir/src.o
/usr/bin/cc  -Aa -Ae -o
CMakeFiles/cmTryCompileExec.dir/src.o   -c
/home/khoros/cmake-2.4.2/CMakeFiles/CMakeTmp/src.c
Error (future) 690:
/home/khoros/cmake-2.4.2/CMakeFiles/CMakeTmp/src.c, line 6 # Nonempty
source files must end with a newline that is not preceded by a
backslash.
Warning:1 future errors were detected and ignored. Add a '+p'
option to detect and fix them before they become fatal errors in a
future release. Behavior of this ill-formed program is not guaranteed
to
match that of a well-formed program
Linking C executable cmTryCompileExec
/home/khoros/cmake-2.4.2/Bootstrap.cmk/cmake -P
CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake
/usr/bin/cc -Aa -Ae+Z
CMakeFiles/cmTryCompileExec.dir/src.o   -o cmTryCompileExec -Wl,+s
-Wl,-E

Source file was:
#include stdio.h
#include stdarg.h
#include sys/ioctl.h
#include wchar.h

int main() { int x __attribute__((__unused__)) ; return 0; }
APPEND---

Here is the CMakeError.log when +p is added to the CFLAG.

Performing C SOURCE FILE Test ATTR_UNUSED_VAR failed with the following
output:
make -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompi
leExec.dir/build
Building C object CMakeFiles/cmTryCompileExec.dir/src.o
/usr/bin/cc  +p  -Aa -Ae -o
CMakeFiles/cmTryCompileExec.dir/src.o
-c /home/khoros/cmake-2.4.2/CMakeFiles/CMakeTmp/src.c
Error 690: /home/khoros/cmake-2.4.2/CMakeFiles/CMakeTmp/src.c, line 6
# Nonempty source files must end with a newline that is not preceded by
a backslash.

RE: [CMake] Compile/install on HPUX on ia64 (Itanium)

2006-06-29 Thread David Akdikmen
cc -V

or as root swlist -l product and look for compiler (C-ANSI-C) in
output.

I get 

ACXX  C.05.50HP aC++
...
C-ANSI-C  C.05.50HP C/ANSI C Compiler
...

-David
-Original Message-
From: William A. Hoffman [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 29, 2006 11:25 AM
To: David Akdikmen; Brad King
Cc: cmake@cmake.org
Subject: RE: [CMake] Compile/install on HPUX on ia64 (Itanium)

How can you tell what version it is?


At 11:16 AM 6/29/2006, David Akdikmen wrote:
Hi,

What version of the compiler you got?  I'm getting all sorts of
problems

How can you tell what version it is?  

 

I have general question on how cmake works, does it take the compiler
and options you specify in the CMakeCache.txt file and test to see if

Try setting CXXFLAGS and CFLAGS, CC and CXX BEFORE running cmake, and
make sure you delete the build tree if you have any old builds around.
You should also be using out of source builds.


various headers and feature exist with that compiler/options or does it
look when it was being created?  Or does it just look for the header
files?  Or some mixture of some built-in settings and others tested?

The features are all tested.

I tried setting the -AP compiler option in the CMakeCache.txt, which
disables iostream and re-enables iostream.h, but the configurations
still says it detected support for the new style IO streams?

Put it in CXXFLAGS.

-David
-Original Message-
From: William A. Hoffman [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 28, 2006 5:05 PM
To: David Akdikmen; Brad King
Cc: cmake@cmake.org
Subject: RE: [CMake] Compile/install on HPUX on ia64 (Itanium)

My HP does this:


Performing C SOURCE FILE Test ATTR_UNUSED_VAR succeded with the
following output:
gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.
dir/build
gmake[1]: Entering directory
`/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8
-aCC/cmake-ia64/CMakeFiles/CMakeTmp'
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/Boots
t
rap.cmk/cmake -E cmake_progress_report
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/CMake
F
iles/CMakeTmp/CMakeFiles 100
Building C object CMakeFiles/cmTryCompileExec.dir/src.o
/usr/bin/cc  -Aa -Ae -o CMakeFiles/cmTryCompileExec.dir/src.o   -c
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/CMake
F
iles/CMakeTmp/src.c
/mnt/kitware/Dashboards/MyTests-HP-UXUB.11.19000-8-aCC/cmake-ia64/CMak
e
Files/CMakeTmp/src.c, line 6: warning #2001-D: last line of file ends
without a newline
  int main() { int x __attribute__((__unused__)) ; return 0; }
  ^

The problem seems to be that the file should have a newline on it. 
We have checked in a change to the source to put the newline in the
file.

-Bill


At 04:37 PM 6/28/2006, David Akdikmen wrote:
Odd, I'm not sure what's going on.  When I cc the file at the command
prompt, it doesn't complain about the __attribute__ symbols. It looks
like it is complaining about not having a LF at the end of the file?

It looks like it thinks __attribute__ is just some function returning
int?

Does your version of the HPUX compiler have __attribute__ defined?
What
happens on your machine for the ATTR_UNUSED_VAR test?

I'll include both the results, one with +p and one without +p

I unset the +p flag and re-ran the configure (after deleting all the
CMakeCache.txt files)

Here is the CMakeOutput.log (it claims success with out the +p)

Performing C SOURCE FILE Test ATTR_UNUSED_VAR succeded with the
following output:
make -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
Building C object CMakeFiles/cmTryCompileExec.dir/src.o
/usr/bin/cc  -Aa -Ae -o
CMakeFiles/cmTryCompileExec.dir/src.o   -c
/home/khoros/cmake-2.4.2/CMakeFiles/CMakeTmp/src.c
Error (future) 690:
/home/khoros/cmake-2.4.2/CMakeFiles/CMakeTmp/src.c, line 6 #
Nonempty
source files must end with a newline that is not preceded by a
backslash.
Warning:1 future errors were detected and ignored. Add a '+p'
option to detect and fix them before they become fatal errors in a
future release. Behavior of this ill-formed program is not guaranteed
to
match that of a well-formed program
Linking C executable cmTryCompileExec
/home/khoros/cmake-2.4.2/Bootstrap.cmk/cmake -P
CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake
/usr/bin/cc -Aa -Ae+Z
CMakeFiles/cmTryCompileExec.dir/src.o   -o cmTryCompileExec -Wl,+s
-Wl,-E

Source file was:
#include stdio.h
#include stdarg.h
#include sys/ioctl.h
#include wchar.h

int main() { int x __attribute__((__unused__)) ; return 0; }
APPEND---

Here is the CMakeError.log when +p is added to the CFLAG.

Performing C SOURCE FILE Test ATTR_UNUSED_VAR failed with the
following
output:

RE: [CMake] Compile/install on HPUX on ia64 (Itanium)

2006-06-29 Thread William A. Hoffman
At 11:46 AM 6/29/2006, David Akdikmen wrote:
cc -V

or as root swlist -l product and look for compiler (C-ANSI-C) in
output.

I get 

ACXX  C.05.50HP aC++
...
C-ANSI-C  C.05.50HP C/ANSI C Compiler
...

trower 53: cc -V
cc: HP aC++/ANSI C B3910B A.06.06 [Nov 7 2005]
trower 54: aCC -V
aCC: HP aC++/ANSI C B3910B A.06.06 [Nov 7 2005]


-Bill

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] CTest Question

2006-06-29 Thread Scott Amort
Hi All,

I have one last hurdle in converting my project over to CMake - unit
testing.  I don't quite understand the CTest framework, and it doesn't
seem to be doing what I expect.  In my tests subdirectory, I have this
CMakeLists.txt:

#for testing
ENABLE_TESTING()

#build testing executables
ADD_EXECUTABLE(ExceptionTest ExceptionTest.cpp)

#add tests
ADD_TEST(exception_test ExceptionTest)

Currently, I generate various unit tests (using CxxTest) that result in
a series of .hpp and .cpp files in my tests subdirectory (e.g.
ExceptionTest).  With the older autotools setup, I could execute `make
check', which would then run these tests.  I expected that with CMake, I
could do a `make test' and get the same result, but it does not seem to
be working this way (although it does build and link the executable).
It would also be preferable that the testing sources aren't compiled
with the project sources, but only when a `make test' or equivalent
command is run.

Is CTest the right framework to be using?  Am I misunderstanding how to
use it?  There is not much documentation on the subject.

Thanks for any assistance!

Best,
Scott
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CTest Question

2006-06-29 Thread William A. Hoffman
At 01:03 PM 6/29/2006, Scott Amort wrote:
Hi All,

I have one last hurdle in converting my project over to CMake - unit
testing.  I don't quite understand the CTest framework, and it doesn't
seem to be doing what I expect.  In my tests subdirectory, I have this
CMakeLists.txt:

#for testing
ENABLE_TESTING()

#build testing executables
ADD_EXECUTABLE(ExceptionTest ExceptionTest.cpp)

#add tests
ADD_TEST(exception_test ExceptionTest)

Currently, I generate various unit tests (using CxxTest) that result in
a series of .hpp and .cpp files in my tests subdirectory (e.g.
ExceptionTest).  With the older autotools setup, I could execute `make
check', which would then run these tests.  I expected that with CMake, I
could do a `make test' and get the same result, but it does not seem to
be working this way (although it does build and link the executable).
It would also be preferable that the testing sources aren't compiled
with the project sources, but only when a `make test' or equivalent
command is run.

Is CTest the right framework to be using?  Am I misunderstanding how to
use it?  There is not much documentation on the subject.

Thanks for any assistance!

Have you looked at the Wiki:

http://www.cmake.org/Wiki/CMake_Testing_With_CTest#Introduction

make test should do the trick.
You can also run ctest directly in the build tree.
What you have should work.  You might have to move the
ENABLE_TESTING to the top of the project.  Also you can
look for the DartTesting.  You can look for this file
in your build tree and make sure it looks good: 
DartTestfile.txt

-Bill


-Bill

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] automagically generated header hell

2006-06-29 Thread David Somers
In a project I'm workking on I use makeheaders 
(http://www.cvstrac.org/cvstrac/dir?d=cvstrac) to automagically generate the 
h files for my c files.

I'm using ADD_CUSTOM_TARGET to generate the headers, and some ADD_DEPENDENCIES 
magic to ensure they're generated before the code is compiled.

All works quite well.

However, as the cmake wiki says Note that generated headers can often cause 
unnecessary rebuilds and should be avoided if possible. And I've run into 
this problem :-(

I have a library that depends on an application being done first (so that the 
library can pull in some of the headers that are generated when the app is 
made). Using ADD_DEPENDENCIES this is working automagically, but the problem 
I've hit is that the library has rebuild problems (i.e. it make will rebuilt 
it even when everything in it is up-to-date).

Is there some way to 'persuade' cmake that in my library when foo.c does 
#include bar.h that it shouldn't add bar.h into the dependencies (because 
I've manually taken care of that elsewhere)?

-- 
David Somers
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Forcing C++: What Causes VC Warning D4025 : overriding /TP with /TC

2006-06-29 Thread Steve Johns
I'm building a project with an application directory and several library 
directories.


Code is a mix of .c and .cpp files.  Some of the directories contain only .c 
files.


I'm using VC 7.1.

I've used these lines in my CMakelists.txt files in order to force .c files 
to be compiled and linked as C++:


SET(CMAKE_C_COMPILER ${CMAKE_CXX_COMPILER})
SET_TARGET_PROPERITES( tgt PROPERTIES LINKER_LANGUAGE CXX)

yet, at build time, I get the error:

Warning D4025 : overriding /TP with /TC

and indeed, there is a /TC on the build command line after the /TP.

I don't want that /TC to be there, and I'd really love to know where it is 
coming from and how to avoid it.



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] out-of-source build and generated files

2006-06-29 Thread Scott Amort
Hi,

First off, thanks to the CMake developers and responders on this list,
my transition to CMake has been almost completely painless, and best of
all, very fast!

I have one more question, however.  Now that my newly-CMaked project
works, I've been experimenting with out-of-source builds.  I have run
into a problem relating to generated files.  My library makes use of an
ANTLR generated lexer/parser, and as it is still quite new and
developing, I include the ANTLR grammar files and generate the source
files at build time with an ADD_CUSTOM_COMMAND.  Works great.  Except,
with an out-of-source build, these newly generated files populate the
source directory, which is what I was trying to avoid with the
out-of-source build.  Has anyone else encountered this situation?  I'm
not really sure how to solve it - if I alter the ADD_CUSTOM_COMMAND to
generate the files in the build directory, they aren't where the
compiler expects them to be, and I can't list them in the CMake
ADD_LIBRARY command as being in the build directory as they don't exist
there yet.  Any thoughts?

Hope this makes sense,
Scott
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake