[CMake] cmakesetup.exe

2007-05-17 Thread gga

Okay, first time trying cmake under windows, porting a project from linux.

I'm trying to just create a simple cmake file for vc7.1.

I downloaded the pre-built cmake (cmake 2.4 - patch 6).

When I run CmakeSetup.exe, there's no option to allow me to select what
build to create, as shown in the web docs.  It only seems to know how to
create a build for vc8.  What am I missing?

Also, is there a way to avoid this annoying gui and just use cmake
command-line and have it create an nmake Makefile (or, better yet, a
normal GNU makefile using cl.exe and ld.exe as the toolchain)?


-- 
Gonzalo Garramuño
[EMAIL PROTECTED]

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


Re: [CMake] Module FindTCL behaves differently on Linux and Mac OS X

2007-05-17 Thread Bill Hoffman

Clark J. Wang wrote:

In my Ubuntu Linux box, after INCLUDE(FindTCL) I get the following result:

TCL_INCLUDE_PATH = /usr/include/tcl8.4
TCL_LIBRARY  = /usr/lib/libtcl8.4.so


But in my Mac OS X 10.4 the result is:

TCL_INCLUDE_PATH = /System/Library/Frameworks/Tcl.framework/Headers
TCL_LIBRARY  = /System/Library/Frameworks/tcl.framework

Actaully I want to use `/usr/include/tcl.h' and 
`/usr/lib/libtcl.dylib' in my makefile. So how can I ask FindTCL to do 
that?

You could try this:

set(CMAKE_FIND_FRAMEWORK NEVER)
include(FindTCL)


-Bill

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


Re: [CMake] Module FindTCL behaves differently on Linux and Mac OS X

2007-05-17 Thread Clark J. Wang

On 5/18/07, Alan W. Irwin <[EMAIL PROTECTED]> wrote:


On 2007-05-18 11:00+0800 Clark J. Wang wrote:

> In my Ubuntu Linux box, after INCLUDE(FindTCL) I get the following
result:
>
> TCL_INCLUDE_PATH = /usr/include/tcl8.4
> TCL_LIBRARY  = /usr/lib/libtcl8.4.so
>
>
> But in my Mac OS X 10.4 the result is:
>
> TCL_INCLUDE_PATH = /System/Library/Frameworks/Tcl.framework/Headers
> TCL_LIBRARY  = /System/Library/Frameworks/tcl.framework
>
> Actaully I want to use `/usr/include/tcl.h' and `/usr/lib/libtcl.dylib'
in
> my makefile. So how can I ask FindTCL to do that?

Set the environment variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH
appropriately (see http://www.cmake.org/Wiki/CMake_Useful_Variables).



Seems like the ENV vars does not work:

$ cat CMakeLists.txt
INCLUDE(FindTCL)
MESSAGE("TCL_INCLUDE_PATH = ${TCL_INCLUDE_PATH}")
MESSAGE("TCL_LIBRARY  = ${TCL_LIBRARY}")
$ cmake .
TCL_INCLUDE_PATH = /System/Library/Frameworks/Tcl.framework/Headers
TCL_LIBRARY  = /System/Library/Frameworks/tcl.framework
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/clark/tmp
$ CMAKE_LIBRARY_PATH=/usr/lib CMAKE_INCLUDE_PATH=/usr/include cmake .
TCL_INCLUDE_PATH = /System/Library/Frameworks/Tcl.framework/Headers
TCL_LIBRARY  = /System/Library/Frameworks/tcl.framework
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/clark/tmp
$

And I tried SET(CMAKE_FIND_FRAMEWORK "NEVER") and SET(CMAKE_FIND_APPBUNDLE
"NEVER") before INCLUDE(FindTCL) but it did not work either.

Alan

__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and
Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting
software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

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

Re: [CMake] Module FindTCL behaves differently on Linux and Mac OS X

2007-05-17 Thread Alan W. Irwin

On 2007-05-18 11:00+0800 Clark J. Wang wrote:


In my Ubuntu Linux box, after INCLUDE(FindTCL) I get the following result:

TCL_INCLUDE_PATH = /usr/include/tcl8.4
TCL_LIBRARY  = /usr/lib/libtcl8.4.so


But in my Mac OS X 10.4 the result is:

TCL_INCLUDE_PATH = /System/Library/Frameworks/Tcl.framework/Headers
TCL_LIBRARY  = /System/Library/Frameworks/tcl.framework

Actaully I want to use `/usr/include/tcl.h' and `/usr/lib/libtcl.dylib' in
my makefile. So how can I ask FindTCL to do that?


Set the environment variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH
appropriately (see http://www.cmake.org/Wiki/CMake_Useful_Variables).

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Module FindTCL behaves differently on Linux and Mac OS X

2007-05-17 Thread Clark J. Wang

In my Ubuntu Linux box, after INCLUDE(FindTCL) I get the following result:

TCL_INCLUDE_PATH = /usr/include/tcl8.4
TCL_LIBRARY  = /usr/lib/libtcl8.4.so


But in my Mac OS X 10.4 the result is:

TCL_INCLUDE_PATH = /System/Library/Frameworks/Tcl.framework/Headers
TCL_LIBRARY  = /System/Library/Frameworks/tcl.framework

Actaully I want to use `/usr/include/tcl.h' and `/usr/lib/libtcl.dylib' in
my makefile. So how can I ask FindTCL to do that?

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

[CMake] Re: Using ADD_CUSTOM_COMMAND to generate sources...

2007-05-17 Thread Matthew Woehlke

(Ick, top-posting...)

Ken Martin wrote:

Matthew Woehlke wrote:
Ok... so I see that ADD_CUSTOM_COMMAND is silently ignored if no targets 
depend on the OUTPUT. What is strange is that the output is #include'd 
from one of my source files, and I can see from looking at the generated 
CMakeFiles/mytarget.dir/CXX.includecache that cmake /does/ know about 
the dependency. So why do I still have to explicitly tell CMake about 
the dependency? (This occurs even if the file is output to the source 
directory, i.e. the full path matches what is in the CXX.includecache.)


Also, what is the correct way to set up the dependency? I am using:

set_source_files_properties(main.cpp PROPERTIES OBJECT_DEPENDS 
${objects_def})


...but I seem to recall someone saying that this is deprecated?


Well CMake does not /really/ know about the dependency :) Because the
dependency is done through #include in the source code it is not known at
CMake Configure/Generate time. Dependency analysis of source code is done at
build time. For "make" based builds CMake does this during the build process
(because someone has to) and stores the results. The reason this is delayed
until build time is that the generated source code and possibly the
executables that run to generate it have to be generated before we can
inspect them for dependencies etc.


Hmm... ok, I guess that makes sense, but it's unfortunate. It would be 
nicer if CMake (additionally) did dependency analysis of existing 
sources at least to know that the ADD_CUSTOM_COMMAND is actually needed 
instead of silently stripping it.



The typical way to setup dependencies on generated files is by adding them
(the generated files) to the target, for example:

add_library(libname src1.cxx generated1.h generated1.cxx generated2.h
generated3.h) 


Hmm... seems to work. Doesn't seem intuitive, but oh well. Thanks.

--
Matthew
/bin/sh -- still Bourne on Solaris (and still not POSIX compliant)

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


RE: [CMake] Using ADD_CUSTOM_COMMAND to generate sources...

2007-05-17 Thread Ken Martin
Well CMake does not /really/ know about the dependency :) Because the
dependency is done through #include in the source code it is not known at
CMake Configure/Generate time. Dependency analysis of source code is done at
build time. For "make" based builds CMake does this during the build process
(because someone has to) and stores the results. The reason this is delayed
until build time is that the generated source code and possibly the
executables that run to generate it have to be generated before we can
inspect them for dependencies etc.

The typical way to setup dependencies on generated files is by adding them
(the generated files) to the target, for example:

add_library(libname src1.cxx generated1.h generated1.cxx generated2.h
generated3.h) 

Ken


Ken Martin PhD 
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matthew
Woehlke
Sent: Tuesday, May 15, 2007 11:46 AM
To: cmake@cmake.org
Subject: [CMake] Using ADD_CUSTOM_COMMAND to generate sources...

Ok... so I see that ADD_CUSTOM_COMMAND is silently ignored if no targets 
depend on the OUTPUT. What is strange is that the output is #include'd 
from one of my source files, and I can see from looking at the generated 
CMakeFiles/mytarget.dir/CXX.includecache that cmake /does/ know about 
the dependency. So why do I still have to explicitly tell CMake about 
the dependency? (This occurs even if the file is output to the source 
directory, i.e. the full path matches what is in the CXX.includecache.)

Also, what is the correct way to set up the dependency? I am using:

set_source_files_properties(main.cpp PROPERTIES OBJECT_DEPENDS 
${objects_def})

...but I seem to recall someone saying that this is deprecated?

-- 
Matthew
People say I'm going insane. I say, "what do you mean, 'going'?".

___
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] Bug in ADD_LIBRARY (again?)

2007-05-17 Thread Ken Martin
The fix to ADD_LIBRARY is in CVS and has not been put into a patch yet.  It
should make it into 2.4.7.

Ken

Ken Martin PhD 
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Guilherme Balena Versiani
Sent: Thursday, May 17, 2007 11:28 AM
To: cmake@cmake.org
Subject: [CMake] Bug in ADD_LIBRARY (again?)

Hello,

The ADD_LIBRARY does not understand EXCLUDE_FROM_ALL in CMake version 
2.4 patch 6. I found a message from Ken Martin dated from Jan/4/2007 
saying "Yup, I'll check in a fix for it". For which version did this fix 
go? Or, maybe, are there no available fixed release yet?

Regards,

Guilherme Balena Versiani.

___
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


[CMake] submission: updated Modules/FindBoost.cmake

2007-05-17 Thread Bob Kuehne
boost recently updated to 1.34, changing (of course) the default  
installation path. this breaks the FindBoost cmaker, so attached is  
an update that allows 1.34 as released to work.




FindBoost.cmake
Description: Binary data
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] CMake Project With just CMakeLists.txt files

2007-05-17 Thread Shepherd, Steven G CIV
Is there anyway to create a project that contains only the
CMakeLists.txt file without any sources/headers?  We have an external
Plugins directory within our repository which we do not want to combine
with the core programs sources.  

Directory Structure
Plugins_dir -> plugin 1 subdirectory  -> sources & CMakeLists.txt
 -> plugin 2 subdirectory  -> sources &
CMakeLists.txt
 -> plugin 3 subdirectory  -> sources & CMakeLists.txt
 -> plugin etc. subdirectory  -> sources & CMakeLists.txt
 -> CMakeLists.txt  

The CMakeLists.txt within the plugin directory has the following
structure:
SUBDIRS(Plugin 1)
SUBDIRS(Plugin 2)
SUBDIRS(Plugin 3)
SUBDIRS(Plugin etc.)

We would like to include the CMakeLists.txt from the Plugins_dir in a
blank project called "Plugins."  This is so we can add new project
plugins without leaving Visual Studio.  



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

[CMake] Bug in ADD_LIBRARY (again?)

2007-05-17 Thread Guilherme Balena Versiani

Hello,

The ADD_LIBRARY does not understand EXCLUDE_FROM_ALL in CMake version 
2.4 patch 6. I found a message from Ken Martin dated from Jan/4/2007 
saying "Yup, I'll check in a fix for it". For which version did this fix 
go? Or, maybe, are there no available fixed release yet?


Regards,

Guilherme Balena Versiani.

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


Re: [CMake] fortran, modules and case

2007-05-17 Thread Brad King
Alan W. Irwin wrote:
> I should also mention that for the simple example I attached to the
> previous
> e-mail the gfortran library build does produce a valid module file called
> hello_module.mod.
> 
> So it appears bug 3984 is just caused by CMake assuming the module file
> name
> is MODULENAME.mod.proxy rather than the correct MODULENAME.mod (where
> MODULENAME is hello_module in the particular case of the simple example I
> gave of bug 3984 in action).
> 
> Does anybody know why cmake appends ".proxy" to the file that it thinks
> will
> satisfy the module dependency?  Perhaps there is a valid reason for
> appending ".proxy" to the real name of the module file, but if that is so
> the CMake developers forgot to take the final step of associating the
> MODULENAME.mod.proxy name with the actual real name of the module file
> produced by fortran compilers.

Years ago I designed a makefile layout that handled everything
correctly.  I had it mostly working in cmLocalMakefileGenerator2 which
was an unreleased intermediate development makefile generator that
preceded cmLocalMakefileGenerator3 (the current makefile generator).
When the implementation was converted to the newer makefile generator by
another developer it was not done quite right and I've never had time to
go back and fix it.

The basic problem for building fortran9x code that uses modules with a
makefile system is that some sources have to be brought up to date
before a make tool even considers the dependencies of other sources.  It
actually requires recursive make calls.  IIRC, the .proxy target is not
meant to ever be a file but just a symbolic make target.  The idea is to
say "I need whomever provides this module to be brought up to date
before make even looks at me" by depending on the .proxy name of the
module.  Any source that provides a module creates a dependency from the
.proxy name to itself.  All these symbolic targets are evaluated to
choose in what order to run make processes to evaluated file-level
dependencies for the actual sources and object files.

The other problem is that the preprocessor must be run in order to check
module-level dependencies since #ifdef can be used to decide whether to
use a module.  Technically this should be done for C and C++ too, but it
would make dependency scanning far slower.  If a few #include lines are
included in the dependency check when they shouldn't in C/C++ it just
adds an extra dependency that doesn't really hurt.  The problem for
Fortran is that the extra dependency can actually break the build.

I'll be glad to help anyone interested in trying to fix any of this get
started.

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


Re: [CMake] Re: Finding libraries under Windows

2007-05-17 Thread Bill Hoffman

Leon Moctezuma wrote:

Thanks Brandon and Mike

I did something similar to Mike's code adn this wiki page[1 
].
I could see different things in Chiken, that helped me to understand 
cmake better.


Here is the script:

IIF(WIN32)
FIND_PATH(FREEGLUT_INCLUDE_DIR GL/freeglut.h ${CMAKE_INCLUDE_PATH} 
$ENV{include} ${OPENGL_INCLUDE_DIR})
FIND_LIBRARY(FREEGLUT_LIBRARY NAMES freeglut_static PATH 
${CMAKE_LIBRARY_PATH} $ENV{lib})

ELSE(WIN32)
FIND_PATH(FREEGLUT_INCLUDE_DIR GL/freeglut.h /usr/include 
/usr/local/include)

FIND_LIBRARY( FREEGLUT_LIBRARY NAMES freeglut glut
  /usr/lib
  /usr/local/lib
)
ENDIF(WIN32)

IF (FREEGLUT_INCLUDE_DIR AND FREEGLUT_LIBRARY)
   SET(FREEGLUT_FOUND TRUE)
ENDIF (FREEGLUT_INCLUDE_DIR AND FREEGLUT_LIBRARY)

IF(NOT FREEGLUT_FOUND)
   IF (FREEGLUT_FIND_REQUIRED)
  MESSAGE(FATAL_ERROR "Could not find FREEGLUT")
   ENDIF (FREEGLUT_FIND_REQUIRED)
ENDIF(NOT FREEGLUT_FOUND)

If you have a better solution, please don't hesitate to post it.

Best Regards.

Leon Moctezuma

You should not need the IF.
This should work:

FIND_PATH(FREEGLUT_INCLUDE_DIR NAMES GL/freeglut.h PATHS ENV include 
${OPENGL_INCLUDE_DIR})
FIND_LIBRARY(FREEGLUT_LIBRARY NAMES freeglut_static freeglut glut PATHS 
ENV lib)


See the documentation for FIND_PATH and FIND_LIBRARY:

http://www.cmake.org/HTML/Documentation.html

(I have been told it is too long...  :-)  )
Most of the other paths you had cmake searches automatically.   Also, 
where is freeglut_static.lib on your machine?

Also, is GL/freeglut.h on your machine, and if so where is it?

-Bill


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


Re: [CMake] Finding libraries under Windows

2007-05-17 Thread Bill Hoffman

Leon Moctezuma wrote:

Hi all.

I'm Leon Moctezuma, a cs student, who is participating in GSoC and 
working on Freepv, we are trying to use cmake
instead of autoconf for the projects building process we have been 
able to create a basic CMakeLists.txt under both

Linux and Windows, It works almost fine.

At this point I'm very frustrated, after spending several days trying 
to find common libraries such as zlib, glut or jpeg
under Windows, I'm stuck in the same point, I have to indicate where 
the libraries are using the cmake GUI.
I've tried to do several things such as adding libraries' paths to lib 
and include windows' environment variables, I also
created CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH environment 
variables and tried to make my own
FindLibrary.cmake script, but nothing seems to work, could some one 
guide me, for an example you could use

zlib... which has zconf.h and zlib.h headers and zlib.dll...

For one thing you need to find zlib.lib, can you give some example cmake 
code that you are using?  When
you use Find_library, you want to look for zlib and CMake will take care 
of the extensions.


-Bill

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


Re: [CMake] how to get compile environment ($host) in cmake

2007-05-17 Thread Clark J. Wang

On 5/17/07, haibin zhang <[EMAIL PROTECTED]> wrote:


thanks
but I see cmake-2.4.6 CMakeLists.txt file :

IF(WIN32)
  IF(NOT UNIX)
IF(NOT BORLAND)
  IF(NOT MINGW )
SET(CMAKE_BUILD_ON_VISUAL_STUDIO 1)
  ENDIF(NOT MINGW )
ENDIF(NOT BORLAND)
  ENDIF(NOT UNIX)
ENDIF(WIN32)

who set this , WIN32 or UNIX or other ?



When running `cmake ' , there will be a file
`/CMakeFiles/CMakeCCompiler.cmake' created.It'll set
variables like UNIX, CYGWIN or MINGW.

regards



*"Clark J. Wang" <[EMAIL PROTECTED]>* 写道:

On 5/17/07, haibin zhang <[EMAIL PROTECTED]> wrote:
>
> Hi all :
>   how to get $host in cmake ?
>
> In autotool , it can use $host to get compile environment, example
> cygwin,i686-pc-mingw32 .


Use CMAKE_SYSTEM

regards
>
>
> --
> Mp3疯狂搜-新歌热歌高速下 
>
> ___
> CMake mailing list
> CMake@cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>


--
抢注雅虎免费邮箱3.5G容量,20M附件! 


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

[CMake] Re: different obj dirs for debug and release

2007-05-17 Thread Davide Bacchet

Thanks! :)
I was already using this method, and it works well.

Now I use an external script to move into the debug and release folders 
and then launch cmake with the needed options to create the makefiles.
I'm still wondering if there is a way to replace the script with a 
command inside a CMakeLists file, such that I can only use cmake for the 
entire build process


thanks again,
Davide

--
-
Davide Bacchet
VI-grade Italy
Via Nazionale 74 - 33010 Tavagnacco (UD)
Mobile: +39-346-3775881
email:  [EMAIL PROTECTED]
-

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


Re: [CMake] how to get compile environment ($host) in cmake

2007-05-17 Thread haibin zhang
thanks
but I see cmake-2.4.6 CMakeLists.txt file :

IF(WIN32)
  IF(NOT UNIX)
IF(NOT BORLAND)
  IF(NOT MINGW )
SET(CMAKE_BUILD_ON_VISUAL_STUDIO 1)
  ENDIF(NOT MINGW )
ENDIF(NOT BORLAND)
  ENDIF(NOT UNIX)
ENDIF(WIN32)

who set this , WIN32 or UNIX or other ?

regards


"Clark J. Wang" <[EMAIL PROTECTED]> 写道: On 5/17/07, haibin zhang <[EMAIL 
PROTECTED]> wrote: Hi all :
  how to get $host in cmake ?

In autotool , it can use $host to get compile environment, example 
cygwin,i686-pc-mingw32 .
Use CMAKE_SYSTEM


 regards




-
  Mp3疯狂搜-新歌热歌高速下   

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


 

   
-
抢注雅虎免费邮箱3.5G容量,20M附件! ___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] how to get compile environment ($host) in cmake

2007-05-17 Thread Clark J. Wang

On 5/17/07, haibin zhang <[EMAIL PROTECTED]> wrote:


Hi all :
  how to get $host in cmake ?

In autotool , it can use $host to get compile environment, example
cygwin,i686-pc-mingw32 .



Use CMAKE_SYSTEM

regards



--
Mp3疯狂搜-新歌热歌高速下 


___
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