Alan W. Irwin | 1 Aug 01:08 2008
Picon
Picon

Re: Recursive custom target

On 2008-07-31 19:07-0000 Piotr JaroszyĆ~Dski wrote:

>>> is it possible to add a custom target so that it would be visible in
>>> all the subdirectories?
>>
>> My experience is that targets are actually available in all directories.
>
> $ mkdir /tmp/test
> $ cd /tmp/test
> $ echo "add_custom_target(bar)" > CMakeLists.txt
> $ echo "add_subdirectory(foo)" >> CMakeLists.txt
> $ mkdir foo
> $ cmake .
>
> $ make bar
> Built target bar
> $ cd foo && make bar
> make: *** No rule to make target `bar'.  Stop.
>
> $ cmake --version
> cmake version 2.4-patch 8

I misunderstood your original request to mean "how to gain access to targets
within cmake", and my reply answers that question.

AFAIK, targets are available to _make_ (as opposed to cmake) in the
directory where they are defined by cmake and also in the top-level
directory.  However, the targets are not available in any other directory
than those two as confirmed by your example and also by some private
experiments I just did.
(Continue reading)

Andrew Sayman | 1 Aug 01:34 2008
Picon

Error running link command: Argument list too long

The ChangeLogs that I can find for CMake 2.4.8 and 2.6.0 all seem to
indicate that link lines being too long was fixed. Unfortunately, I'm
still seeing link lines that are too long and immediately fail out
because of it. Is there any place with more details on exactly *what*
was done to fix it? I can't seem to find anything in the bug tracker
about it, or any pages that mention it, and the FAQ is rather useless
on the matter.
--

-- 
Andrew Sayman
Phil Smith | 1 Aug 01:39 2008

Re: FW: cmake newbie questions

>Did you set the CMAKE_EXECUTABLE_SUFFIX appropriately for z/OS ?

If by 'executable' you mean 'linked object', i.e., a .EXE if this was Windows, then I *think* I have: in
zosport.cmake is:

SET(CMAKE_LINKER       "linkit.bat")
SET(CMAKE_EXECUTABLE_SUFFIX "OUT")

However, my linkit.bat starts with:

 <at> echo Running linkit.bat: %1 %2 %3 %4 %5 %6 %7 %8 %9 >> \temp\ll.txt

and that file doesn't get created.  So, it appears to me that there's no CMAKE_LINKER being called.

Obviously I'm missing something(s) here...

...phsiii
Bill Hoffman | 1 Aug 04:30 2008

Re: Error running link command: Argument list too long

Andrew Sayman wrote:
> The ChangeLogs that I can find for CMake 2.4.8 and 2.6.0 all seem to
> indicate that link lines being too long was fixed. Unfortunately, I'm
> still seeing link lines that are too long and immediately fail out
> because of it. Is there any place with more details on exactly *what*
> was done to fix it? I can't seem to find anything in the bug tracker
> about it, or any pages that mention it, and the FAQ is rather useless
> on the matter.
Try 2.6.1 RC 16 and see if it is fixed.

http://www.cmake.org/files/v2.6/*RC-16*

What OS/Generator/Compiler are you using?

-Bill
ning | 1 Aug 06:36 2008
Picon

CMake 2.6.0 cross-compile: 1st time failed, 2nd time passed

Hi List,

I am here trying to cross-compile a tiny demo project
with cmake 2.6.0.

When I ran cmake for the first time, link failed because
CMAKE_C_FLAGS was not used to compile cmTryCompileExec.
Then I modified nothing, but only ran cmake again.
CMAKE_C_FLAGS was used properly and link passed.

The project settings and logs are attached below.
Could you point out which part I have done wrong and
how to fix it.
Thanks in advance.

Best regards.
ning

=====project setting=====
-----dir structure-----
.
|-- CMakeLists.txt
|-- build/
|-- cross-tools.cmake
`-- tiny.c

-----tiny.c-----
#include <stdio.h>
int main()
{
(Continue reading)

Andrew Sayman | 1 Aug 07:02 2008
Picon

Re: Error running link command: Argument list too long

On Thu, Jul 31, 2008 at 10:30 PM, Bill Hoffman
<bill.hoffman@...> wrote:
> Try 2.6.1 RC 16 and see if it is fixed.
>
> What OS/Generator/Compiler are you using?

It didn't help. I'm using RHEL5.1 / Unix Makefiles / gcc-4.1.2

I may have actually stated the problem incorrectly. I'm building a
static library with a lot of object files in it. When it's done it
just makes one long `ar cr <OBJECTS>` list and the list is too long.
--

-- 
Andrew Sayman
Yuri V. Timenkov | 1 Aug 09:37 2008

Re: CPack Stripping Debug

On Thursday 31 July 2008 22:47:10 Bill Hoffman wrote:
> Paul Hatfield wrote:
> > When compiling a binary with CMAKE_BUILD_TYPE as RelWithDebInfo, I
> > verify that the binary has debug symbols, but when I generate an rpm
> > using Cpack the debug symbols are lost.  What's causing this?
>
> rpm automatically runs strip on executables.  It is not cmake doing this
> but rather the rpm tools.
Not exactly... RPM strips executables (at least versions I'm working with - 
4.4) as part of post-install action. spec generated in CPackRPM.cmake doesn't 
contain %install section, so rpm doesn't strip binaries and create debug 
package. Look in rpmbuild and cpack logs.

Also, you may check for CPACK_STRIP_FILES cpack variable.

>
> -Bill
> _______________________________________________
> CMake mailing list
> CMake@...
> http://www.cmake.org/mailman/listinfo/cmake
Artur Wisz | 1 Aug 11:52 2008

Re: cmake 2.5 with windows mobile

Hi Bartek,
no, after spending a couple of hours on this I gave up, we had to move 
on with our project. It looks like it is more difficult than the cmake's 
maintainers think. At least a good knowledge of cmake's architecture is 
needed as well as the specifics of WinCE build process, which really IS 
different from normal Win32.
Hoping someone makes it through...
Regards,

Art

barte wrote:
> Hi Artur,
>
> I was searching cmake mailing list for CMake compability with Windows 
> Mobile and I found your topic the closest to what i was looking for.
> Did you sucessfully set up env for compiling and building Mobile apps 
> with CMake ?
>
> Best regards
> Bartek
>
>
Andreas Pokorny | 1 Aug 14:38 2008
Picon

Re: cmake 2.5 with windows mobile

Hello,

We are building for Win32, WinCE, QNX, Linux and hopefully soon also
Symbian, with mostly
cross compile setups using cmake. But note, that right now cross
compiling only works
for gnu make and nmake. Someone on this list also managed to extend
the Visual Studio
generator to support installed SDKs.

I aggree, that to support a new platform you have to have a good
knowledge of cmake. You
need the will to printf-debug yourself through the cmake modules scripts.

kind regards
Andreas

2008/8/1 Artur Wisz <wisz@...>:
> Hi Bartek,
> no, after spending a couple of hours on this I gave up, we had to move on
> with our project. It looks like it is more difficult than the cmake's
> maintainers think. At least a good knowledge of cmake's architecture is
> needed as well as the specifics of WinCE build process, which really IS
> different from normal Win32.
> Hoping someone makes it through...
> Regards,
>
> Art
>
> barte wrote:
(Continue reading)

Brad King | 1 Aug 15:13 2008

Re: Error running link command: Argument list too long

Andrew Sayman wrote:
> On Thu, Jul 31, 2008 at 10:30 PM, Bill Hoffman
<bill.hoffman@...> wrote:
>> Try 2.6.1 RC 16 and see if it is fixed.
>>
>> What OS/Generator/Compiler are you using?
> 
> It didn't help. I'm using RHEL5.1 / Unix Makefiles / gcc-4.1.2
> 
> I may have actually stated the problem incorrectly. I'm building a
> static library with a lot of object files in it. When it's done it
> just makes one long `ar cr <OBJECTS>` list and the list is too long.

All the fixes you've seen are for Windows with its 32k command line 
length limit.  This is the first time I've seen someone with so many 
object files that it gives Linux a problem.  What is the error message 
that you get?

Try adding the lines below to your project (just to see if it helps, not 
as a permanent solution).  They're from Windows-gcc.cmake and are used 
for long link lines on Windows.  They tell CMake how to split up the 
static archive creation into multiple invocations of the archiver.  If 
this helps we can probably just use the same thing for all platforms.

-Brad

SET(CMAKE_C_ARCHIVE_CREATE
     "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
SET(CMAKE_C_ARCHIVE_APPEND
     "<CMAKE_AR> r  <TARGET> <LINK_FLAGS> <OBJECTS>")
(Continue reading)


Gmane