[CMake] Configure common headers for Visual Studio 2010 Express

2010-12-02 Thread Tron Thomas
I'm developing a cross platform application written in C++, and I'm 
using CMake to configure the build settings for each platform.
The project has common include files that need to be applied to all the 
targets built in the project.  To that end, the beginning of my main 
CMakeList.txt script looks something like this:


project(MyProject)
include_directories(${CMAKE_SOURCE_DIR}/Common)

When I configure the project to build with the express version of Visual 
Studio 2008 everything works fine and the common header files are 
applied to all targets


When I configure the project to build with the express version of Visual 
Studio 2010, however, these common header are not applied to any targets 
and many compilation errors result when building.


I am using CMake version 2.8.3 on Windows 7 Enterprise.
What is needed to get CMake to configure things properly for Visual 
Studio 2010 Express?

___
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] Visual Studio Express projects don't inherit from parent

2010-08-16 Thread Tron Thomas

On 08/16/2010 10:38 AM, Brian Davis wrote:
First off, I don't know the answer to your question, but I am curious 
how you are getting CMake to create inherited projects.  What are the 
commands you are suing to create an inherited project in CMake?  This 
is something I think I can use in my projects.



I'm not creating inherited projects per se.  I used the 
include_directories command to set the path to a directory that contains 
header files that should be used by multiple targets in the project.  In 
Visual Studio terms this is analogous to applying a setting to the 
solution.  All the sub projects in the solution need to inherit the 
settings of that solution to pick up the header file path.  Because this 
is not happening automatically through the CMake script, I having to go 
through each project individually and select the inherit from parent 
setting to they all pick up this search path.

___
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] Visual Studio Express projects don't inherit from parent

2010-08-16 Thread Tron Thomas

I don't think that is the problem.

I have not changed that script for a long time and it was working fine.

Only recently have I upgraded to CMake 2.8.2 and tried to configure the 
project for Visual C++ 2010 Express.


Before that I was using CMake 2.8.1 with Visual C++ 2008 Express and 
everything worked fine.  I could try testing CMake 2.8.2 with Visual C++ 
2008 Express to see if it still works.


I suspect it will and the problem lies with the generator for new 2010 
version of Visual C++ Express.


On 08/16/2010 06:59 PM, John Drescher wrote:

On Mon, Aug 16, 2010 at 9:53 PM, Tron Thomastron.tho...@frontier.com  wrote:
   

On 08/16/2010 10:38 AM, Brian Davis wrote:
 

First off, I don't know the answer to your question, but I am curious how
you are getting CMake to create inherited projects.  What are the commands
you are suing to create an inherited project in CMake?  This is something I
think I can use in my projects.


   

I'm not creating inherited projects per se.  I used the include_directories
command to set the path to a directory that contains header files that
should be used by multiple targets in the project.  In Visual Studio terms
this is analogous to applying a setting to the solution.  All the sub
projects in the solution need to inherit the settings of that solution to
pick up the header file path.  Because this is not happening automatically
through the CMake script, I having to go through each project individually
and select the inherit from parent setting to they all pick up this search
path.
 

My guess is that you probably are setting the include_directories in
the wrong place in your root CMakeLists.txt. What I mean is you are
setting this variable after you issue the add_subdirectory() instead
of before.

John

   


___
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] Visual Studio Express projects don't inherit from parent

2010-08-14 Thread Tron Thomas
I am using CMake 2.8.2 on a 64-bit version of Windows 7 Enterprise.  
When I try to configure my project to build for Visual Studio 2010 
Express, I get compiler warnings building the projects because none of 
the projects are set to inherit from parent or project defaults for 
include directories.  This prevents certain header files common to all 
projects from being found, thus the compiler errors.


How do I configure my CMake scripts to that projects for Visual Studio 
2010 Express will inherit the required include directories?


___
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] Can't configure for Visual C++ 2010 Express using CMake 2.8.2

2010-07-25 Thread Tron Thomas
I am running the 64-bit version of Windows 7 Enterprise, and I have been 
using CMake 2.8.1 to configure my cross platform project to build with 
the express version of Visual C++ 9 2008.


I recently install the express version of Visual C++ 2010 on the system, 
and upgraded to CMake 2.8.2.  Now when I go to configure my project for 
Windows I get the following error output:


CMake Error at 
3rdParty/Windows/Applications/CMake/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:70 
(MESSAGE):

  Could NOT find OpenAL (missing: OPENAL_INCLUDE_DIR)
Call Stack (most recent call first):
  
3rdParty/Windows/Applications/CMake/share/cmake-2.8/Modules/FindOpenAL.cmake:101 
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)

  Engine/CMakeLists.txt:7 (find_package)

I don't know why CMake is not able to find the OpenAL include 
directory.  My main CMakeLists.txt script checks against WIN32 to 
include an additional Windows specific script that sets the 
CMAKE_INCLUDE_PATH variable to the location for all needed header files 
(including OpenAL headers).


What is needed so that CMake can configure my project correctly for 
Visual C++ 2010 Express?


___
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] Detecting Xcode in CMake scripts

2010-07-01 Thread Tron Thomas
I currently have a project that I configure using CMake 2.8, and because 
of a problem with Xcode on the Macintosh I need to add some checks and 
adjust things in the CMake scripts to change the build configuration 
when Xcode is the intended build tool.  I would like to restrict these 
changes specifically to Xcode so that when a different tools like make 
files are used the special changes are not needed.


How could someone target specific build configuration settings to a 
development tool like Xcode?


___
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] Can't eliminate framework search path from Xcode target

2010-06-26 Thread Tron Thomas
I have a development project I've created which uses CMake 2.8.1 to 
configure the project to be build on Mac OS X 10.6.4 using Xcode 3.2.1.


The project has several targets in it.  Two targets share some source 
code files.  One of those targets links to some frameworks.  The other 
target used to link to framework, and I am now trying to configure it so 
it will not link to any frameworks at all.


The current problem I'm having is that whenever any file in this second 
project compiles with Xcode, the compiler settings apply the search path 
for the frameworks that exist in the project; i.e. the build output for 
compiling the file contains something like 
-F/Users/MyAccount/Project/build/Debug before any other header search 
paths are specified.   This causes the source code to find the wrong 
headers which are in the framework rather than the desired headers 
specified in the header search path.


I have made many attempts and I have yet to figure out how the flag that 
specifies the framework search path gets included in the setting that 
are used for compiling the target.  The Info pane for the target does 
not list the framework search path anywhere in its user interface.  I 
have tried using grep to search through all the file in the project file 
system.  I cannot find anything that causes this flag to be included for 
the target.  It seems that it just magically appears out of no where.


What can I do to eliminate this setting from my build configuration for 
the target?


___
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] Configure Mac OS X for 32-bit

2010-05-03 Thread Tron Thomas
What is the purpose for the OSX_ARCHITECTURE and 
OSX_ARCHITECTURES_CONFIG properties that already exist in CMAKE?  It 
seems like they might be properties that are already meant to address an 
issue like this, only I can't figure out how they work.


Also, I think previous versions of CMake did not have this problem, only 
I'm not certain of that.


On 05/02/2010 11:36 PM, Michael Wild wrote:

Ahh, you want a release build to be i386 AND ppc and your debug build to be just ppc? 
Use different binary trees then. Simple as that. If you're not satisfied with that, 
put a feature request for CMAKE_OSX_ARCHITECTURES_CONFIG  in the bug 
tracker...

Michael

On 2. May, 2010, at 23:39 , Tron Thomas wrote:

   

Hello Werner,
It is not just a simple matter of setting the architectures to either i386 or 
ppc.  For debug, the project should create an architecture specific build.  For 
release, the project should build an universal binary.
The help documentation for CMake mentions a property call 
OSX_ARCHITECTURES_DEBUG which sounds like it should do the trick for setting 
the architectures needed for a debug build.  I have tried using this property 
and it doesn't work for me.  I wonder if there might be some bugs in CMake 
around setting the proper architectures for different build types on Mac OS X.

I could trying using the -m32 compiler option and see how that works.  I would 
just expect there should be a more direct way to solve this problem.  I'm also 
concerned that applying the option might cause an error.  I believe that CMake 
is going to configure the project to use the -arch x86_64 flag, and I'm not 
sure how well things will work if the -arch x86_64 is used with the -m32 flag.

 

Hi Thomas,

On 5/2/10 5:41 PM, Tron Thomas wrote:

   

Before when I was using an earlier version of CMake, it would configure
the project to build a 32-bit version of all the project target's
regardless of which version of Mac OS X I was using.  It would also
build just the platform specific version of the targets for a debug build.

Now that I have upgraded to CMake version 2.8.1, CMake wants to
configure the project's targets to build for 64-bit on Mac OS X 10.6.

The only way I've found so far to make Mac OS X 10.6 build 32-bit, is to
modify the CMAKE_OSX_ARCHITECTURES to include i386.  However, if I set
CMAKE_OSX_ARCHITECTURES to only i386, then it will build create an Intel
version of all targets when I build on a PowerPC system.  That means I
won't be able to run and test the targets on that platform.

I'm trying to get things back to where they were before I upgraded to
CMake 2.8.1.  I want it to configure Xcode to build 32-bit targets, with
architecture specific version for debug builds.

How can someone accomplish this?

 

why not set this option when you call cmake? so:

cmake -DCMAKE_OSX_ARCHITECTURES=386 path-to-source

on your 10.6 system and

cmake -DCMAKE_OSX_ARCHITECTURES=ppc path-to-source

on your old system (that is, if you use the command line cmake).

Alternatively you could add the -m32 option to gcc like this

export CC=gcc -m32
cmake path-to-source

on your 10.6 system where a 32 bit application should then be build
(according e.g.
http://www.cyberciti.biz/tips/compile-32bit-application-using-gcc-64-bit-linux.html
, which should also be true for Mac OS X 10.6).

Regards,
Werner


   

___
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] Configure Mac OS X for 32-bit

2010-05-03 Thread Tron Thomas
The concern with building a universal binary for debug is only the time 
involved in the build.  It doesn't matter as much on a fast machine.  
However, I full rebuild on a slower machine can have some impact on 
productivity.  It would be better not to build code that is never going 
to get used.


CMake already has something that might try to implement the ability to 
configure different architectures for debug or release builds.


What is the difference between CMAKE_OSX_ARCHITECTURES and just 
OSX_ARCHITECTURES, both of which are mentioned in the CMake help 
documentation?


On 05/03/2010 09:02 AM, Sean McBride wrote:

On Sat, 1 May 2010 23:15:03 -0700, Tron Thomas said:

   

It looks like:
set (CMAKE_OSX_ARCHITECTURES i386 ppc)

will build a universal binary for a debug build on any platform.  How
can someone configure things so that Xcode will build a platform
specific debug version that is 32-bit?
 

Forgive me if this is obvious, but: it's ok if your debug build is a
universal binary also.  Yes it increases your build time (which granted
could be long) but it's quite valid to have universal debug versions.

Also, don't use -m32, -arch is the correct way.

What you need is a way to have different values of
CMAKE_OSX_ARCHITECTURES in Debug and Release.  If CMake doesn't support
this, it would make a good feature request.

   


___
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] Configure Mac OS X for 32-bit

2010-05-02 Thread Tron Thomas

It looks like:
set (CMAKE_OSX_ARCHITECTURES i386 ppc)

will build a universal binary for a debug build on any platform.  How 
can someone configure things so that Xcode will build a platform 
specific debug version that is 32-bit?



On 05/01/2010 04:55 PM, Mike Jackson wrote:

You need to set the CMAKE_OSX_ARCHITECTURES to i386. The default build
on snow leopard is 64bit where as on leopard it is 32 bit.

-
Mike Jackson  www.bluequartz.net
Principal Software Engineer   mike.jack...@bluequartz.net
BlueQuartz Software   Dayton, Ohio


On May 1, 2010, at 15:33, Tron Thomastron.tho...@verizon.net  wrote:

   

I am writing a cross platform application using CMake that builds on
Mac OS X.  I just upgraded to CMake 2.8-1.  When I configure and
build my project on my Power Mac G5 system running Mac OS X 10.5.8,
the project builds just fine.

When I try to configure the project on my MacBook Pro running Mac OS
X 10.6.3, I get link errors because the project has been configured
to build 64-bit applications and some of the needed libraries and
frameworks the project links with are only 32-bit.

How can I configure my CMake scripts so that the project will build
a 32-bit application on my MacBook Pro?

___
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] Configure Mac OS X for 32-bit

2010-05-02 Thread Tron Thomas
Before when I was using an earlier version of CMake, it would configure 
the project to build a 32-bit version of all the project target's 
regardless of which version of Mac OS X I was using.  It would also 
build just the platform specific version of the targets for a debug build.


Now that I have upgraded to CMake version 2.8.1, CMake wants to 
configure the project's targets to build for 64-bit on Mac OS X 10.6.


The only way I've found so far to make Mac OS X 10.6 build 32-bit, is to 
modify the CMAKE_OSX_ARCHITECTURES to include i386.  However, if I set 
CMAKE_OSX_ARCHITECTURES to only i386, then it will build create an Intel 
version of all targets when I build on a PowerPC system.  That means I 
won't be able to run and test the targets on that platform.


I'm trying to get things back to where they were before I upgraded to 
CMake 2.8.1.  I want it to configure Xcode to build 32-bit targets, with 
architecture specific version for debug builds.


How can someone accomplish this?

On 05/02/2010 01:58 AM, Michael Wild wrote:
Well, setting CMAKE_OSX_ARCHITECTURES to i386 AND ppc is going to get 
you a universal build, both of the architectures being 32-bit. So, 
what is it exactly that you want?


Michael Wild

On Sun, May 2, 2010 at 8:15 AM, Tron Thomas tron.tho...@verizon.net 
mailto:tron.tho...@verizon.net wrote:


It looks like:

set (CMAKE_OSX_ARCHITECTURES i386 ppc)

will build a universal binary for a debug build on any platform.
 How can someone configure things so that Xcode will build a
platform specific debug version that is 32-bit?



On 05/01/2010 04:55 PM, Mike Jackson wrote:

You need to set the CMAKE_OSX_ARCHITECTURES to i386. The
default build
on snow leopard is 64bit where as on leopard it is 32 bit.

-
Mike Jackson www.bluequartz.net http://www.bluequartz.net
Principal Software Engineer mike.jack...@bluequartz.net
mailto:mike.jack...@bluequartz.net
BlueQuartz Software   Dayton, Ohio


On May 1, 2010, at 15:33, Tron Thomastron.tho...@verizon.net
mailto:tron.tho...@verizon.net  wrote:


I am writing a cross platform application using CMake that
builds on
Mac OS X.  I just upgraded to CMake 2.8-1.  When I
configure and
build my project on my Power Mac G5 system running Mac OS
X 10.5.8,
the project builds just fine.

When I try to configure the project on my MacBook Pro
running Mac OS
X 10.6.3, I get link errors because the project has been
configured
to build 64-bit applications and some of the needed
libraries and
frameworks the project links with are only 32-bit.

How can I configure my CMake scripts so that the project
will build
a 32-bit application on my MacBook Pro?

___
Powered by www.kitware.com http://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 http://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] Configure Mac OS X for 32-bit

2010-05-02 Thread Tron Thomas
I don't think this will work.  The first approach relies on 
CMAKE_BUILD_TYPE, which  is only applicable to make based generators.  I 
build my project on Mac OS X using Xcode, which is not make based, at 
least in this context.


The second solution just reverses the problem.  By this I mean that, 
before the upgrade, CMake would configure a project that built for the 
specific architecture during debug builds and universal binaries for 
release builds.  Applying the second approach would not allow for a 
universal binary to be built for release builds.  I supposed this would 
not be a catastrophe.  There are some project that only release 
architecture specific version of their products instead of universal 
binaries.  Still, I would expect CMake to offer the flexibility of 
configuring the project in whatever manner is desired.


On 5-2-2010 10:04, Richard Wackerbarth wrote:

You might try this approach:
Since you want to use 32-bit on MacOSX 10.6, when in debug, set the 
architecture only in your particular case


cmake_minimum_required(VERSION 2.4)
PROJECT(Test)
IF (${CMAKE_SYSTEM_NAME} MATCHES Darwin)
   Message(${CMAKE_SYSTEM_VERSION})
   STRING (REGEX MATCH ^[^.]+ __v ${CMAKE_SYSTEM_VERSION} )
   STRING (REGEX MATCH [0-9][0-9]$ __version 00${__v} )
   STRING (COMPARE GREATER ${__version} 09 
_host_is_snow_leopard_or_newer )

   IF (${_host_is_snow_leopard_or_newer})
  IF (x${CMAKE_BUILD_TYPE} STREQUAL xDebug)
 SET (CMAKE_OSX_ARCHITECTURES i386)
  ENDIF (x${CMAKE_BUILD_TYPE} STREQUAL xDebug)
   ENDIF (${_host_is_snow_leopard_or_newer})
ENDIF (${CMAKE_SYSTEM_NAME} MATCHES Darwin)

ADD_EXECUTABLE(HelloWorld Hello)

or this approach

IF (${CMAKE_SYSTEM_PROCESSOR} STREQUAL i386)
   SET (CMAKE_OSX_ARCHITECTURES i386)
ENDIF (${CMAKE_SYSTEM_PROCESSOR} STREQUAL i386)

Richard



___
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] Configure Mac OS X for 32-bit

2010-05-02 Thread Tron Thomas

Hello Werner,
It is not just a simple matter of setting the architectures to either 
i386 or ppc.  For debug, the project should create an architecture 
specific build.  For release, the project should build an universal binary.
The help documentation for CMake mentions a property call 
OSX_ARCHITECTURES_DEBUG which sounds like it should do the trick for 
setting the architectures needed for a debug build.  I have tried using 
this property and it doesn't work for me.  I wonder if there might be 
some bugs in CMake around setting the proper architectures for different 
build types on Mac OS X.


I could trying using the -m32 compiler option and see how that works.  I 
would just expect there should be a more direct way to solve this 
problem.  I'm also concerned that applying the option might cause an 
error.  I believe that CMake is going to configure the project to use 
the -arch x86_64 flag, and I'm not sure how well things will work if the 
-arch x86_64 is used with the -m32 flag.



Hi Thomas,

On 5/2/10 5:41 PM, Tron Thomas wrote:
   

Before when I was using an earlier version of CMake, it would configure
the project to build a 32-bit version of all the project target's
regardless of which version of Mac OS X I was using.  It would also
build just the platform specific version of the targets for a debug build.

Now that I have upgraded to CMake version 2.8.1, CMake wants to
configure the project's targets to build for 64-bit on Mac OS X 10.6.

The only way I've found so far to make Mac OS X 10.6 build 32-bit, is to
modify the CMAKE_OSX_ARCHITECTURES to include i386.  However, if I set
CMAKE_OSX_ARCHITECTURES to only i386, then it will build create an Intel
version of all targets when I build on a PowerPC system.  That means I
won't be able to run and test the targets on that platform.

I'm trying to get things back to where they were before I upgraded to
CMake 2.8.1.  I want it to configure Xcode to build 32-bit targets, with
architecture specific version for debug builds.

How can someone accomplish this?
 

why not set this option when you call cmake? so:

cmake -DCMAKE_OSX_ARCHITECTURES=386 path-to-source

on your 10.6 system and

cmake -DCMAKE_OSX_ARCHITECTURES=ppc path-to-source

on your old system (that is, if you use the command line cmake).

Alternatively you could add the -m32 option to gcc like this

export CC=gcc -m32
cmake path-to-source

on your 10.6 system where a 32 bit application should then be build
(according e.g.
http://www.cyberciti.biz/tips/compile-32bit-application-using-gcc-64-bit-linux.html
, which should also be true for Mac OS X 10.6).

Regards,
Werner

   

___
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] Configure Mac OS X for 32-bit

2010-05-02 Thread Tron Thomas
CMAKE_ BUILD_TYPE is only applicable to make based generators.  As far 
as I know, the Xcode generator for CMake is not a make based generator.  
So I would not expect CMAKE_BUILD_TYPE to work in this situation.


On 5-2-2010 12:43, Mike Jackson wrote:

I think part of the problem you are seeing is that OS X 10.6 defaults
to a 64 bit build where as OS X 10.5 defaults to a 32 bit build. So in
order for you to build a 32 bit binary on OS X 10.6 you need to
specifically set CMAKE_OSX_ARCHITECTURES to i386 when you want to
build a 32 bit i386 executable on OS X 10.6.
   You can generate a 32 bit PPC executable by setting
CMAKE_OSX_ARCHITECTURES=ppc. The set the CMAKE_BUILD_TYPE to Debug
and that should get you a 32 bit PPC executable that has Debugging
symbols.
_
Mike Jackson  mike.jack...@bluequartz.net


On Sun, May 2, 2010 at 11:41 AM, Tron Thomastron.tho...@verizon.net  wrote:
   

Before when I was using an earlier version of CMake, it would configure the
project to build a 32-bit version of all the project target's regardless of
which version of Mac OS X I was using.  It would also build just the
platform specific version of the targets for a debug build.

Now that I have upgraded to CMake version 2.8.1, CMake wants to configure
the project's targets to build for 64-bit on Mac OS X 10.6.

The only way I've found so far to make Mac OS X 10.6 build 32-bit, is to
modify the CMAKE_OSX_ARCHITECTURES to include i386.  However, if I set
CMAKE_OSX_ARCHITECTURES to only i386, then it will build create an Intel
version of all targets when I build on a PowerPC system.  That means I won't
be able to run and test the targets on that platform.

I'm trying to get things back to where they were before I upgraded to CMake
2.8.1.  I want it to configure Xcode to build 32-bit targets, with
architecture specific version for debug builds.

How can someone accomplish this?

On 05/02/2010 01:58 AM, Michael Wild wrote:

Well, setting CMAKE_OSX_ARCHITECTURES to i386 AND ppc is going to get you a
universal build, both of the architectures being 32-bit. So, what is it
exactly that you want?

Michael Wild

On Sun, May 2, 2010 at 8:15 AM, Tron Thomastron.tho...@verizon.net  wrote:
 

It looks like:
set (CMAKE_OSX_ARCHITECTURES i386 ppc)

will build a universal binary for a debug build on any platform.  How can
someone configure things so that Xcode will build a platform specific debug
version that is 32-bit?


On 05/01/2010 04:55 PM, Mike Jackson wrote:
   

You need to set the CMAKE_OSX_ARCHITECTURES to i386. The default build
on snow leopard is 64bit where as on leopard it is 32 bit.

-
Mike Jackson  www.bluequartz.net
Principal Software Engineer   mike.jack...@bluequartz.net
BlueQuartz Software   Dayton, Ohio


On May 1, 2010, at 15:33, Tron Thomastron.tho...@verizon.netwrote:


 

I am writing a cross platform application using CMake that builds on
Mac OS X.  I just upgraded to CMake 2.8-1.  When I configure and
build my project on my Power Mac G5 system running Mac OS X 10.5.8,
the project builds just fine.

When I try to configure the project on my MacBook Pro running Mac OS
X 10.6.3, I get link errors because the project has been configured
to build 64-bit applications and some of the needed libraries and
frameworks the project links with are only 32-bit.

How can I configure my CMake scripts so that the project will build
a 32-bit application on my MacBook Pro?

___
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
   



 


   


___
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] Configure Mac OS X for 32-bit

2010-05-01 Thread Tron Thomas
I am writing a cross platform application using CMake that builds on Mac 
OS X.  I just upgraded to CMake 2.8-1.  When I configure and build my 
project on my Power Mac G5 system running Mac OS X 10.5.8, the project 
builds just fine.


When I try to configure the project on my MacBook Pro running Mac OS X 
10.6.3, I get link errors because the project has been configured to 
build 64-bit applications and some of the needed libraries and 
frameworks the project links with are only 32-bit.


How can I configure my CMake scripts so that the project will build a 
32-bit application on my MacBook Pro?


___
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] Configure Mac OS X for 32-bit

2010-05-01 Thread Tron Thomas
I don't want to set the value to architecture set to i386 when I'm 
building on a PowerPC system.  I also only want a single architecture 
for a debug build and universal binary for release builds.


So, I tried doing this in a section of the CMake script that already 
determined it was building on Mac OS X:


if(CMAKE_SYSTEM_PROCESSOR MATCHES i386)
set(OSX_ARCHITECTURES_DEBUG i386)
endif(CMAKE_SYSTEM_PROCESSOR MATCHES i386)

However when I go to build a debug target in the project the build 
output indicates that the -arch x86_64 flag is in use, causing the 
built executable to be 64-bit.


The command:
cmake --help-property OSX_ARCHITECTURES

mentioned something about the CMAKE_OSX_ARCHITECTURES variable, however 
the command:

cmake --help-variable CMAKE_OSX_ARCHITECTURES

complained that CMAKE_OSX_ARCHITECTURES was not a defined variable.

What needs to be applied to get CMake to configure a Snow Leopard system 
as 32-bit?


On 05/01/2010 04:55 PM, Mike Jackson wrote:

You need to set the CMAKE_OSX_ARCHITECTURES to i386. The default build
on snow leopard is 64bit where as on leopard it is 32 bit.

-
Mike Jackson  www.bluequartz.net
Principal Software Engineer   mike.jack...@bluequartz.net
BlueQuartz Software   Dayton, Ohio


On May 1, 2010, at 15:33, Tron Thomastron.tho...@verizon.net  wrote:

   

I am writing a cross platform application using CMake that builds on
Mac OS X.  I just upgraded to CMake 2.8-1.  When I configure and
build my project on my Power Mac G5 system running Mac OS X 10.5.8,
the project builds just fine.

When I try to configure the project on my MacBook Pro running Mac OS
X 10.6.3, I get link errors because the project has been configured
to build 64-bit applications and some of the needed libraries and
frameworks the project links with are only 32-bit.

How can I configure my CMake scripts so that the project will build
a 32-bit application on my MacBook Pro?

___
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] Configure Mac OS X for 32-bit

2010-05-01 Thread Tron Thomas

Okay, I think I figured it out.  I used this:

set(CMAKE_OSX_ARCHITECTURES i386 ppc)

At least on my MacBook Pro that sets the architecture to i386 for debug 
builds.  I'll have to try it on the PowerMac to make sure its 
architecture gets set to ppc for debug builds.


On 05/01/2010 04:55 PM, Mike Jackson wrote:

You need to set the CMAKE_OSX_ARCHITECTURES to i386. The default build
on snow leopard is 64bit where as on leopard it is 32 bit.

-
Mike Jackson  www.bluequartz.net
Principal Software Engineer   mike.jack...@bluequartz.net
BlueQuartz Software   Dayton, Ohio


On May 1, 2010, at 15:33, Tron Thomastron.tho...@verizon.net  wrote:

   

I am writing a cross platform application using CMake that builds on
Mac OS X.  I just upgraded to CMake 2.8-1.  When I configure and
build my project on my Power Mac G5 system running Mac OS X 10.5.8,
the project builds just fine.

When I try to configure the project on my MacBook Pro running Mac OS
X 10.6.3, I get link errors because the project has been configured
to build 64-bit applications and some of the needed libraries and
frameworks the project links with are only 32-bit.

How can I configure my CMake scripts so that the project will build
a 32-bit application on my MacBook Pro?

___
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] CMake can't find package on Windows

2009-05-10 Thread Tron Thomas

What is involved in writing a patch?

Tyler Roscoe wrote:

On Fri, May 08, 2009 at 05:34:19PM -0700, Tron Thomas wrote:
  
I looked at the FindDevIL.cmake file, and if I understand it correctly 
it might be wrong for Windows.  On Linux, the main library is called 
libIL.so.  On Windows, however, the corresponding import library is 
called DevIL.lib.  The FindDevIL.cmake file seems to only consider IL 
and not DEVIL as the valid name for the library.  I added DEVIL to the 
NAMES entry for the IL_LIBRARY's FIND_LIBRARY command and CMake 
successfully configured the project.  I'm wondering if I should enter a 
bug against this module.



I don't know anything about that find module, but filing a bug sounds
appropriate to me. Even better is if you can write a patch that fixes
the problem.

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] CMake can't find package on Windows

2009-05-08 Thread Tron Thomas
I am trying to use CMake to configure a project for Windows.  The 
project has dependencies on 3rd party packages.  Most of these packages 
are resolved successful with the FIND_PACKAGE command.  However, CMake 
is unable to resolve a recent package that was added to the project, 
even though the files for that package are located with the other 
packages CMake has been able to handle.


What can be done to determine why CMake is not finding this new package?


___
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] CMake can't find package on Windows

2009-05-08 Thread Tron Thomas

Tyler Roscoe wrote:

On Fri, May 08, 2009 at 01:43:16PM -0700, Tron Thomas wrote:
  
I am trying to use CMake to configure a project for Windows.  The 
project has dependencies on 3rd party packages.  Most of these packages 
are resolved successful with the FIND_PACKAGE command.  However, CMake 
is unable to resolve a recent package that was added to the project, 
even though the files for that package are located with the other 
packages CMake has been able to handle.



You should provide more detail about what library you can't find, what
diagnostic messages are produced, and what you have already tried if you
want help.

tyler
The package is the Developer's Image Library (DevIL).  I have place the 
import libraries and header files in the same location where I've place 
other 3rd party library packages.  When I run CMake it reports:

-- Could NOT find IL  (missing:  IL_LIBRARY)
CMake Error: The following variables are used in this project, but they 
are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the 
CMake files:

IL_LIBRARY

I have not tried too much so far, just running CMake with the 
--debug-ouput flag enabled and running it with the --trace flag 
enabled.  Neither method has produced any information that has been 
helpful to me so far.  Since I've never had any problems with CMake 
finding packages before, I'm not really sure how to go about figuring 
out why things are not working.


___
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] CMake can't find package on Windows

2009-05-08 Thread Tron Thomas

Tron Thomas wrote:

Tyler Roscoe wrote:

On Fri, May 08, 2009 at 01:43:16PM -0700, Tron Thomas wrote:
  
I am trying to use CMake to configure a project for Windows.  The 
project has dependencies on 3rd party packages.  Most of these packages 
are resolved successful with the FIND_PACKAGE command.  However, CMake 
is unable to resolve a recent package that was added to the project, 
even though the files for that package are located with the other 
packages CMake has been able to handle.



You should provide more detail about what library you can't find, what
diagnostic messages are produced, and what you have already tried if you
want help.

tyler
The package is the Developer's Image Library (DevIL).  I have place 
the import libraries and header files in the same location where I've 
place other 3rd party library packages.  When I run CMake it reports:

-- Could NOT find IL  (missing:  IL_LIBRARY)
CMake Error: The following variables are used in this project, but 
they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the 
CMake files:

IL_LIBRARY

I have not tried too much so far, just running CMake with the 
--debug-ouput flag enabled and running it with the --trace flag 
enabled.  Neither method has produced any information that has been 
helpful to me so far.  Since I've never had any problems with CMake 
finding packages before, I'm not really sure how to go about figuring 
out why things are not working.


I looked at the FindDevIL.cmake file, and if I understand it correctly 
it might be wrong for Windows.  On Linux, the main library is called 
libIL.so.  On Windows, however, the corresponding import library is 
called DevIL.lib.  The FindDevIL.cmake file seems to only consider IL 
and not DEVIL as the valid name for the library.  I added DEVIL to the 
NAMES entry for the IL_LIBRARY's FIND_LIBRARY command and CMake 
successfully configured the project.  I'm wondering if I should enter a 
bug against this module.



___
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] How to prevent CMake from escaping characters in custom target

2009-03-30 Thread Tron Thomas
I am trying to define an operation in a custom targt that varies on  
different platforms and take different command line arguments.  I  
tried defining the command using something like:


set(Command command_name -flags)

Then using it like:

set_custom_target(TargetName ${SomeOtherCommand} COMMAND ${Command})

This resulting script that handles target will format the command like  
this:


command-name\ -flags

This causes an error when the command for the target are exectuted  
preventing the command from doing what it was intended to do.


What can be done to allow the command to be formatted properly in the  
target script?


___
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] Building with debug information using Makefiles

2009-03-05 Thread Tron Thomas
I am trying to use CMake to configure a cross platform project I'm 
developing.  On platforms that have IDE's such as Mac OS X and Windows, 
the configuration work fine in that programs can be built with debug 
information for development purposes.  On Linux, I am just using 
Makefiles and no specific IDE.  I find that when I configure the 
project, the built executable do not contain debug information unless I 
go into each target and add special case code to enable debug symbols 
for the Linux platform.


How can I avoid having to specify debug information for each individual 
target when building with Makefiles?


___
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] How to configure build output directory

2009-01-30 Thread Tron Thomas




During development, I don't expect INSTALL targets will be used at
all. The main reason I initially wanted this directory structure was
because I was planning to have a configuration file for each
application, and I thought I would name it "configuration".

However, if all the executables are in the same directory, they can't
all have configuration files with the same name. When I thought of
this problem, it occurred to me this would not be a problem on the
Macintosh, as all the executables are placed in bundles, which are
really just directory structures disguised as a single application
file. I knew the file could simple be embedded into the bundle, and I
thought perhaps I could apply a similar strategy to other platforms.

My solution now it to just use name of the application for the
configuration file.

Philip Lowman wrote:

  On Thu, Jan 29, 2009 at 9:47 PM, Tron Thomas
  tron.tho...@verizon.net
wrote:
  The
point about the PATH needed for DLL's under this directory structure is
something I forgot to take into account when I was contemplating how to
organize things. It would not work out well with what I had in mind.
Given that, I think I will have to consider a different strategy.
  
Most people just set CMAKE_RUNTIME_OUTPUT_PATH once (usually to "bin")
and INSTALL() targets to a runtime output path (also usually "bin") and
call it a day. Let us know what you come up with though. =)
  
  
  
-- 
Philip Lowman





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

Re: [CMake] How to configure build output directory

2009-01-29 Thread Tron Thomas
The point about the PATH needed for DLL's under this directory structure 
is something I forgot to take into account when I was contemplating how 
to organize things.  It would not work out well with what I had in 
mind.  Given that, I think I will have to consider a different strategy.


Philip Lowman wrote:
On Tue, Jan 27, 2009 at 10:34 PM, Tron Thomas tron.tho...@verizon.net 
mailto:tron.tho...@verizon.net wrote:


I want to use CMake to configure a project that will build several
applications.  I would like things such that each built program
ends up in a directory path like:
.../BuildDirectory/Debug/ApplicationName/AppliationName(.exe)


What is needed to cause CMake to configure this kind of build output?


I'm not sure if you'll be able to easily get the Debug prior to the 
ApplicationName because usually Visual Studio adds that.  If you can 
live with ApplicationName/Debug/ApplicationName.exe the following 
might work for you:


add_execuable(ApplicationName foo.cc)
set_target_properties(ApplicationName PROPERTIES 
RUNTIME_OUTPUT_DIRECTORY ApplicationName)


I would only consider this if you are building all static executables 
or are willing to live with using the PATH environment variable to 
keep DLLs in your path.  Otherwise you're very quickly going to run 
into a problem running one or more of your executables and you'll have 
to copy DLLs to every folder.


--
Philip Lowman



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


[CMake] How to configure build output directory

2009-01-27 Thread Tron Thomas
I want to use CMake to configure a project that will build several 
applications.  I would like things such that each built program ends up 
in a directory path like:

.../BuildDirectory/Debug/ApplicationName/AppliationName(.exe)


What is needed to cause CMake to configure this kind of build output?


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


[CMake] Mac OS X framework bundles don't end up in the specified build directory

2009-01-03 Thread Tron Thomas
I want to use CMake to configure a project so that all programs and  
libraries are built into the same directory.  So for a debug build of  
the project the directory might be something like ProjectName/build/ 
Debug.


This works fine for most targets.  However built Mac OS X framework  
bundles do not end up in this directory.  They end up in a  
subdirectory depending on where they were configured in the source code.


For example, if a framework was configured in ${CMAKE_SOURCE_DIR}/ 
ParentDirectory/FrameworkDirectory, the built framework will end up in  
ProjectName/build/ParentDirectory/FrameworkDirectory/Debug.


It is not at all clear frameworks bundles are treated this way and  
will end up in different location from all other built targets.


What can be done to place framework bundles in their desired location?

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


[CMake] --build-run-dir for CTest

2008-12-22 Thread Tron Thomas

What is the --build-run-dir for CTest supposed to do?
I tried to use it to run a unit test from a specific directory and that 
did not work.

How can someone specify the working directory for a unit test?


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


[CMake] How to specify working directory for unit tests?

2008-12-17 Thread Tron Thomas
I need to be able to run a certain unit from a specific directory so 
that it will be able to find some supporting file that are needed for 
the test.  However CTest insists on launching the test from a different 
location.


I tried using the --build-run-dir and --build-exe-dir flags.  Neither of 
them would change the unit test directory.


What can be done to specify the directory where CTest should launch the 
unit test?


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


Re: [CMake] CxxTest failure output running unit tests

2008-12-16 Thread Tron Thomas




Hey Philip,
I tried both the flag and exporting the environment variable. Neither
method produced the output from the test application when the test
failed.
What is needed to used this feature?

Philip Lowman wrote:
On Sun, Dec 7, 2008 at 5:44 PM, Tron Thomas tron.tho...@verizon.net
wrote:
  
  It
would be nice if the original "test" and RUN_TESTS targets could be
configured this way without having to create and additional target that
replaces them.
  
Patch attached here:
  http://public.kitware.com/Bug/view.php?id=8255
  
Here's a start at this that doesn't break existing behavior. If the
user specifies a "--output-on-failure" flag to CTest or defines the
environment variable CTEST_OUTPUT_ON_FAILURE then when a test fails,
CTest will output whatever the test program outputted to the screen.
Usually this should be the test assertion(s) that failed. Here's an
example of what it might look like when using CxxTest.
  
u...@ubuntu:~/src/test_cmake_cxxtest/build$ echo "export
CTEST_OUTPUT_ON_FAILURE=1"  ~/.bashrc
u...@ubuntu:~/src/test_cmake_cxxtest/build$ source ~/.bashrc
u...@ubuntu:~/src/test_cmake_cxxtest/build$ make test
Running tests...
Start processing tests
Test project /home/user/src/test_cmake_cxxtest/build
 1/ 3 Testing unittest_addition  Passed
 2/ 3 Testing unittest_addition_fail ...
*** Test Failed:
Running 1 test
In MyTestSuite::testAddition:
/home/user/src/test_cmake_cxxtest/addition_failure.h:8: Error: Expected
(1 + 1 == 3), found (2 != 3)
Failed 1 of 1 test
Success rate: 0%
  
***Failed 
 3/ 3 Testing unittest_subtraction . Passed
  
67% tests passed, 1 tests failed out of 3
  
The following tests FAILED:
  2 - unittest_addition_fail (Failed)
Errors while running CTest
make: *** [test] Error 8
  
  
  
  
  
-- 
Philip Lowman




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

Re: [CMake] How to copy dependent files

2008-12-13 Thread Tron Thomas

I have tried a different approach that has been more successful:

add_custom_target(CopyXML ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/XML ${EXECUTABLE_OUTPUT_PATH}

add_dependencies(UnitTest CopyXML)

This will always copy the files whether they need to be updated or  
not, however I cannot think of anything else that will cause the file  
to get copied.


Another problem is that when I build this target from an IDE like  
Apple's Xcode, the file are copied to ${EXECUTABLE_OUTPUT_PATH},  
however the built executable is copied to ${EXECUTABLE_OUTPUT_PATH}/ 
Debug when building the debug version the application.


How can I get the copied files and built executable to appear in the  
same directory.


On Dec 11, 2008, at 8:44 o'clock, Tron Thomas wrote:

I have a project configured with CMake that needs to have  set of  
XML files copied to the directory where executables are built so  
that a unit test that relies on these files can execute.


I tried to create a custom command that should copy the files and  
tried to set that command up as dependency of the unit test  
application.  However when the application builds the files are not  
copied to the needed directory.


Here is the gist of how I tried to perform the copy:

file(GLOB SourceXMLFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/XML  
XML/*.xml)


foreach(File ${SourceXMLFiles})
set(XMLFiles ${XMLFiles} ${EXECUTABLE_OUTPUT_PATH}/${File})
endforeach(File)

add_custom_command(OUTPUT ${XMLFiles}
COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/XML ${EXECUTABLE_OUTPUT_PATH}
DEPENDS ${SourceXMLFiles})

add_dependencies(UnitTest ${XMLFiles})

What can be done to copy the needed files to the unit test directory?



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


[CMake] Unit test is not executed from expected directory

2008-12-13 Thread Tron Thomas
I am trying to use CMake to configure a project that has unit tests.  
One unit test requires supporting XML files to perform its test.  It was 
assumed that the test would be executed from the directory where the 
test application exists, so a target was added that copies the XML files 
to that location.


However, it turns out that the tests fails when the test target created 
by CMake is executed because CMake configured CTest to change to some 
subdirectory located beneath the execuable directory and perform the 
test in that location.


What is needed so that CTest will executing the test application in the 
expected location?


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


[CMake] How to copy dependent files

2008-12-11 Thread Tron Thomas
I have a project configured with CMake that needs to have  set of XML  
files copied to the directory where executables are built so that a  
unit test that relies on these files can execute.


I tried to create a custom command that should copy the files and  
tried to set that command up as dependency of the unit test  
application.  However when the application builds the files are not  
copied to the needed directory.


Here is the gist of how I tried to perform the copy:

file(GLOB SourceXMLFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/XML XML/ 
*.xml)


foreach(File ${SourceXMLFiles})
set(XMLFiles ${XMLFiles} ${EXECUTABLE_OUTPUT_PATH}/${File})
endforeach(File)

add_custom_command(OUTPUT ${XMLFiles}
COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/XML ${EXECUTABLE_OUTPUT_PATH}
DEPENDS ${SourceXMLFiles})

add_dependencies(UnitTest ${XMLFiles})

What can be done to copy the needed files to the unit test directory?

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


[CMake] Project dependencies do not work with Xcode on Mac OS X

2008-12-10 Thread Tron Thomas
I have a project configured by CMake that uses a macro to create an 
executable from a generated source file using code like the following:


macro(CreateProgram Name)
   set(SourceFile ${Name}.cpp)

   add_custom_command(OUTPUT ${SourceFile}
   COMMAND Source code generation command
   DEPENDS ${ARGN}
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

   add_executable(${Name} ${SourceFile} ${ARGN})
endmacro(CreateSourceFile)

ARGN is usually a list of header files the generated source code file 
will depend on.  This macro works fine for make files on Linux and 
Visual Studio on Windows.  However, with Xcode on Mac OS X, changes to 
the dependent header files will not cause the program to rebuild.


I suspect this is a bug with the way CMake is configuring the Xcode 
project.  I wanted to check to see if there was anything I'm missing 
that would make things work.


What do people know about why this might be failing on Xcode?
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CxxTest failure output running unit tests

2008-12-08 Thread Tron Thomas




That looks like it would work. What can someone do to make sure that
the test get run every time a build is performed?

Philip Lowman wrote:
On Sun, Dec 7, 2008 at 5:44 PM, Tron Thomas [EMAIL PROTECTED]
wrote:
  
  It
would be nice if the original "test" and RUN_TESTS targets could be
configured this way without having to create and additional target that
replaces them.
  
Patch attached here:
  http://public.kitware.com/Bug/view.php?id=8255
  
Here's a start at this that doesn't break existing behavior. If the
user specifies a "--output-on-failure" flag to CTest or defines the
environment variable CTEST_OUTPUT_ON_FAILURE then when a test fails,
CTest will output whatever the test program outputted to the screen.
Usually this should be the test assertion(s) that failed. Here's an
example of what it might look like when using CxxTest.
  
[EMAIL PROTECTED]:~/src/test_cmake_cxxtest/build$ echo "export
CTEST_OUTPUT_ON_FAILURE=1"  ~/.bashrc
[EMAIL PROTECTED]:~/src/test_cmake_cxxtest/build$ source ~/.bashrc
[EMAIL PROTECTED]:~/src/test_cmake_cxxtest/build$ make test
Running tests...
Start processing tests
Test project /home/user/src/test_cmake_cxxtest/build
 1/ 3 Testing unittest_addition  Passed
 2/ 3 Testing unittest_addition_fail ...
*** Test Failed:
Running 1 test
In MyTestSuite::testAddition:
/home/user/src/test_cmake_cxxtest/addition_failure.h:8: Error: Expected
(1 + 1 == 3), found (2 != 3)
Failed 1 of 1 test
Success rate: 0%
  
***Failed 
 3/ 3 Testing unittest_subtraction . Passed
  
67% tests passed, 1 tests failed out of 3
  
The following tests FAILED:
  2 - unittest_addition_fail (Failed)
Errors while running CTest
make: *** [test] Error 8
  
  
  
  
  
-- 
Philip Lowman




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

Re: [CMake] CxxTest failure output running unit tests

2008-12-08 Thread Tron Thomas

Philip Lowman wrote:

.. Original Message ...
On Mon, 08 Dec 2008 10:50:28 -0500 Bill Hoffman 
[EMAIL PROTECTED] wrote:
  


I still think it looks ugly and hard to see the tests that failed.



Not all testing suites are going to be as verbose as CxxTest.  It's also not going to be any 
easier on the eyes in the verbose logfile than it is on stdout.  In fact I would argue it's far 
more readable on stdout because with the verbose option there is a lot more logging.


Furthermore, the possibility remains that CxxTest  may be able to be 
customized to simplify the output when running within another testing 
system.


  
Does the  Testing/Temporary/LastTest.log file help at all?   So, if you 
run tests and there are failures, you can look at that file to see the 
detail.  Maybe if ctest did something like this:

The following tests FAILED:
   2 - unittest_addition_fail (Failed)
(See Testing/Temporary/LastTest.log for details.)



LastTest.log is a nice thing to have but if the user has 800 unit tests I 
think he'd prefer not to look through the entire logfile.


How about giving the user the command to run to get information for the 
tests that failed?


(Run ctest --output-on-failure -N 2,5,9-11 for details about the failed 
tests.) 

Obviously -N would also need to be implemented for this to work right (-I 
is kinda bloated and doesn't support multiple ranges)
Another benefit is for producing errors in the build output is that some 
IDE's can be configured such that when someone clicks on the error it 
will take them directly to the code that caused the error so that 
someone can try to figure out what went wrong.

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


Re: [CMake] CxxTest failure out running unit tests

2008-12-07 Thread Tron Thomas

Hey Bill,
The command listed below looks like it is something that would be issued 
from a command line in a terminal, and not something that would be 
recognized as a valid operation within a CMake script.

How does this command help CMake to configure unit tests for verbose output?
Bill Hoffman wrote:

Philip Lowman wrote:
On Sat, Dec 6, 2008 at 9:00 PM, Tron Thomas [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


I know that if I type ctest -V from the command line, I can get
output that include the CxxTest information.  I'm not sure what I'm
supposed to do in my CMakeLists.txt files that will cause the same
behaviour when I build the target that runs the unit tests.


So what you're asking is if there is a way to have make test output 
the equivalent of ctest -V on any failed tests?  I don't know if 
that's possible out of the box, but that sounds like a useful feature 
to me.




make test ARGS=-VV

-Bill



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


Re: [CMake] CxxTest failure output running unit tests

2008-12-07 Thread Tron Thomas
From the standpoint of using CxxTest, it doesn't seem like the test are 
useful unless there is verbose output.  When a tests fails, someone will 
have no idea was caused the failure unless they use verbose output to 
see the output from the test.  I don't know how much verbose output is 
produced when a test is successful.  If there is not a lot then it might 
not be that big of an issue.  Otherwise it would be nice if there were a 
way to produce verbose output during a failure and maybe normal output 
when a test succeeds.


Bill Hoffman wrote:

Tron Thomas wrote:

I think I have a solution.
It involves creating a new target that basically replaces the test 
target for Makefiles or the RUN_TESTS target generated for IDE's.


I added this:
add_custom_taget(TestAll ALL {CMAKE_TEST_COMMAND} -V)

I then have a macro define that generates all the information to 
create a CxxTest unit test.  In that macro I include:

add_dependencies(TestAll ${Name})

where ${Name} is an argument passed to the macro that determines the 
name for the unit test.  This makes sure that all unit tests are 
built before the TestAll target tries to run tests during its build 
phase.


All of these steps cause the unit tests to be run with verbose 
output, which can help someone understand where problems are when 
tests fail.  It also runs these tests as part of building everything, 
which is also what I want to happen.


It would be nice if the original test and RUN_TESTS targets could 
be configured this way without having to create and additional target 
that replaces them.


But, some people like short output.   If you have lots of output with 
lots of tests it becomes really hard to see where one test starts and 
the next one ends.  So, there would have to be two different types of 
targets.  However, I think this thread is about yet another way 
someone wants the tests to work.  In this case, I think that the 
verbose output is only wanted for tests that fail.  It is not going to 
be possible to make everyone happy


-Bill



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


Re: [CMake] CxxTest failure out running unit tests

2008-12-06 Thread Tron Thomas
I know that if I type ctest -V from the command line, I can get output 
that include the CxxTest information.  I'm not sure what I'm supposed to 
do in my CMakeLists.txt files that will cause the same behaviour when I 
build the target that runs the unit tests.


Philip Lowman wrote:
On Sat, Dec 6, 2008 at 7:22 PM, Tron Thomas [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


I am creating a CMake configured project that uses the CxxTest
unit testing framework for testing various components.

When I build the test target that runs the test, and there are
failures, CTest will report that the test fail, and it doesn't
provide the details about what the failures were.

How can I configure my test target so that it will produce the
output from CxxTest that explains why certain tests failed?


Use the -V flag (verbosity) to see the output of a failed test.  You 
can also use this in conjunction with the other flags to limit the 
tests preformed (see -E for example).


Also, if you haven't found it already, this may be of interest:
http://public.kitware.com/Bug/view.php?id=6401
 
--

Philip Lowman


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


Re: [CMake] CxxTest failure out running unit tests

2008-12-06 Thread Tron Thomas




Yes, that it what I want. Who knows of any way this might be done?
Philip Lowman wrote:
On Sat, Dec 6, 2008 at 9:00 PM, Tron Thomas [EMAIL PROTECTED]
wrote:
  
  I
know that if I type ctest -V from the command line, I can get output
that include the CxxTest information. I'm not sure what I'm supposed
to do in my CMakeLists.txt files that will cause the same behaviour
when I build the target that runs the unit tests.
  
So what you're asking is if there is a way to have "make test" output
the equivalent of "ctest -V" on any failed tests? I don't know if
that's possible out of the box, but that sounds like a useful feature
to me.
  
  
  
-- 
Philip Lowman




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

Re: [CMake] Can't configure Perl on Windows

2008-11-28 Thread Tron Thomas
Because Perl is not included with Windows by default, I including Perl 
in the source distribution of the project.  This means that the Perl 
executable is located in a directory below the root of the source tree.  
So ${CMAKE_SOURCE_DIR}/Path to Perl does correctly specify the 
version of Perl to be used by this project on the Windows platform.

David Cole wrote:
I think the problem here was that you were giving 
${CMAKE_SOURCE_DIR}/Path to Perl where you should have had Path 
to Perl


CMAKE_SOURCE_DIR is your source tree. Is perl really under your source 
tree?



On Thu, Nov 27, 2008 at 4:43 PM, Tron Thomas [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Since Perl is not typically included with Windows, I am including
the Windows version in the source tree.  The relevant CMake code
goes something like this:

cmake_minimum_required(VERSION 2.6)

project(MyProject)

enable_testing()

find_package(Perl REQUIRED PATHS ${CMAKE_SOURCE_DIR}/Path to Perl)

The Path to Perl refers to the root directory of the Perl
installation (i.e. the directory that contains the bin, lib, etc.
subdirectories).  I don't know if it needs to include the path to
the actual executable.


Alexander Neundorf wrote:

On Thursday 27 November 2008, Tron Thomas wrote:
  

I am trying to configure a CMake project which requires Perl for
building on Windows.  I have added the find_package command specifying
that Perl is required and providing the path for where the Perl binaries
are located.  Despite this, I get output like the following when trying
to configure using CMake:

CMake Error at CMakeLists.txt:19 (find_package):

 Could not find a configuration file for package Perl.


Please show the cmake code, it should work.

Alex


  



___
CMake mailing list
CMake@cmake.org mailto: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] Can't run units test defined in subdirectories

2008-11-28 Thread Tron Thomas

Okay, I changed the add_test command to:
add_test(${Name} ${EXECUTABLE_OUTPUT_PATH}/${Name})

Now, when I try to build the RUN_TESTS target I get results like this:

Start processing tests
Test project /Projects/MyProject/build
 1/  1 Testing TestLibrary***Failed

0% tests passed, 1 tests failed out of 1

The following tests FAILED:
 1 - TestLibrary (Failed)
Errors while running CTest
make: *** [RUN_TESTS_buildpart_0] Error 8

It is unclear why an error like this is occurring.  The test application 
runs successfully when launched manually.

How can I fix this problem so the test runs properly?

Date: Fri, 28 Nov 2008 08:36:27 -0500
From: Michael Jackson [EMAIL PROTECTED]
Subject: Re: [CMake] Can't run units test defined in subdirectories
To: Cmake cmake@cmake.org cmake@cmake.org
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes

You might want to try:

ADD_TEST(${Name} ${EXECUTABLE_OUTPUT_PATH}/${Name})



Mike

On Nov 27, 2008, at 5:42 PM, Tron Thomas wrote:

  
I am trying to use CMake to configure a project on Mac OS X that  
contains different subdirectories where various libraries and such  
are built.  These subdirectories will also contain unit tests for  
the built components.  In the root CMakeLists.txt file, I have  
defined a macro that will help set up the unit tests when I call  
this macro in the sub directories.  This is the basics of how the  
macro works:


macro(AddTestApplication Name)
# Generate test application information here ...

add_executable(${Name} ${ARGN})
get_target_property(TestCommand ${Name} LOCATION)
add_test(${Name} ${TestCommand})
endmacro(AddTestApplication)

When I include the macro in the subdirectory, the test application  
gets built.  When I try to run the RUN_TESTS target in the project,  
I get error output like:


Start processing tests
Test project /Projects/MyProject/build
 1/  1 Testing TestLibraryCould not find  
executable /Projects/MyProject/build/$(CONFIGURATION)/TestLibrary

Looked in the following places:
/Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
/Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
/Projects/MyProject/build/$(CONFIGURATION)/Debug/TestLibrary
/Projects/MyProject/build/$(CONFIGURATION)/Debug/TestLibrary
Debug//Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
Debug//Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
Projects/MyProject/build/$(CONFIGURATION)/Debug/TestLibrary
Projects/MyProject/build/$(CONFIGURATION)/Debug/TestLibrary
Debug/Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
Debug/Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
Unable to find executable: /Projects/MyProject/build/$ 
(CONFIGURATION)/TestLibrary


0% tests passed, 1 tests failed out of 1

The following tests FAILED:
  1 - TestLibrary (Not Run)
Errors while running CTest
make: *** [RUN_TESTS_buildpart_0] Error 8

For some reason CTest is not performing any substitution for $ 
(CONFIGURATION).  If it were, the first location it tried would have  
succeeded in finding the test exectuable

What is needed so that the test application can run successfully?




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


Re: [CMake] Can't run units test defined in subdirectories

2008-11-28 Thread Tron Thomas

When I run ctest using the -VV option I get this output like this:

UpdateCTestConfiguration  from 
:/Users/tron/Projects/TBD/build/DartConfiguration.tcl

Start processing tests
UpdateCTestConfiguration  from 
:/Projects/MyProject/build/DartConfiguration.tcl

Test project /Projects/MyProject/build
Constructing a list of tests
Done constructing a list of tests
Changing directory into /Projects/MyProject/TestLibrary
 1/  1 Testing TestLibrary   
Test command: /Projects/MyProject/build/Debug/TestLibrary

Test timeout computed to be: 9.99988e+06
Running 30 tests
In AngularUnitsTests::testDegreesToRadians:
/Projects/MyProject/TestLibrary/Tests/AngularUnitsTests.h:13: Error: 
Test failed: Intential failure
/Projects/MyProject/TestLibrary/Tests/AngularUnitsTests.h:40: Error: 
Test failed: Intential failure

.
Failed 1 of 30 tests
Success rate: 96%
-- Process completed
***Failed

0% tests passed, 1 tests failed out of 1

The following tests FAILED:
 1 - TestLibrary (Failed)
Errors while running CTest

I had intentionally added a failure into my test application to make 
sure the test process would report errors when the tests fail.  This 
output make it much more clear what happened when the test was run, that 
the original output.  How can I configure the project so output like 
this will occur rather than the default output?


Bill Hoffman wrote:

Tron Thomas wrote:

Okay, I changed the add_test command to:
add_test(${Name} ${EXECUTABLE_OUTPUT_PATH}/${Name})

Now, when I try to build the RUN_TESTS target I get results like this:

Start processing tests
Test project /Projects/MyProject/build
 1/  1 Testing TestLibrary***Failed

0% tests passed, 1 tests failed out of 1

The following tests FAILED:
 1 - TestLibrary (Failed)
Errors while running CTest
make: *** [RUN_TESTS_buildpart_0] Error 8

It is unclear why an error like this is occurring.  The test 
application runs successfully when launched manually.

How can I fix this problem so the test runs properly?

Run this in your build tree:

ctest -VV

That should give you more output.

-Bill


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


[CMake] Can't configure Perl on Windows

2008-11-27 Thread Tron Thomas
I am trying to configure a CMake project which requires Perl for 
building on Windows.  I have added the find_package command specifying 
that Perl is required and providing the path for where the Perl binaries 
are located.  Despite this, I get output like the following when trying 
to configure using CMake:


CMake Error at CMakeLists.txt:19 (find_package):

Could not find a configuration file for package Perl.

Set Perl_DIR to the directory containing a CMake configuration file for
Perl.  The file will have one of the following names:
  PerlConfig.cmake
  perl-config.cmake


What can be done to resolve this problem so that Perl will work properly 
on Windows with CMake?



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


Re: [CMake] Can't configure Perl on Windows

2008-11-27 Thread Tron Thomas




Since Perl is not typically included with Windows, I am including the
Windows version in the source tree. The relevant CMake code goes
something like this:

cmake_minimum_required(VERSION 2.6)

project(MyProject)

enable_testing()

find_package(Perl REQUIRED PATHS ${CMAKE_SOURCE_DIR}/Path to
Perl)

The Path to Perl refers to the root directory of the Perl
installation (i.e. the directory that contains the bin, lib, etc.
subdirectories). I don't know if it needs to include the path to the
actual executable.

Alexander Neundorf wrote:

  On Thursday 27 November 2008, Tron Thomas wrote:
  
  
I am trying to configure a CMake project which requires Perl for
building on Windows.  I have added the find_package command specifying
that Perl is required and providing the path for where the Perl binaries
are located.  Despite this, I get output like the following when trying
to configure using CMake:

CMake Error at CMakeLists.txt:19 (find_package):

 Could not find a configuration file for package Perl.

  
  
Please show the cmake code, it should work.

Alex


  





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

[CMake] Can't run units test defined in subdirectories

2008-11-27 Thread Tron Thomas
I am trying to use CMake to configure a project on Mac OS X that  
contains different subdirectories where various libraries and such are  
built.  These subdirectories will also contain unit tests for the  
built components.  In the root CMakeLists.txt file, I have defined a  
macro that will help set up the unit tests when I call this macro in  
the sub directories.  This is the basics of how the macro works:


macro(AddTestApplication Name)
# Generate test application information here ...

add_executable(${Name} ${ARGN})
get_target_property(TestCommand ${Name} LOCATION)
add_test(${Name} ${TestCommand})
endmacro(AddTestApplication)

When I include the macro in the subdirectory, the test application  
gets built.  When I try to run the RUN_TESTS target in the project, I  
get error output like:


Start processing tests
Test project /Projects/MyProject/build
  1/  1 Testing TestLibraryCould not find  
executable /Projects/MyProject/build/$(CONFIGURATION)/TestLibrary

Looked in the following places:
/Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
/Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
/Projects/MyProject/build/$(CONFIGURATION)/Debug/TestLibrary
/Projects/MyProject/build/$(CONFIGURATION)/Debug/TestLibrary
Debug//Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
Debug//Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
Projects/MyProject/build/$(CONFIGURATION)/Debug/TestLibrary
Projects/MyProject/build/$(CONFIGURATION)/Debug/TestLibrary
Debug/Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
Debug/Projects/MyProject/build/$(CONFIGURATION)/TestLibrary
Unable to find executable: /Projects/MyProject/build/$(CONFIGURATION)/ 
TestLibrary


0% tests passed, 1 tests failed out of 1

The following tests FAILED:
  1 - TestLibrary (Not Run)
Errors while running CTest
make: *** [RUN_TESTS_buildpart_0] Error 8

For some reason CTest is not performing any substitution for $ 
(CONFIGURATION).  If it were, the first location it tried would have  
succeeded in finding the test exectuable

What is needed so that the test application can run successfully?

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


Re: [CMake] Can't configure Perl on Windows

2008-11-27 Thread Tron Thomas
When I remove the PATHS entry from the find_library library, CMake 
succeeds.  This is because I have Cygwin installed, and CMake finds the 
perl executable in the Cygwin installation.  Cygwin is not required for 
the project I'm trying to develop, and I don't want to force someone to 
install it for configuring the project on their system.


What can I do so I can test how well this configuration will work on a 
system that does not have Cygwin installed?


Alexander Neundorf wrote:

On Thursday 27 November 2008, Tron Thomas wrote:
  

 Since Perl is not typically included with Windows, I am including the
Windows version in the source tree.  The relevant CMake code goes something
like this:

 cmake_minimum_required(VERSION 2.6)

 project(MyProject)

 enable_testing()

 find_package(Perl REQUIRED PATHS ${CMAKE_SOURCE_DIR}/Path to Perl)



Try without the PATHS ${CMAKE_SOURCE_DIR}/Path to Perl arguments, and if 
perl is not found, set the environment variable CMAKE_PREFIX_PATH to the root 
directory of the perl installation (setting the cmake variable 
CMAKE_PREFIX_PATH should also work).

Let me know if this helps.

Alex


  



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


Re: [CMake] Can't configure Perl on Windows

2008-11-27 Thread Tron Thomas
Okay, so even though CMake succeeded on my system without setting 
CMAKE_PREFIX_PATH, I set it anyway.  I then deleted all the CMake 
generated file, and ran CMake again.  This time CMake said that it found 
Perl in the location I wanted CMake to find it, and the build 
configuration succeeded.  I'm hoping this proves my configuration will 
work without Cygwin.


Alexander Neundorf wrote:

On Friday 28 November 2008, Tron Thomas wrote:
  

When I remove the PATHS entry from the find_library library, CMake
succeeds.  This is because I have Cygwin installed, and CMake finds the



Hmm. Mainly it succeeds because now it defaults to the module-mode, i.e. it 
searches for a FindPerl.cmake and executes this (which then find cygwin 
first).
With your previous code it switched to config-mode and was searching for a 
PerlConfig.cmake, which it didn't find.


So, if you want cmake to find a specific version of something, set your 
CMAKE_PREFIX_PATH so that it contains the root directory of that software. 
The directories in CMAKE_PREFIX_PATH will be searched first.

(works both as an environment variable as well as a cmake variable).

Alex


  



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


[CMake] Can't run Cocoa test application in CTest

2008-11-23 Thread Tron Thomas
On Mac OS X, I want to build a graphical test application to be added as 
a test in a project configured by CMake.  However, I am unable to add 
this application as a test in CMake because it Mac OS X builds the 
program as an application bundle, and CMake is unable to find the 
correct path to the executable to run it.


On Mac OS X, an application bundle is basically a directory structure.  
Say the test application is called TestRunner, the root of the 
application bundle would be called TestRunner.app.  The path to the 
executable with in the bundle would be:


TestRunner.app/Content/MacOS/TestRunner

I cannot correctly specify the path to CTest when using the ADD_TEST 
command in CMake.  I tried something like:

ADD_TEST(TestRunner TestRunner.app/Content/MacOS/TestRunner)

However, CTest never looks in the right directory to find the 
executable.  It will produce output like the follow when trying to 
execute the test:


 1/  1 Testing TestRunnerCould not find executable 
TestRunner.app/Content/MacOS/TestRunner

Looked in the following places:
TestRunner.app/Content/MacOS/TestRunner
TestRunner.app/Content/MacOS/TestRunner
TestRunner.app/Content/MacOS/Debug/TestRunner
TestRunner.app/Content/MacOS/Debug/TestRunner
Debug/TestRunner.app/Content/MacOS/TestRunner
Debug/TestRunner.app/Content/MacOS/TestRunner
Unable to find executable: TestRunner.app/Content/MacOS/TestRunner

For the way I have the project configured, the correct path for Debug 
version of the executable would be:

${EXECUTABLE_OUTPUT_PATH}/build/Debug/TestRunner.app/Content/MacOS/TestRunner

What can I do that will allow the CTest application to run the test 
exectuable?


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


Re: [CMake] Can't run Cocoa test application in CTest

2008-11-23 Thread Tron Thomas
I tried that originally, and it does not work.  When add_executable is 
used to create an application bundle on MacOS X, it does not simple 
build an executable program.  It creates an entire directory structure 
that bundles up the exectuable.  CTest does not seem to understand how 
to deal with this bundle; it expects a runnable executable as the name 
for the second argument to add_test.


Bill Hoffman wrote:

Tron Thomas wrote:
On Mac OS X, I want to build a graphical test application to be added 
as a test in a project configured by CMake.  However, I am unable to 
add this application as a test in CMake because it Mac OS X builds 
the program as an application bundle, and CMake is unable to find the 
correct path to the executable to run it.


On Mac OS X, an application bundle is basically a directory 
structure.  Say the test application is called TestRunner, the root 
of the application bundle would be called TestRunner.app.  The path 
to the executable with in the bundle would be:


TestRunner.app/Content/MacOS/TestRunner

I cannot correctly specify the path to CTest when using the ADD_TEST 
command in CMake.  I tried something like:

ADD_TEST(TestRunner TestRunner.app/Content/MacOS/TestRunner)


You should be able to do this:

add_test(TestRunner TestRunner)

All that should be needed is the name of the executable target given 
to the add_executable command.  CMake should then figure out how to 
call the executable.


-Bill



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


Re: [CMake] Can't run Cocoa test application in CTest

2008-11-23 Thread Tron Thomas
I filed bug 8139 against the issue.  I tried using the 
get_target_property command and that did not fix the problem.


Bill Hoffman wrote:

Tron Thomas wrote:
I tried that originally, and it does not work.  When add_executable 
is used to create an application bundle on MacOS X, it does not 
simple build an executable program.  It creates an entire directory 
structure that bundles up the exectuable.  CTest does not seem to 
understand how to deal with this bundle; it expects a runnable 
executable as the name for the second argument to add_test.




I thought we had implemented that

Can you create a bug entry?

Another thing you could try is this:

get_target_property(myBundle LOCATION EXE_LOCATION)

Then use ${EXE_LOCATION} for the executable.

-Bill




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


Re: [CMake] Can't run Cocoa test application in CTest

2008-11-23 Thread Tron Thomas

I corrected the directory name and tried it again.  I get the same results.
Martin Costabel wrote:

Tron Thomas wrote:
[]
 1/  1 Testing TestRunnerCould not find 
executable TestRunner.app/Content/MacOS/TestRunner

Looked in the following places:
TestRunner.app/Content/MacOS/TestRunner


Perhaps writing Contents instead of Content might help?



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


[CMake] CMake won't clean generated files for Xcode

2008-11-22 Thread Tron Thomas
I am trying to configure a project with CMake that uses the CxxTest 
testing framework.  CxxTest will generate source files that may be added 
into application that test the software.  A macro has been written that 
will create custom commands for generated the needed source file.


However, when I used CMake to create a Xcode project on Mac OS X, the 
clean process will not delete the files generated by CxxTest.  This is 
true even when using the SET_DIRECTORY_PROPERTIES command with the 
ADDITIONAL_MAKE_CLEAN_FILES.  What can be done so the Xcode will delete 
these files when necessary?


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


[CMake] Building NIB based Cocoa application

2008-10-26 Thread Tron Thomas
I was able  to figure out how to build a Mac OS X framework using 
CMake.  Now, I would like to know how I can build a NIB based Cocoa 
application on the same platform.  The BundleTest example included with 
the CMake source code only shows how to create a Carbon bundle.


Where can I find information about how to build a Cocoa application?

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


Re: [CMake] CMake Digest, Vol 54, Issue 63

2008-10-21 Thread Tron Thomas
What directory are you referring to when you mention 
CMake/Tests/Framework?  Where do I find this information?

Date: Tue, 21 Oct 2008 12:42:58 -0400
From: David Cole [EMAIL PROTECTED]
Subject: Re: [CMake] Mac OS X frameworks
To: Michael Jackson [EMAIL PROTECTED]
Cc: cmake@cmake.org
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain; charset=iso-8859-1

The test framework can be found at CMake/Tests/Framework. Follow the
CMakeLists.txt in that directory to get started.
Let us know if you think anything is missing...


David

  


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


[CMake] Mac OS X frameworks

2008-10-20 Thread Tron Thomas
I tried posting this question earlier, and I never saw it.  It could be 
that I posted before I was fully added to the mailing list.
Anyway, I've been trying to look into what it would take to build a Mac 
OS X framework using CMake to configure the build system, and it is 
unclear to me how well this is supported.

What is the state of using CMake for building frameworks?

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