[CMake] Problem with 'mpi.mod.stamp' fake file

2007-12-06 Thread Baptiste Derongs
Hello all,

Sometines cmake needs to create a fake mpi.mod.stamp file cause it's
required by some binaries. It works well in a single directory, but I
encouter a problem in a source tree.

Here is my source tree :

Root
- Folder1.1
-- Some subfolders
- Folder1.2
-- Folder 1.2.1
--- My library
-- Folder 1.2.2

So the problem appends when I try to ADD_LIBRARY the library in Folder
1.2.1. I run this command in the Folder1.2.1/CMakeLists.txt. Cmake
creates an mpi.mod.stamp file in the Folder1.2.1 of binary tree, but
Makefile is still looking for it.
The solution I found is to create a new fake mpi.mod.stamp file in the
Root directory and now build works.
Perhaps the file needs to be created where we tell that the project is
in Fortran. I did that in the root CMakeLists.txt, by PROJECT(Name
Fortran C)

My system is Linux, and the library is in Fortran90.

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


Re: [CMake] Creating a visual studio project with non .cpp or .h files in it.

2007-12-06 Thread Bill Hoffman

Josef Karthauser wrote:

It would be useful if there was a standard way of doing this within
CMake; maybe there is in 2.6?

Anyway, I boiled your ideas down into a single 'ADD_DOCUMENTATION()'
command - see attached patch to 2.4.7.  It should probably be called
ADD_AUX_FILE() or something though, as we also use it to add external
foo.cmake files to the visual project files for ease of editing within
the Visual Studio environment.



Actually, I would think that the right way to do this would be to allow 
for custom targets to have sources.  I don't think we need a whole new 
command for this.


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


RE: [CMake] Windows ifort problems, possible bug

2007-12-06 Thread Alin M Elena
Hi Bill,

I have checked the stuff. Everything is ok. Now I can build a nmake project
without any touch.exe.

Alin




I have changed cmake to no longer use touch for this.  A fixed version 
can be found here:

http://www.cmake.org/files/vCVS/cmake-2.5.20071205-win32-x86.exe


If you have the time,  I would appreciate it if you could test it in a 
shell that does not have touch and verify that it works for you.  Thanks.

-Bill


...if the universities will not study useless subjects, who will?
   G. F. Fitzgerald, Nature, 45/46, 392 (1892)
__
Mr. Alin M. ELENA
Atomistic Simulation Centre
School of Mathematics and Physics
Queen's University Belfast
Office: +44 (0)28 9097 1428
Fax: +44 (0)28 9097 5359
http://titus.phy.qub.ac.uk/group/Alin/
[EMAIL PROTECTED]
[EMAIL PROTECTED]
__


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


RE: [CMake] Creating a visual studio project with non .cpp or .h files in it.

2007-12-06 Thread Josef Karthauser
 -Original Message-
 From: Bill Hoffman [mailto:[EMAIL PROTECTED]
 Sent: 06 December 2007 13:23
 To: Josef Karthauser
 Cc: Sylvain Benner; CMake ML
 Subject: Re: [CMake] Creating a visual studio project with non .cpp or
 .h files in it.
 
 Josef Karthauser wrote:
  It would be useful if there was a standard way of doing this within
  CMake; maybe there is in 2.6?
 
  Anyway, I boiled your ideas down into a single 'ADD_DOCUMENTATION()'
  command - see attached patch to 2.4.7.  It should probably be called
  ADD_AUX_FILE() or something though, as we also use it to add
external
  foo.cmake files to the visual project files for ease of editing
 within
  the Visual Studio environment.
 
 
 Actually, I would think that the right way to do this would be to
allow
 for custom targets to have sources.  I don't think we need a whole new
 command for this.

That's essentially the approach that Sylvain took by making their own
alternative CUSTOM_TARGET command.

I didn't want too much addition stuff, and so just added the simplest
thing I could think of.  At some point we'll move up to 2.6, and I want
our local changes to be obvious.

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


Re: [CMake] CMake cannot build a simple example on one of our computers

2007-12-06 Thread Marcus



 Can you suggest any further experiments?
 Do you have any idea what the problem could be?


Can you try this:

edit cmCoreTryCompile.cxx  around line 216 and add the // ADD line:

fprintf(fout,  ${COMPILE_DEFINITIONS}\)\n);
fprintf(fout, INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES})\n);
fprintf(fout, SET(CMAKE_SUPPRESS_REGENERATION 1)\n); // *** ADD
fprintf(fout, LINK_DIRECTORIES(${LINK_DIRECTORIES})\n);



It works!  Now it correctly configures and generates the Visual Studio 
Solution.


It is working for our main project as well as the example.

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


[CMake] Create a Space delimited List

2007-12-06 Thread Mike Jackson

File this under Humor/Help

How would I go about creating a space delimited list? Currently I  
have something like this:


IF (QT_USE_QTNETWORK)
  SET (OS_X_DEP_QT_LIBS ${OS_X_DEP_QT_LIBS} QtNetwork )
ENDIF (QT_USE_QTNETWORK)

IF (NOT QT_DONT_USE_QTCORE)
  SET (OS_X_DEP_QT_LIBS ${OS_X_DEP_QT_LIBS} QtCore )
ENDIF (NOT QT_DONT_USE_QTCORE)

But the resulting list is semi-colon separated. This is being fed  
into a shell script so I would like it to be space delimited instead.


 Wait a minute.. let me try my handy dandy QtAssistant based  
CMake help that I created last week...


Type in Replace in the Search field.. hit Return.. Ah 2  
possibilities.. Click the first...


DING.. I have my answer..

Thanks.
--
Mike Jackson
imikejackson  gmail * com

PS. For those wondering.. using my script my current machine (2.16  
GHZ Core Duo, OS X) takes about 20 seconds to generate the  
QtAssistant files and then actually launch QtAssistant. After the  
initial creation you only need to launch QtAssistant with the proper  
arguments.


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


Re: [CMake] cmake 2.4.8 RC 4

2007-12-06 Thread Sean McBride
On 12/5/07 5:13 PM, Bill Hoffman said:

I have a beta release for 2.4.8 ready for cmake.  This will be the last
release of the 2.4.X branch.  The next release will be 2.6.0.  So,
please make sure you test it if you are interested in a 2.4.8.  Send any
issues to me or the cmake list.  Thanks.

Bill,

Two questions about CMake 2.4.x and Mac OS X:
 a) In the last few weeks you have fixed several 10.5-related issues.
Are these included in 2.4.8?
 b) Bug 4605 is fixed in 2.5, is it in 2.4.8?  If not, VTK with Java
wrappings cannot be built on any Intel Mac.

Obviously I'd really like to see these in the 2.4 branch. :)

Thanks,

--

Sean McBride, B. Eng [EMAIL PROTECTED]
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada

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


Re: [CMake] cmake 2.4.8 RC 4

2007-12-06 Thread Bill Hoffman

Sean McBride wrote:

On 12/5/07 5:13 PM, Bill Hoffman said:

I have a beta release for 2.4.8 ready for cmake.  This will be the last 
release of the 2.4.X branch.  The next release will be 2.6.0.  So, 
please make sure you test it if you are interested in a 2.4.8.  Send any 
issues to me or the cmake list.  Thanks.


Bill,

Two questions about CMake 2.4.x and Mac OS X:
 a) In the last few weeks you have fixed several 10.5-related issues. 
Are these included in 2.4.8?

 b) Bug 4605 is fixed in 2.5, is it in 2.4.8?  If not, VTK with Java
wrappings cannot be built on any Intel Mac.

If it was not in the list of things in the change log I sent, it is not 
on the branch.  If you have a specific fixes that you want on the branch 
send them to me.  No features please only bugs and regressions on 
earlier 2.4.x releases.  I will put the 4605 fix on the branch today for 
RC 5.


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


Re: [CMake] cmake 2.4.8 RC 4

2007-12-06 Thread Mike Jackson
What would we have to do to get the OS X 10.5 fixes in the 2.4.8  
branch? More and more users are switching to Leopard and having a  
working cmake under 10.5 is extremely important, not to mention good  
PR when you release CMake as Leopard Ready.


--
Mike Jackson   Senior Research Engineer
Innovative Management  Technology Services


On Dec 6, 2007, at 2:12 PM, Bill Hoffman wrote:


Sean McBride wrote:

On 12/5/07 5:13 PM, Bill Hoffman said:
I have a beta release for 2.4.8 ready for cmake.  This will be  
the last release of the 2.4.X branch.  The next release will be  
2.6.0.  So, please make sure you test it if you are interested in  
a 2.4.8.  Send any issues to me or the cmake list.  Thanks.

Bill,
Two questions about CMake 2.4.x and Mac OS X:
 a) In the last few weeks you have fixed several 10.5-related  
issues. Are these included in 2.4.8?

 b) Bug 4605 is fixed in 2.5, is it in 2.4.8?  If not, VTK with Java
wrappings cannot be built on any Intel Mac.
If it was not in the list of things in the change log I sent, it is  
not on the branch.  If you have a specific fixes that you want on  
the branch send them to me.  No features please only bugs and  
regressions on earlier 2.4.x releases.  I will put the 4605 fix on  
the branch today for RC 5.


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


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


Re: [CMake] cmake 2.4.8 RC 4

2007-12-06 Thread Bill Hoffman

Mike Jackson wrote:
What would we have to do to get the OS X 10.5 fixes in the 2.4.8 branch? 
More and more users are switching to Leopard and having a working cmake 
under 10.5 is extremely important, not to mention good PR when you 
release CMake as Leopard Ready.




I don't remember the list of things that were done, do you have a list?

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


Re: [CMake] cmake 2.4.8 RC 4

2007-12-06 Thread Sean McBride
On 12/6/07 2:31 PM, Bill Hoffman said:

 What would we have to do to get the OS X 10.5 fixes in the 2.4.8 branch?
 More and more users are switching to Leopard and having a working cmake
 under 10.5 is extremely important, not to mention good PR when you
 release CMake as Leopard Ready.

I don't remember the list of things that were done, do you have a list?

I'm afraid not. :(  IIRC, most of the issues we worked out in an email
discussion between Bill, Eric, and myself.  We were not diligent about
filing bugs for each issue.

Eric, do you remember any details?

Anyone have time to see if 2.4.8 can bootstrap itself?  2.5 was not able
to a few weeks ago, but can now.

BTW Bill, thanks for agreeing to move the 4605 fix into 2.4.8.

--

Sean McBride, B. Eng [EMAIL PROTECTED]
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada

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


Re: [CMake] cmake 2.4.8 RC 4

2007-12-06 Thread Bill Hoffman

Bill Hoffman wrote:

Mike Jackson wrote:
What would we have to do to get the OS X 10.5 fixes in the 2.4.8 
branch? More and more users are switching to Leopard and having a 
working cmake under 10.5 is extremely important, not to mention good 
PR when you release CMake as Leopard Ready.




I don't remember the list of things that were done, do you have a list?



I think most of the stuff comes from the Darwin.cmake file.  Can you try 
moving the Darwin.cmake file from CVS cmake to 2.4.8 and see if it works 
for you?  If so, it would be easy to do that on the branch.


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


Re: [CMake] function and raise_scope commands

2007-12-06 Thread Miguel A. Figueroa-Villanueva
On Dec 3, 2007 3:07 PM, Ken Martin wrote:
 I checked into CVS two new commands; function and raise_scope (well three
 commands if you count endfunction)

First of all: THANKS!! Great feature to have!

Now, I have been using it and exploring its functionality and have
come across to things, which I'm not sure that are bugs or simply part
of how it works.

1. CMake crashes if I use the same variable name as the argument and
raise the scope later. That is, for the following function:

function(track_find_variable cache_variable is_changed)
  raise_scope(${is_changed})
endfunction(track_find_variable)

I can't call it like:

track_find_variable(testvar is_changed) # I had to mangle is_changed
above, but that's ok

I think it shouldn't crash. If its too much effort to have cmake
support this, then I don't think it is worth it... just having a note
that the argument can't be used as a variable name in the help and
maybe try to detect the case and signal an error...

2. Given the new scope contexts, when I call the following function:

function(tester)
  message(STATUS ${CMAKE_CURRENT_LIST_FILE})
endfunction(tester)

tester() prints what it should:
D:/builds/temp/testLatexModule/CMakeLists.txt

However, if I put it in a cmake_utils.cmake file and call include(cmake_utils):

tester() prints garbage... somehow it gets corrupted. For example, in
one run it printed:

CMAKE_RC_COMPILER FLAGS  /foOBJECT SOURCE

I would have thought that, since the function inherits the current
scope that this shouldn't happen...

Any insight into these problems will be greatly appreciated, but again
I think this is a great feature and for the regular use cases it seems
to be working great!

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


Re: [CMake] cmake 2.4.8 RC 4

2007-12-06 Thread Mike Jackson
OK. This is on OS X 10.5.1 with the Xcode 3.0 tools running on a
MacBook Pro (Core Duo). I was able to pull down the cmake 2.4.8rc4
sources, and do a
./configure
make
make test
100% tests passed, 0 tests failed out of 69

So at least from that perspective things seem OK.. Is there anything
that anyone wants me to send from my system?

Mike

On Dec 6, 2007 2:28 PM, Mike Jackson [EMAIL PROTECTED] wrote:
 What would we have to do to get the OS X 10.5 fixes in the 2.4.8
 branch? More and more users are switching to Leopard and having a
 working cmake under 10.5 is extremely important, not to mention good
 PR when you release CMake as Leopard Ready.

 --
 Mike Jackson   Senior Research Engineer
 Innovative Management  Technology Services


 On Dec 6, 2007, at 2:12 PM, Bill Hoffman wrote:

  Sean McBride wrote:
  On 12/5/07 5:13 PM, Bill Hoffman said:
  I have a beta release for 2.4.8 ready for cmake.  This will be
  the last release of the 2.4.X branch.  The next release will be
  2.6.0.  So, please make sure you test it if you are interested in
  a 2.4.8.  Send any issues to me or the cmake list.  Thanks.
  Bill,
  Two questions about CMake 2.4.x and Mac OS X:
   a) In the last few weeks you have fixed several 10.5-related
  issues. Are these included in 2.4.8?
   b) Bug 4605 is fixed in 2.5, is it in 2.4.8?  If not, VTK with Java
  wrappings cannot be built on any Intel Mac.
  If it was not in the list of things in the change log I sent, it is
  not on the branch.  If you have a specific fixes that you want on
  the branch send them to me.  No features please only bugs and
  regressions on earlier 2.4.x releases.  I will put the 4605 fix on
  the branch today for RC 5.
 
  -Bill
  ___
  CMake mailing list
  CMake@cmake.org
  http://www.cmake.org/mailman/listinfo/cmake





-- 
Mike Jackson
imikejackson _at_ gee-mail dot com
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] library name selection based on build target

2007-12-06 Thread Theodore Omtzigt
I am using a library naming convention that shows which type of run-time it
selects on windows. Specifically, a debug target would get a version name
like systemc-v2.2.0-mdd.lib, and a release target would be
systemc-v2.2.0-mdr.lib, to disambiguate multi-threaded, DLL, Debug/Release
versions.

 

Now, of course, I have the problem that I need to build a library name based
on the build target. I am trying to do this via a SYSTEMCConfig.cmake file,
but can't find a mechanism that runs at compile time to select the right
library name. 

 

How is this typically done?

 

Theo

 

 

 

 

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

Re: [CMake] Generating makefile from Visual Studio Project (Migrating to Eclipse)

2007-12-06 Thread Olumide
The command prompt can be found from your start menu: Start Menu - All 
Programs - Microsoft Visual Studio 2005 - Visual Studio Tools - 
Visual Studio 2005 Command Prompt.


This will give you a regular windows command prompt with all environment 
variables set up in order for you to be able to run the command-line 
studio tools (cl, nmake, vcbuild, etc.)


Thanks.


I've started the visual studio (.NET 2003) command prompt as you 
described and typed the commands


cmake -GUnix Makefiles C:\Work\Demo\TestTexturePlugin
cmake -GNMake Makefiles C:\Work\Demo\TestTexturePlugin

in it, but I still got the errors:

CMake Error: CMake was unable to find a build program corresponding to 
Unix Makefiles.  CMAKE_MAKE_PROGRAM is not set.  You probably need to 
select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly. Missing variable is:

CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly. Missing variable is:

CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:C:/Program Files/Common 
Files/System/Mapi/1033/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly.Missing variable is:

CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly.Missing variable is:

CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:C:/Program Files/Common 
Files/System/Mapi/1033/CMakeFiles/CMakeCXXCompiler.cmake

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring done


and


CMake Error: CMake was unable to find a build program corresponding to 
NMake Makefiles.  CMAKE_MAKE_PROGRAM is not set.  You probably need to s

elect a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly. Missing variable is:

CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly. Missing variable is:

CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:C:/Program Files/Common 
Files/System/Mapi/1033/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly. Missing variable is:

CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly. Missing variable is:

CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:C:/Program Files/Common 
Files/System/Mapi/1033/CMakeFiles/CMakeCXXCompiler.cmake

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring done

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


Re: [CMake] FindwxWidgets and wxpng

2007-12-06 Thread James Bigler

James Bigler wrote:

In windows it looks for the library path by looking for the wxpng library:

  FIND_PATH(wxWidgets_LIB_DIR
NAMES wxpng.lib wxpngd.lib
PATHS
${WX_ROOT_DIR}/lib/vc_lib   # prefer static
${WX_ROOT_DIR}/lib/vc_dll
DOC Path to wxWidgets libraries?
NO_DEFAULT_PATH
)

There's nothing in the documentation that states I have to have compiled 
wxpng for this to work.  It seems like it should be using at least one 
of the libraries that I asked it to look for (which didn't include 
wxpng), such as base or core or mono.


I'm using cmake 2.4.7 on win XP with wxWidgets 2.8.7.


In addition, it looks like I have to have these libraries:

  #useful common wx libs needed by almost all components
   SET(wxWidgets_COMMON_LIBRARIES  png tiff jpeg zlib regex expat)

So, if I didn't ask for them, whey are they required?

# Always add the common required libs.
LIST(APPEND wxWidgets_USE_LIBS ${wxWidgets_COMMON_LIBRARIES} )

The unix version doesn't require these libraries, so why does the 
windows one require them?


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


Re: [CMake] Generating makefile from Visual Studio Project (Migrating to Eclipse)

2007-12-06 Thread Bill Hoffman

Olumide wrote:
The command prompt can be found from your start menu: Start Menu - 
All Programs - Microsoft Visual Studio 2005 - Visual Studio Tools - 
Visual Studio 2005 Command Prompt.


This will give you a regular windows command prompt with all 
environment variables set up in order for you to be able to run the 
command-line studio tools (cl, nmake, vcbuild, etc.)


Thanks.


I've started the visual studio (.NET 2003) command prompt as you 
described and typed the commands


cmake -GUnix Makefiles C:\Work\Demo\TestTexturePlugin
cmake -GNMake Makefiles C:\Work\Demo\TestTexturePlugin

in it, but I still got the errors:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:C:/Program Files/Common 
Files/System/Mapi/1033/CMakeFiles/CMakeCXXCompiler.cmake

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring done



Bad compiler installation?   Can you run nmake and cl from that prompt?

-Bill

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


Re: [CMake] Generating makefile from Visual Studio Project (Migrating to Eclipse)

2007-12-06 Thread Olumide

Bill Hoffman wrote:
I've started the visual studio (.NET 2003) command prompt as you 
described and typed the commands


cmake -GUnix Makefiles C:\Work\Demo\TestTexturePlugin
cmake -GNMake Makefiles C:\Work\Demo\TestTexturePlugin

in it, but I still got the errors:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:C:/Program Files/Common 
Files/System/Mapi/1033/CMakeFiles/CMakeCXXCompiler.cmake

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring done



Bad compiler installation?   Can you run nmake and cl from that prompt?


nmake and cl work from that prompt.

C:\Program Files\Common Files\System\MAPI\1033nmake

Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.

-

C:\Program Files\Common Files\System\MAPI\1033cl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]


PS: the di C:\Program Files\Common Files\System\Mapi\1033\CMakeFiles 
exists but it contains only the file cmake.check_cache

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


Re: [CMake] FindwxWidgets and wxpng

2007-12-06 Thread Miguel A. Figueroa-Villanueva
On Dec 6, 2007 6:05 PM, James Bigler  wrote:
 James Bigler wrote:
  In windows it looks for the library path by looking for the wxpng library:
 
FIND_PATH(wxWidgets_LIB_DIR
  NAMES wxpng.lib wxpngd.lib
  PATHS
  ${WX_ROOT_DIR}/lib/vc_lib   # prefer static
  ${WX_ROOT_DIR}/lib/vc_dll
  DOC Path to wxWidgets libraries?
  NO_DEFAULT_PATH
  )
 
  There's nothing in the documentation that states I have to have compiled
  wxpng for this to work.  It seems like it should be using at least one
  of the libraries that I asked it to look for (which didn't include
  wxpng), such as base or core or mono.
 
  I'm using cmake 2.4.7 on win XP with wxWidgets 2.8.7.

Is the wxpng.lib an optional package? If so, I'll change it...

I had thought about using this, since both monolithic and multilib
versions would have it... What is the best thing to probe for then?
Probably I should put in the base and mono NAMES so that it can figure
it out everytime.

 In addition, it looks like I have to have these libraries:

#useful common wx libs needed by almost all components
 SET(wxWidgets_COMMON_LIBRARIES  png tiff jpeg zlib regex expat)

 So, if I didn't ask for them, whey are they required?

  # Always add the common required libs.
  LIST(APPEND wxWidgets_USE_LIBS ${wxWidgets_COMMON_LIBRARIES} )

 The unix version doesn't require these libraries, so why does the
 windows one require them?

The unix version uses wx-config. It is much easier to do things
through wx-config, because wx-config knows how wxWidgets was
configured. However, the windows version is not so fortunate... I find
it has a terrible distribution system. As I have said before,
wxWidgets should use CMake for their build system manager ;)

That said, what is being done is that if it is built we add it to
wxWidgets_LIBRARIES if not.. it will not fail to find wxWidgets. We
could provide some sort of wxWidgets_NO_LINK_COMMON_LIBS or
something... is this really necessary?

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


Re: [CMake] Generating makefile from Visual Studio Project (Migrating to Eclipse)

2007-12-06 Thread Bill Hoffman

Olumide wrote:
CMake Error: Could not find cmake module file:C:/Program Files/Common 
Files/System/Mapi/1033/CMakeFiles/CMakeCXXCompiler.cmake

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring done



Are you running in this directory:
C:/Program Files/Common Files/System/Mapi/1033?

Can you give the version of cmake and exact commands you are running? 
Can you create a very simple project?


Try this:

1. mkdir test
2. cd test
3. create a CMakeLists.txt in test with the following in it:
add_executable(foo foo.cxx)

4. mkdir b
5 cd b
6. cmake -GNMake Makefiles ..

Do this all from the visual studio command shell.

-Bill





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


Re: [CMake] FindwxWidgets and wxpng

2007-12-06 Thread James Bigler

Miguel A. Figueroa-Villanueva wrote:

On Dec 6, 2007 6:05 PM, James Bigler  wrote:

James Bigler wrote:

In windows it looks for the library path by looking for the wxpng library:

  FIND_PATH(wxWidgets_LIB_DIR
NAMES wxpng.lib wxpngd.lib
PATHS
${WX_ROOT_DIR}/lib/vc_lib   # prefer static
${WX_ROOT_DIR}/lib/vc_dll
DOC Path to wxWidgets libraries?
NO_DEFAULT_PATH
)

There's nothing in the documentation that states I have to have compiled
wxpng for this to work.  It seems like it should be using at least one
of the libraries that I asked it to look for (which didn't include
wxpng), such as base or core or mono.

I'm using cmake 2.4.7 on win XP with wxWidgets 2.8.7.


Is the wxpng.lib an optional package? If so, I'll change it...


I certainly don't link against it to open simple applications.


I had thought about using this, since both monolithic and multilib
versions would have it... What is the best thing to probe for then?
Probably I should put in the base and mono NAMES so that it can figure
it out everytime.


That seems like a good idea.


In addition, it looks like I have to have these libraries:

   #useful common wx libs needed by almost all components
SET(wxWidgets_COMMON_LIBRARIES  png tiff jpeg zlib regex expat)

So, if I didn't ask for them, whey are they required?

 # Always add the common required libs.
 LIST(APPEND wxWidgets_USE_LIBS ${wxWidgets_COMMON_LIBRARIES} )

The unix version doesn't require these libraries, so why does the
windows one require them?


The unix version uses wx-config. It is much easier to do things
through wx-config, because wx-config knows how wxWidgets was
configured. However, the windows version is not so fortunate... I find
it has a terrible distribution system. As I have said before,
wxWidgets should use CMake for their build system manager ;)

That said, what is being done is that if it is built we add it to
wxWidgets_LIBRARIES if not.. it will not fail to find wxWidgets. We
could provide some sort of wxWidgets_NO_LINK_COMMON_LIBS or
something... is this really necessary?


I don't know the common libraries were required libraries (they 
probably are).  I guess these libraries are required or not depending on 
how you configured wxWidgets from setup.h.


I guess a good question for the wxWidgets mailing list would be to know 
if you really need those libraries or not.  If it's dependent on the 
value in the macro, then it might be feasible to pull the information 
from setup.h by either parsing the file directly, or by a TRY_COMPILE 
with a tailored executable that could spit out information on which 
features are available.


That's a little extreme, though.  I good middle ground would be simply 
telling the user which required wx libraries weren't found.


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


Re: [CMake] Generating makefile from Visual Studio Project (Migrating to Eclipse)

2007-12-06 Thread Bill Hoffman

Olumide wrote:

Bill Hoffman wrote:

Are you running in this directory:
C:/Program Files/Common Files/System/Mapi/1033?


I'm running the tests you've asked me to in this directory. My projects 
are in another directory.


Can you give the version of cmake and exact commands you are running? 


I have cmake version 2.4-patch 7. So far, I've only tried running cmake 
-GNMake Makefiles and cmake -GUnix Makefiles in my visual studio 
project directory.



Can you create a very simple project?
[...]
6. cmake -GNMake Makefiles ..


Success finally -- or is it?
\

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp 
.hxx .in .txx

-- Configuring done

That is success. You would of course need to create a foo.cxx file to be 
compiled.  But the compiler detection worked fine.  I would recommend 
starting from an empty build tree.


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


Re: [CMake] Generating makefile from Visual Studio Project (Migrating to Eclipse)

2007-12-06 Thread Olumide

Bill Hoffman wrote:
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm 
.hpp .hxx .in .txx

-- Configuring done

That is success. You would of course need to create a foo.cxx file to be 
compiled.  But the compiler detection worked fine.  I would recommend 
starting from an empty build tree.


I've run cmake on my project's CMakeLists.txt file (generated from my 
visual studio project by Jesper's script) as follows:


C:\Work\Demo\TestTexturePlugin\CMakeLists.txt
C:\Program Files\Common Files\System\MAPI\1033cmake -GNMake Makefiles 
C:\Work\Demo\TestTexturePlugin\CMakeLists.txt


Result:
-- Check for CL compiler version
-- Check for CL compiler version - 1310
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - no
-- Check CL platform
-- Check CL platform - 32 bit
-- Check for working C compiler: C:/Program Files/Microsoft Visual 
Studio .NET 2003/Vc7/bin/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual 
Studio .NET 2003/Vc7/bin/cl.exe -- works

-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual 
Studio .NET 2003/Vc7/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual 
Studio .NET 2003/Vc7/bin/cl.exe -- works

-- Configuring done
-- Generating done
-- Build files have been written to: C:/Work/Demo/TestTexturePlugin

The directory C:\Work\Demo\TestTexturePlugin\CMakeFiles now contains, 
among other files, Makefile2, which I assume is the NMake Makefile, and 
Makefile.cmake. Where can I find more information about these files. I'm 
not sure which files I need to perform the migration to eclipse.


Oddly, running cmake on my project directory fails i.e.:
C:\Program Files\Common Files\System\MAPI\1033cmake -GNMake Makefiles 
C:\Work\Demo\TestTexturePlugin


produces the familiar list of errors.

- Olumide

PS: my understanding of what a build tree is; from: 
http://ecos.sourceware.org/docs-2.0/user-guide/build-tree.html
Build tree: the directory hierarchy in which all generated files are 
placed ...


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


Re: [CMake] Generating makefile from Visual Studio Project (Migrating to Eclipse)

2007-12-06 Thread Olumide

Bill Hoffman wrote:

Are you running in this directory:
C:/Program Files/Common Files/System/Mapi/1033?


I'm running the tests you've asked me to in this directory. My projects 
are in another directory.


Can you give the version of cmake and exact commands you are running? 


I have cmake version 2.4-patch 7. So far, I've only tried running cmake 
-GNMake Makefiles and cmake -GUnix Makefiles in my visual studio 
project directory.



Can you create a very simple project?
[...]
6. cmake -GNMake Makefiles ..


Success finally -- or is it?

C:\Program Files\Common Files\System\Mapi\1033\test\bcmake -GNMake 
Makefiles ..

-- Check for CL compiler version
-- Check for CL compiler version - 1310
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - no
-- Check CL platform
-- Check CL platform - 32 bit
-- Check for working C compiler: C:/Program Files/Microsoft Visual 
Studio .NET 2003/Vc7/bin/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual 
Studio .NET 2003/Vc7/bin/cl.exe -- works

-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual 
Studio .NET 2003/Vc7/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual 
Studio .NET 2003/Vc7/bin/cl.exe -- works
CMake Error: Cannot find source file C:/Program Files/Common 
Files/System/Mapi/1033/test/foo.cxx for target foo


Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp 
.hxx .in .txx

-- Configuring done


PS: thanks for taking the time to help. I'm very grateful.
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Cross-directory dependencies?

2007-12-06 Thread Bryan O'Sullivan
I have two sibling directories.  In one of them, a binary is built, and
in the other, that binary is packaged up using a custom command.  Is
there a way in the DEPENDS clause to express this dependency?

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


Re: [CMake] cmake, lex yacc

2007-12-06 Thread Gonzalo Garramuño

Timur Ivanov wrote:

Hello!

Sorry if it was discussed already but I can't find anything really
useful for me.

In current project I use lex  yacc and Makefile rules looks like:



cmake currently does not ship with bison and flex modules, 
unfortunately.  Here's a couple of mine.


--- FindFlex.cmake
# - Try to find Flex
# Once done this will define
#
#  FLEX_FOUND - system has Flex
#  FLEX_EXECUTABLE - path of the flex executable
#  FLEX_VERSION - the version string, like 2.5.31
#


FIND_PROGRAM(FLEX_EXECUTABLE NAMES flex flex.exe )

IF(FLEX_EXECUTABLE)
SET(FLEX_FOUND TRUE)

EXECUTE_PROCESS(COMMAND ${FLEX_EXECUTABLE} --version
OUTPUT_VARIABLE _FLEX_VERSION
)
string (REGEX MATCH [0-9]+\\.[0-9]+\\.[0-9]+ FLEX_VERSION 
${_FLEX_VERSION})

ENDIF(FLEX_EXECUTABLE)

IF(FLEX_FOUND)
  IF(NOT Flex_FIND_QUIETLY)
MESSAGE(STATUS Found Flex: ${FLEX_EXECUTABLE})
  ENDIF(NOT Flex_FIND_QUIETLY)
ELSE(FLEX_FOUND)
  IF(Flex_FIND_REQUIRED)
MESSAGE(FATAL_ERROR Could not find Flex)
  ENDIF(Flex_FIND_REQUIRED)
ENDIF(FLEX_FOUND)
---

 FindBison.cmake
# - Try to find Bison
# Once done this will define
#
#  BISON_FOUND - system has Bison
#  BISON_EXECUTABLE - path of the bison executable
#  BISON_VERSION - the version string, like 2.5.31
#

FIND_PROGRAM(BISON_EXECUTABLE NAMES bison bison.exe )

IF(BISON_EXECUTABLE)
SET(BISON_FOUND TRUE)

EXECUTE_PROCESS(COMMAND ${BISON_EXECUTABLE} --version
OUTPUT_VARIABLE _BISON_VERSION
)
string (REGEX MATCH [0-9]+\\.[0-9]+\\.[0-9]+ BISON_VERSION 
${_BISON_VERSION})

ENDIF(BISON_EXECUTABLE)

IF(BISON_FOUND)
  IF(NOT Bison_FIND_QUIETLY)
MESSAGE(STATUS Found Bison: ${BISON_EXECUTABLE})
  ENDIF(NOT Bison_FIND_QUIETLY)
ELSE(BISON_FOUND)
  IF(Bison_FIND_REQUIRED)
MESSAGE(FATAL_ERROR Could not find Bison)
  ENDIF(Bison_FIND_REQUIRED)
ENDIF(BISON_FOUND)
--

--- Sample usage


FIND_PACKAGE( Flex  REQUIRED)
FIND_PACKAGE( Bison REQUIRED)

#
# Create custom command for flex/lex (note the outputs)
#
ADD_CUSTOM_COMMAND(
   SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/grammar.lex
   COMMAND ${FLEX_EXECUTABLE}
   ARGS -o${CMAKE_CURRENT_BINARY_DIR}/lex.yy.c
-Pmrl_yy -8 -CFe ${CMAKE_CURRENT_SOURCE_DIR}/grammar.lex
   TARGET miparser
   OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/lex.yy.c
   )

#
# Create custom commands for bison/yacc (note the DEPENDS)
#
ADD_CUSTOM_COMMAND(
  SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/grammar.y
  COMMAND ${BISON_EXECUTABLE}
  ARGS -l -pmrl_yy  -o${CMAKE_CURRENT_BINARY_DIR}/grammar.tab.cpp
 ${CMAKE_CURRENT_SOURCE_DIR}/grammar.y
  TARGET miparser
  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lex.yy.c
  OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/grammar.tab.cpp
)



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Library dependency

2007-12-06 Thread Anders Backman
Hi all.

I have a question regarding library dependency.
Im using VC2005.


Assume the following:

I have a solution with a set of projects, three are libraries and one is an
application:

A.lib /A.dll

B.lib/B.dll : B depends on A.lib, so if I want to use B.lib somewhere,
A.libis also automatically added as a link dependency. Also
B.lib depends on X.lib which is a library external to the solution.
X.lib is also a X.lib/X.dll


C.lib, depends on B.lib, so in the list of libraries in Additional
Libraries, is now: A.lib, B.lib, X.lib


Application APP depends on C, so the list of libraries is then: A.lib ,
B.lib, X.lib, C.lib


Now if X.lib is a library with the implementation in a dynamic library, one
does not need to link C nor APP against X.lib because it is implicitly
already linked against B.lib


My question is now, is there a way to tell CMake to not include X.lib (which
is needed to build B.lib only) when using B.lib?
Otherwise the list of libraries in Additional LIbraries tends to be pretty
long...

It seems that Cmake always assumes that all libraries including their
dependencies should be used when building.
I realize that there is perhaps no way for CMake to automatically realize
whether a library should be included or not...
But is there a way around this?


-- 



Anders Backman   Email:[EMAIL PROTECTED]
HPC2N/VRlab  Phone:+46 (0)90-786 9936
Umea university  Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
  http://www.cs.umu.se/~andersb
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] cmake, lex yacc

2007-12-06 Thread Gonzalo Garramuño

Gonzalo Garramuño wrote:

Timur Ivanov wrote:

Hello!

Sorry if it was discussed already but I can't find anything really
useful for me.

In current project I use lex  yacc and Makefile rules looks like:



cmake currently does not ship with bison and flex modules, 
unfortunately.  Here's a couple of mine.




Silly me replying to a year old thread...  apologies to all.


--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake