[CMake] install FILES given unknown argument "PATTERN" -- Windows only?

2009-10-05 Thread Tyler Roscoe
I was overzealous with some pasting and ended up accidentally adding a
PATTERN line to an install (FILES ...) command. CMake 2.6.2 on Linux
didn't complain, but CMake on Windows did:

CMake Error at CMakeTargets.txt:122 (install):
install FILES given unknown argument "PATTERN".
Call Stack (most recent call first):

Why is this only an error on one platform? Does Linux allow PATTERNs in
install (FILES ...) but Windows does not allow this? Is it a bug? If so,
I can add it to the tracker.



A semi-related question that is hopefully not interesting enough for its
own thread: is there a way to set a global default exclude pattern? It
seems silly to have to have a line that does PATTERN ".svn" EXCLUDE in
all of my install (DIRECTORIES ...) rules.

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


Re: [CMake] Crosscompile: CPack Macos and NSIS

2009-10-05 Thread Marcelo Canga

Alex,

I downloaded the source 2.6.4 and I compiled in debug mode.
This is the backtrace of my run,
gdb /download/cmake-2.6.4/bin/cpack
> r --config ./CPackConfig.cmake


#0  0x967afe42 in __kill ()
#1  0x967afe34 in kill$UNIX2003 ()
#2  0x9682223a in raise ()
#3  0x9682e679 in abort ()
#4  0x92c29005 in __gnu_cxx::__verbose_terminate_handler ()
#5  0x92c2710c in __gxx_personality_v0 ()
#6  0x92c2714b in std::terminate ()
#7  0x92c27261 in __cxa_throw ()
#8  0x92be7a6a in std::__throw_logic_error ()
#9  0x92c0f366 in std::string::_S_construct ()
#10 0x92c0f4ac in std::basic_string,  
std::allocator >::basic_string ()
#11 0x000204a0 in cmCPackNSISGenerator::InitializeInternal  
(this=0x82a8e0) at /download/cmake-2.6.4/Source/CPack/ 
cmCPackNSISGenerator.cxx:383
#12 0xd98e in cmCPackGenerator::Initialize (this=0x82a8e0,  
name=0x824b9c "NSIS", mf=0xbfffea38) at /download/cmake-2.6.4/Source/ 
CPack/cmCPackGenerator.cxx:925
#13 0x5e7a in main (argc=3, argv=0xb3d8) at /download/ 
cmake-2.6.4/Source/CPack/cpack.cxx:385


This is the 383 line,
383	std::string tmpFile = this- 
>GetOption("CPACK_TOPLEVEL_DIRECTORY");


This is the 925 line,
925   int result = this->InitializeInternal();

this is the 385 line,
385  if ( parsed && !cpackGenerator->Initialize(gen, mf) )


On Friday 02 October 2009, Canga Marcelo wrote:

I am having trouble building a NSIS package running  cpack from my mac
for windows xp

This is what I have on my cross-compile setup in my mac:

 I have a cross-compile setup working in Macos, mingw-gcc
 I have cpack - zip  running on my mac  for windows xp

This is what I have in windows xp:
I have cpack - nsis for windows xp running from windows xp

This is what is not working,
 I can't run cpack nsis from my mac for windows xp.

When I try to run cpack from my mac, the process die with the
following message,

terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct NULL not valid


Can you run it in gdb to get a backtrace ?


Has anybody been able to builder a NSIS windows xp distribution from a
mac using cpack?


I don't think anybody ever tried that.

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] Include all subfolders and files?

2009-10-05 Thread Tyler Roscoe
On Mon, Oct 05, 2009 at 11:06:19PM +0200, motes motes wrote:
> In a make file I have:
> 
> INCLUDE_DIRECTORIES(${MY_PROJECT}/lib)
> INCLUDE_DIRECTORIES(${MY_PROJECT}/lib/CImg-1.21)
> INCLUDE_DIRECTORIES(${MY_PROJECT}/lib/revised)
> INCLUDE_DIRECTORIES(${MY_PROJECT}/lib/revised/io)
> 
> Is it possible to just specify that everything inside
> ${MY_PROJECT}/lib should be included instead of manullay specifying
> each subfolder?

You could loop over the directories on the filesystem at CMake time and
do it that way, but explicit lists of things are a CMake Best Practice
so that CMake can know when your CMakeLists has changed and regenerate
the build files appropriately.

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


[CMake] Include all subfolders and files?

2009-10-05 Thread motes motes
In a make file I have:

INCLUDE_DIRECTORIES(${MY_PROJECT}/lib)
INCLUDE_DIRECTORIES(${MY_PROJECT}/lib/CImg-1.21)
INCLUDE_DIRECTORIES(${MY_PROJECT}/lib/revised)
INCLUDE_DIRECTORIES(${MY_PROJECT}/lib/revised/io)

Is it possible to just specify that everything inside
${MY_PROJECT}/lib should be included instead of manullay specifying
each subfolder?
___
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] rdynamic and fpp flags failing

2009-10-05 Thread Jason Slemons
I have a question that is essentially what Levent Yilmaz(leventyilmaz at 
gmail.com) submitted on 'Thu May 15 22:31:36 EDT 2008'. I found his question on 
the web, its subject is the subject I am using. I am using pgi 9.0.4(which I 
believe is important) and I have a Fortran program called hello.f90(which does 
basically what you would think) and my CMakeLists.txt is just:

project(Hello Fortran)
cmake_minimum_required(VERSION 2.6)
add_executable(hello hello.f90)

and when I do cmake CMakeLists.txt I get two errors;

pgf95-Error-Unknown switch: -fpp
pgf95-Error-Unknown switch: -rdynamic

actually he only gets the second error. I am using cmake/2.8.0-rc2. I've 
attached the CMakeError.log. How can I get Cmake to suppress these two flags? 
Strange enough this works under cmake 2.6.4(meaning these two flags are not 
used).

-Jason Slemons


CMakeError.log
Description: CMakeError.log
___
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] Cannot create shared lib under Windows, the error message is unreadable

2009-10-05 Thread Bill Hoffman

michael kapelko wrote:
I tried to change cmGlobalMSYSGenerator and to use "MinGW Makefiles" in 
MSYS the way you suggested. Nothing helped.


Well, you have hit a hard limit for the command line on windows...  You 
are going to have to break your code down into smaller bits...


One hack I can think of that might work is to use #include to 
consolidate some of the .c files.



BigFile.c

#include "file1.c"
#include "file2.c"

#include "fileN.c"


-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] Cannot create shared lib under Windows, the error message is unreadable

2009-10-05 Thread michael kapelko
I tried to change cmGlobalMSYSGenerator and to use "MinGW Makefiles" in 
MSYS the way you suggested. Nothing helped.

___
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] making to compile regardless of compile errors?

2009-10-05 Thread Bill Lorensen
Pick your favorite...

make -i
  -i, --ignore-errors
Ignore all errors in commands executed to remake files.

make -k
  -k, --keep-going
Continue  as  much as  possible after an error.  While the target
that failed, and those that depend on it, cannot  be  remade,  the
other dependencies of these targets can be processed all the same.


On Mon, Oct 5, 2009 at 12:57 PM, Hendrik Sattler
 wrote:
> Am Montag 05 Oktober 2009 17:31:54 schrieb Yong Choo:
>> We are in process of porting s/w and We are trying to assess the # of
>> compilation errors that we will be encountering.
>>
>> The problem is that the way our cmake build env is setup, the build
>> stops at the first encounter with an error.
>> We would like to 'keep going' regardless of compiler detects errors or not.
>> This way we can plan the resources that we need to setup (by tabulating
>> the errors).
>
> make -k
>
> (actually the default on emacs' compile command ;) )
>
> HS
> ___
> 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] making to compile regardless of compile errors?

2009-10-05 Thread Hendrik Sattler
Am Montag 05 Oktober 2009 17:31:54 schrieb Yong Choo:
> We are in process of porting s/w and We are trying to assess the # of
> compilation errors that we will be encountering.
> 
> The problem is that the way our cmake build env is setup, the build
> stops at the first encounter with an error.
> We would like to 'keep going' regardless of compiler detects errors or not.
> This way we can plan the resources that we need to setup (by tabulating
> the errors).

make -k

(actually the default on emacs' compile command ;) )

HS
___
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] making to compile regardless of compile errors?

2009-10-05 Thread Bill Hoffman

Yong Choo wrote:
We are in process of porting s/w and We are trying to assess the # of 
compilation errors that we will be encountering.


The problem is that the way our cmake build env is setup, the build 
stops at the first encounter with an error.

We would like to 'keep going' regardless of compiler detects errors or not.
This way we can plan the resources that we need to setup (by tabulating 
the errors).


Any help would be appreciated.



make -i

-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] making to compile regardless of compile errors?

2009-10-05 Thread Yong Choo
We are in process of porting s/w and We are trying to assess the # of 
compilation errors that we will be encountering.


The problem is that the way our cmake build env is setup, the build 
stops at the first encounter with an error.

We would like to 'keep going' regardless of compiler detects errors or not.
This way we can plan the resources that we need to setup (by tabulating 
the errors).


Any help would be appreciated.

Thank,
-Yong Choo
___
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] Cannot create shared lib under Windows, the error message is unreadable

2009-10-05 Thread Bill Hoffman

michael kapelko wrote:
I've tried "Unix Makefiles", "MSYS Makefiles". Both produced "Bad 
argument number" error during linkage.
I cannot use "MinGW Makefiles" within MSYS, because CMake complains, 
that MinGW's make won't work when sh.exe is in the PATH. When I remove 
sh.exe from the PATH, not a single command works in MSYS any more:


r...@winsuxx-f3290c7 /c/build/lf2
$ cmake-gui
sh: fork: No such file or directory


You need to run cmake-gui from a dos shell for MinGW to work.


I cannot modify CMake, because I want an end user to be able to build 
app without any trouble.


I realize that, but if it does work for you, I could push the changes up 
stream.
I also thought about modifying build script to produce large object 
files from all sources in directories. Thus making the final linkage 
deal with a little number of object files. Can you point me to some docs 
on that?
No, there is not a way to do that.  You can have to shared libraries, 
and have one link to the other one.


-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] Cannot create shared lib under Windows, the error message is unreadable

2009-10-05 Thread michael kapelko
I've tried "Unix Makefiles", "MSYS Makefiles". Both produced "Bad 
argument number" error during linkage.
I cannot use "MinGW Makefiles" within MSYS, because CMake complains, 
that MinGW's make won't work when sh.exe is in the PATH. When I remove 
sh.exe from the PATH, not a single command works in MSYS any more:


r...@winsuxx-f3290c7 /c/build/lf2
$ cmake-gui
sh: fork: No such file or directory

I cannot modify CMake, because I want an end user to be able to build 
app without any trouble.


I also thought about modifying build script to produce large object 
files from all sources in directories. Thus making the final linkage 
deal with a little number of object files. Can you point me to some docs 
on that?

Thanks.
___
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] Extra blank lines with SEND_ERROR and FATAL_ERROR ?!

2009-10-05 Thread Marcel Loose
Hi all,

When using SEND_ERROR and FATAL_ERROR, extra blank lines are added
between newline-separated strings. I don't really like this. Is it
intentional, or is this a formatting bug?

For example, the CMakeLists.txt file:

cmake_minimum_required(VERSION 2.6)
project(Dummy NONE)
message(STATUS  "Line one\nLine two\nLine three")
message(SEND_ERROR  "Line one\nLine two\nLine three")
message(FATAL_ERROR "Line one\nLine two\nLine three")

produces the following output on console:

-- Line one
Line two
Line three
CMake Error at CMakeLists.txt:4 (message):
  Line one

  Line two

  Line three


CMake Error at CMakeLists.txt:5 (message):
  Line one

  Line two

  Line three


-- Configuring incomplete, errors occurred!

As can be seen, SEND_ERROR and FATAL_ERROR add extra blank lines.

Best regards,
Marcel Loose.


___
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