Re: [CMake] [CTest] Access test data from c++ code

2009-11-04 Thread Marcel Loose
Hi Thomas,

It depends. I would prefer to keep a clean source tree and put any
generated file in the build tree. That way you could (in principle) run
cmake from a read-only source tree. But it's not wrong the way you do
it.

Regards,
Marcel Loose.

On Tue, 2009-11-03 at 17:38 +0100, Thomas wrote:
> Yes it works. My questions was if this is the way it should be done.
> 
> ___
> 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] Is it safe to use add_definitions() before the first project() command?

2009-11-04 Thread Marcel Loose
Hi all,

Well the title says it all. Is it safe to use add_definitions() before
the first project() command, or am I entering the realm of undefined
behaviour then?

Best regards,
Marcel Loose.


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Are variable names guaranteed to be case-sensitive?

2009-11-04 Thread Marcel Loose
Hi all,

Title says it all (again). I noticed, simply by trying out, that on
Linux variable names are case sensitive. I.e. 'foo' and 'FOO' are two
different variables.
Is it safe to assume that this is, and will always be, the case on any
platform?

Best regards,
Marcel Loose.


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Executing a CMake Custom Target from CTest

2009-11-04 Thread Mathieu Malaterre
On Tue, Nov 3, 2009 at 6:20 PM, Bill Hoffman  wrote:
> Mathieu Malaterre wrote:
>>
>> Hi there,
>>
>>  I'd like to know if this is possible to execute a cmake custom
>> target from my nightly ctest script.
>> Eg. In cmake
>>
>> ...
>>  ADD_CUSTOM_COMMAND(
>>    OUTPUT bla.txt
>>    COMMAND echo "bla" > bla.txt
>>    VERBATIM
>>    )
>>  ADD_CUSTOM_TARGET(BLA DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bla.txt)

This is really cool !

Thanks
-- 
Mathieu
___
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] RHEL5 - "Eclipse CDT4 - Unix Makefiles" generator no project files are generated just Makefiles

2009-11-04 Thread Eric Noulard
2009/11/3 tech user :
> Hi All
>
> We have *successfully build\compiled cmake-2.6.4 on linux RHEL5.

Since you had some issue for this may be you can document
what you have done for building a proper RHEL5 rpm on a Wiki Page:

May be in the "More Topics" area.
http://www.cmake.org/Wiki/CMake#More_Topics

As a suggestion, since CMake 2.8.0 is underway you may try the very same
process with current CMake 2.8.0 RC in order to be ready to offer
2.8 improvement to your users.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
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 statically linked executables

2009-11-04 Thread Marcel Loose
Hi all,

I would like to be able to build statically linked executables. I
currently have the following statements in one of my initialization
macros:

  if(BUILD_STATIC_EXECUTABLES)
set(CMAKE_EXE_LINKER_FLAGS -static)
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
set(CMAKE_EXE_LINK_DYNAMIC_C_FLAGS)   # remove -Wl,-Bdynamic
set(CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS)
set(CMAKE_SHARED_LIBRARY_C_FLAGS) # remove -fPIC
set(CMAKE_SHARED_LIBRARY_CXX_FLAGS)
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)# remove -rdynamic
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
# Maybe this works as well, haven't tried yet.
# set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
  endif(BUILD_STATIC_EXECUTABLES)

Does this cover all affected CMake variables, or am I still missing
some. 

Note that this question is partly related to an earlier question of
mine, "Static linking and find_library()", which can be found at
http://www.mail-archive.com/cmake@cmake.org/msg21106.html

Best regards,
Marcel Loose.


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Trouble understanding --build-and-test

2009-11-04 Thread Mathieu Malaterre
Hi there,

  I am struggling to understand how to use ctest  --build-and-test. I
have reproduce the issue with a minimal cmakelists.txt file at:

http://gdcm.svn.sf.net/viewvc/gdcm/Sandbox/CMakeBug/10/CMakeLists.txt?view=markup

which all it does is simply configure a cmakelists.txt file for the
--build-and-test step. The building step is working fine, no problem.
However I do not understand how to execute the test as listed in the
configured cmakelists.txt, which :

http://gdcm.svn.sf.net/viewvc/gdcm/Sandbox/CMakeBug/10/BlaCMakeLists.txt.in?view=markup

  What is the pupose of --test-command ? How should I specify 'execute
the make test target' within the --build-and-test command ?

Thanks,
-- 
Mathieu
___
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] simple ctest

2009-11-04 Thread th . tom
I did the following steps:

1) creating script.cmake:
SET ( SOURCE_DIR "C:/my/sources/" )
SET ( CTEST_BINARY_DIRECTORY ${SOURCE_DIR}/build )
SET ( CTEST_SOURCE_DIRECTORY ${SOURCE_DIR} )

MESSAGE ( "Actual path is ${CTEST_SOURCE_DIRECTORY}" ) 
MESSAGE ( "Actual binary path is ${CTEST_BINARY_DIRECTORY}" ) 

CTEST_START ( Nightly )
CTEST_CONFIGURE ( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res )
CTEST_BUILD ( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res )
CTEST_SUBMIT ( RETURN_VALUE res )

Then I start
ctest -S script.cmake

Then I got a wiered output:
Actual path is C:/my/sources/
Actual binary path is C:/my/sources/build
Actual path is C:/my/sources/
Actual binary path is C:/my/sources/build
Actual path is C:/my/sources/
Actual binary path is C:/my/sources/build
Actual path is C:/my/sources/
Actual binary path is C:/my/sources/build
Actual path is C:/my/sources/
Actual binary path is C:/my/sources/build
Actual path is C:/my/sources/
Actual binary path is C:/my/sources/build
Actual path is C:/my/sources/
Actual binary path is C:/my/sources/build
...

Then I delete the two output lines and start ctest again

The output is the same!!! As if the script has not been changed
I deleted the Testing directory - but no change

What is going wrong here?

- Tom 
___
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] Trouble understanding --build-and-test

2009-11-04 Thread Mathieu Malaterre
In fact that was easy, simply calling ctest as  --test-command did the trick.

Sorry for the noise

On Wed, Nov 4, 2009 at 12:50 PM, Mathieu Malaterre
 wrote:
> Hi there,
>
>  I am struggling to understand how to use ctest  --build-and-test. I
> have reproduce the issue with a minimal cmakelists.txt file at:
>
> http://gdcm.svn.sf.net/viewvc/gdcm/Sandbox/CMakeBug/10/CMakeLists.txt?view=markup
>
> which all it does is simply configure a cmakelists.txt file for the
> --build-and-test step. The building step is working fine, no problem.
> However I do not understand how to execute the test as listed in the
> configured cmakelists.txt, which :
>
> http://gdcm.svn.sf.net/viewvc/gdcm/Sandbox/CMakeBug/10/BlaCMakeLists.txt.in?view=markup
>
>  What is the pupose of --test-command ? How should I specify 'execute
> the make test target' within the --build-and-test command ?
>
> Thanks,
> --
> Mathieu
>



-- 
Mathieu
___
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] LINK_FLAGS_ bug in Xcode Generator in CVS 2.8 branch and head branch

2009-11-04 Thread Brad King

Steven Wilson wrote:
CMake is ignoring the LINK_FLAGS_ settings for 
set_target_properties() when using the Xcode generator in the 2.8 branch 
and the head branch.


It looks like the implementation is just plain missing from that
generator.  Please submit a bug report here:

  http://www.cmake.org/Bug

and send me the issue number.

Thanks,
-Brad
___
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] find_package is fantastic

2009-11-04 Thread Mathieu Malaterre
Just wanted to say : great job on the find_package interface !

This is extremely convenient to use for package using cmake as build package.
All I had to do is configure a *Config.cmake and a
*ConfigVersion.cmake file. And then from the outside I can simply
find_package(MyPackage HINTS $ENV{MyPackage_ROOT})

-> No need to write a FindMyPackage.cmake
-> *Congif.cmake files are auto-magically found
-> Version is automatically taken into account.
-> I can easily configure/build, thanks to a simple env var.

Thank you !
-- 
Mathieu
___
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] FindBoost: FIND_PACKAGE ( Boost COMPONENTS filesystem )

2009-11-04 Thread Mathieu Malaterre
Philip,

  I guess I was not very clear in my previous email. But here is my
proposed change:

@@ -322,8 +322,14 @@
   if(Boost_VERSION AND Boost_FIND_COMPONENTS)
  math(EXPR _boost_maj "${Boost_VERSION} / 10")
  math(EXPR _boost_min "${Boost_VERSION} / 100 % 1000")
- if(${_boost_maj}.${_boost_min} VERSION_LESS 1.35)
-   list(REMOVE_ITEM Boost_FIND_COMPONENTS system)
+ if(${_boost_maj}.${_boost_min} VERSION_GREATER 1.34)
+   # when use asked for filesystem or wave, automatically add
+   # system to the list of components
+   list(FIND Boost_FIND_COMPONENTS filesystem v1)
+   list(FIND Boost_FIND_COMPONENTS wave v2)
+   if(v1 OR v2)
+ list(APPEND Boost_FIND_COMPONENTS system)
+   endif(v1 OR v2)
  endif()
   endif()


Therefore calling

FIND_PACKAGE ( Boost COMPONENTS filesystem REQUIRED)

will work on boost 1.34 and boost > 1.34

Comments ?

On Tue, Nov 3, 2009 at 3:20 PM, Mathieu Malaterre
 wrote:
> The way I see it to address is that 'system' is an internal details
> (AFAIK). It should be automatically pulled in for filesystem and wave
> (for boost > 1.34), instead of the contrary (removing system when
> using boost 1.34).
> So this means I will be breaking the interface...
>
> Comments anyone ?
>
> On Tue, Nov 3, 2009 at 3:14 PM, Philip Lowman  wrote:
>> This was addressed on the mailing list and I thought had been resolved based
>> on user feedback.
>>
>> The code which is supposed to fix this is on line 326 of FindBoost as
>> checked into CVS.  A patch would be appreciated if the code doesn't work for
>> you.
>>
>> See also bug 8734
>>
>> On Nov 3, 2009 5:05 AM, "Mathieu Malaterre" 
>> wrote:
>>
>> Hi Philip,
>>
>>  That's where I stop understanding. I cannot state this:
>>
>> FIND_PACKAGE ( Boost COMPONENTS filesystem REQUIRED) # ideal
>>
>>  If I follow your suggestion I need to express an internal
>> dependencie at user level:
>>
>> FIND_PACKAGE ( Boost COMPONENTS filesystem system REQUIRED)
>>
>>  which fails for Boost 1.34 with:
>>
>> ...
>> CMake Error at Cmake/FindBoost.cmake:894 (message):
>>  Unable to find the requested Boost libraries.
>>
>>  Boost version: 1.34.1
>>
>>  Boost include path: /usr/include
>>
>>  The following Boost libraries could not be found:
>>
>>          boost_system
>>
>>  Some (but not all) of the required Boost libraries were found.  You may
>>  need to install these additional Boost libraries.  Alternatively, set
>>  Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
>>  to the location of Boost.
>> Call Stack (most recent call first):
>>  CMakeLists.txt:33 (FIND_PACKAGE)
>> ...
>>
>> Thanks
>>
>> On Mon, Nov 2, 2009 at 6:24 PM, Philip Lowman  wrote: > Add
>> system to the list of ...
>>
>> --
>> Mathieu
>>
>
>
>
> --
> Mathieu
>



-- 
Mathieu
___
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] Are variable names guaranteed to be case-sensitive?

2009-11-04 Thread David Cole
Yes.

On Wed, Nov 4, 2009 at 3:44 AM, Marcel Loose  wrote:

> Hi all,
>
> Title says it all (again). I noticed, simply by trying out, that on
> Linux variable names are case sensitive. I.e. 'foo' and 'FOO' are two
> different variables.
> Is it safe to assume that this is, and will always be, the case on any
> platform?
>
> Best regards,
> Marcel Loose.
>
>
> ___
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
___
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] simple ctest

2009-11-04 Thread David Cole
What version of ctest? What OS?

i.e. : what is the output of:
ctest --version
which ctest


On Wed, Nov 4, 2009 at 7:23 AM,  wrote:

> I did the following steps:
>
> 1) creating script.cmake:
> SET ( SOURCE_DIR "C:/my/sources/" )
> SET ( CTEST_BINARY_DIRECTORY ${SOURCE_DIR}/build )
> SET ( CTEST_SOURCE_DIRECTORY ${SOURCE_DIR} )
>
> MESSAGE ( "Actual path is ${CTEST_SOURCE_DIRECTORY}" )
> MESSAGE ( "Actual binary path is ${CTEST_BINARY_DIRECTORY}" )
>
> CTEST_START ( Nightly )
> CTEST_CONFIGURE ( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res )
> CTEST_BUILD ( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res )
> CTEST_SUBMIT ( RETURN_VALUE res )
>
> Then I start
> ctest -S script.cmake
>
> Then I got a wiered output:
> Actual path is C:/my/sources/
> Actual binary path is C:/my/sources/build
> Actual path is C:/my/sources/
> Actual binary path is C:/my/sources/build
> Actual path is C:/my/sources/
> Actual binary path is C:/my/sources/build
> Actual path is C:/my/sources/
> Actual binary path is C:/my/sources/build
> Actual path is C:/my/sources/
> Actual binary path is C:/my/sources/build
> Actual path is C:/my/sources/
> Actual binary path is C:/my/sources/build
> Actual path is C:/my/sources/
> Actual binary path is C:/my/sources/build
> ...
>
> Then I delete the two output lines and start ctest again
>
> The output is the same!!! As if the script has not been changed
> I deleted the Testing directory - but no change
>
> What is going wrong here?
>
> - Tom
> ___
> 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] INSTALL_NAME_DIR with IMPORTED targets

2009-11-04 Thread Justin Holewinski


Is there a way to make CMake honor the INSTALL_NAME_DIR property for  
IMPORTED library targets?


For the Mac OS X build of an application, I have a binary-only, third- 
party library in the form of a .dylib that I keep in the source tree.   
I add it to my CMake build script as such:


ADD_LIBRARY(foo SHARED IMPORTED)
SET_TARGET_PROPERTIES(foo PROPERTIES IMPORTED_LOCATION "$ 
{THIRD_PARTY_LIB}")


where THIRD_PARTY_LIB is the path to the library in the source tree.

When I configure the bundle for the application, I add ``foo'' as a  
link library with TARGET_LINK_LIBRARIES, e.g.


ADD_EXECUTABLE(myexe MACOSX_BUNDLE "")
TARGET_LINK_LIBRARIES(myexe foo ${OTHER_LIBRARY_TARGETS})

where OTHER_LIBRARY_TARGETS are additional shared libraries built for  
the project.



I install with:

INSTALL(TARGETS myexe DESTINATION .)
INSTALL(TARGETS ${OTHER_LIBRARY_TARGETS} DESTINATION myexe.app/ 
Contents/MacOS)

INSTALL(FILES ${THIRD_PARTY_LIB})


As is, this builds the app bundle but does not properly adjust  
the .dylib paths in the binaries.  I can fix this with:


SET_TARGET_PROPERTIES(${OTHER_LIBRARY_TARGETS} PROPERTIES  
INSTALL_NAME_DIR "@executable_path")


and this works great for the shared libraries built for the project,  
but this does *not* work for the IMPORTED library:


SET_TARGET_PROPERTIES(foo PROPERTIES INSTALL_NAME_DIR  
"@executable_path")

or
SET_TARGET_PROPERTIES(${THIRD_PARTY_LIB} PROPERTIES INSTALL_NAME_DIR  
"@executable_path")


In either case, ``otool -L'' shows that the third-party library name  
is not prepended with @executable_path and hence trying to launch the  
bundle as an application fails with an error saying the third-party  
library could not be located.



Is there a way to make CMake honor INSTALL_NAME_DIR for IMPORTED  
targets, or perhaps a better way of linking against and installing  
third-party libraries on Mac OS X using CMake's install provisions?  I  
could probably use a post-build shell script, but I would like to do  
this within the CMake build scripts, if possible.



Thanks!

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Perform operations optionally according to argument given to make call

2009-11-04 Thread Olivier Pierard
Hi,

I would like to perform some operations (typically search for packages,
add include dir and library) only for a given argument to the make call,
not in all the cases.  Typically, if I call 'make gui', the search has
to be done.  I don't want the general include_directories polluted by
this particular case.

Thanks,

Olivier
___
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 define an 'include_directories' different for each library

2009-11-04 Thread Olivier Pierard
Hi,

A quite basic question...

In a given project, I build several libraries and an executable.  How
can I get a different 'include_directories' for each library and not the
same list for all of them (typically, I don't want to have access to the
includes related to the last library when compiling the first one).

Thank you,

Olivier


___
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] simple ctest

2009-11-04 Thread th . tom
> What version of ctest? What OS?
I am actually working on Windows XP with ctest version 2.6-patch 4

I changed over to learn the windows batch a bit and I created a short script to 
do the work, for some things I planed to integrate into ctest.

The rest works like a charm (configuring, building, reporting, packaging etc)

I am not sure about the status of ctest scripting - is it widely use?  

-tom

PS: @David, sorry for the double post
>
> i.e. : what is the output of:
> ctest --version
> which ctest
>
>
> On Wed, Nov 4, 2009 at 7:23 AM,  wrote:
>
> > I did the following steps:
> >
> > 1) creating script.cmake:
> > SET ( SOURCE_DIR "C:/my/sources/" )
> > SET ( CTEST_BINARY_DIRECTORY ${SOURCE_DIR}/build )
> > SET ( CTEST_SOURCE_DIRECTORY ${SOURCE_DIR} )
> >
> > MESSAGE ( "Actual path is ${CTEST_SOURCE_DIRECTORY}" )
> > MESSAGE ( "Actual binary path is ${CTEST_BINARY_DIRECTORY}" )
> >
> > CTEST_START ( Nightly )
> > CTEST_CONFIGURE ( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res )
> > CTEST_BUILD ( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res )
> > CTEST_SUBMIT ( RETURN_VALUE res )
> >
> > Then I start
> > ctest -S script.cmake
> >
> > Then I got a wiered output:
> > Actual path is C:/my/sources/
> > Actual binary path is C:/my/sources/build
> > Actual path is C:/my/sources/
> > Actual binary path is C:/my/sources/build
> > Actual path is C:/my/sources/
> > Actual binary path is C:/my/sources/build
> > Actual path is C:/my/sources/
> > Actual binary path is C:/my/sources/build
> > Actual path is C:/my/sources/
> > Actual binary path is C:/my/sources/build
> > Actual path is C:/my/sources/
> > Actual binary path is C:/my/sources/build
> > Actual path is C:/my/sources/
> > Actual binary path is C:/my/sources/build
> > ...
> >
> > Then I delete the two output lines and start ctest again
> >
> > The output is the same!!! As if the script has not been changed
> > I deleted the Testing directory - but no change
> >
> > What is going wrong here?
> >
> > - Tom
___
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] LINK_FLAGS_ bug in Xcode Generator in CVS 2.8 branch and head branch

2009-11-04 Thread Steven Wilson
You can find this issue at bug #9841.

Thanks,

Steve

On Wed, Nov 4, 2009 at 7:12 AM, Brad King  wrote:

> Steven Wilson wrote:
>
>> CMake is ignoring the LINK_FLAGS_ settings for
>> set_target_properties() when using the Xcode generator in the 2.8 branch and
>> the head branch.
>>
>
> It looks like the implementation is just plain missing from that
> generator.  Please submit a bug report here:
>
>  http://www.cmake.org/Bug
>
> and send me the issue number.
>
> Thanks,
> -Brad
>
___
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 define an 'include_directories' different for each library

2009-11-04 Thread Will Dicharry

On 11/04/2009 08:39 AM, Olivier Pierard wrote:

Hi,

A quite basic question...

In a given project, I build several libraries and an executable.  How
can I get a different 'include_directories' for each library and not the
same list for all of them (typically, I don't want to have access to the
includes related to the last library when compiling the first one).
   


As far as I know, the only way to do this is to encapsulate each library 
in a subdirectory and make the include_directories call from the 
CMakeLists that is local to that directory.  In that case, the call will 
not affect the sibling directories.  Will this work for you?  Perhaps 
someone else on the list that is more knowledgeable than I can offer an 
alternative solution.


-- Will


Thank you,

Olivier


___
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
   





smime.p7s
Description: S/MIME Cryptographic Signature
___
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] FindBoost: FIND_PACKAGE ( Boost COMPONENTS filesystem )

2009-11-04 Thread Philip Lowman
Mathieu,

It's a nice idea, but given that Boost could make any one of its libraries
dependent on "system" at any time they want in the future (and for all I
know there are others already dependent on it, besides wave and filesystem),
I'd rather the user be responsible for adding "system" manually.  It's not
too hard to figure this out from the link errors.

On Nov 4, 2009 9:40 AM, "Mathieu Malaterre" 
wrote:

Philip,

 I guess I was not very clear in my previous email. But here is my
proposed change:

@@ -322,8 +322,14 @@
  if(Boost_VERSION AND Boost_FIND_COMPONENTS)
 math(EXPR _boost_maj "${Boost_VERSION} / 10")
 math(EXPR _boost_min "${Boost_VERSION} / 100 % 1000")
- if(${_boost_maj}.${_boost_min} VERSION_LESS 1.35)
-   list(REMOVE_ITEM Boost_FIND_COMPONENTS system)
+ if(${_boost_maj}.${_boost_min} VERSION_GREATER 1.34)
+   # when use asked for filesystem or wave, automatically add
+   # system to the list of components
+   list(FIND Boost_FIND_COMPONENTS filesystem v1)
+   list(FIND Boost_FIND_COMPONENTS wave v2)
+   if(v1 OR v2)
+ list(APPEND Boost_FIND_COMPONENTS system)
+   endif(v1 OR v2)
 endif()
  endif()


Therefore calling

FIND_PACKAGE ( Boost COMPONENTS filesystem REQUIRED)
will work on boost 1.34 and boost > 1.34

Comments ?

On Tue, Nov 3, 2009 at 3:20 PM, Mathieu Malaterre

 wrote: > The way I see it to address is that
'system' is an internal d...
--
Mathieu
___
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] simple ctest

2009-11-04 Thread Bill Hoffman

th@gmx.de wrote:

What version of ctest? What OS?

I am actually working on Windows XP with ctest version 2.6-patch 4

I changed over to learn the windows batch a bit and I created a short script to 
do the work, for some things I planed to integrate into ctest.

The rest works like a charm (configuring, building, reporting, packaging etc)

I am not sure about the status of ctest scripting - is it widely use?  



It is widely used at Kitware and other sites.  I am really confused by 
your output...   If you remove a message command the message stays? 
That just can not  happen.  I would like to see the exact steps you are 
taking to be able to reproduce your problem.  Perhaps if you post a 
script and give the commands to reproduce I could figure it out.


-Bill
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to define an 'include_directories' different for each library

2009-11-04 Thread Steven Wilson
There is no magic way to do this with CMake.   However, if you don't mind
writing some functions/macros you can use a variant of the following
function to do what you want:

function(build_library NAME KIND SOURCES DEFINITIONS CFLAGS LFLAGS LIBS
IPATHS LPATHS)
unset(MYCOMPILE_FLAGS)
unset(MYLINK_FLAGS)

set(MYCOMPILE_FLAGS "${CFLAGS}")
set(MYLINK_FLAGS "${LFLAGS}")

if(UNIX)
foreach(IPATH ${IPATHS})
set(MYCOMPILE_FLAGS "${MYCOMPILE_FLAGS} -I${IPATH}")
endforeach(IPATH)

foreach(LPATH ${LPATHS})
set(MYLINK_FLAGS "${MYLINK_FLAGS} -L${LPATH}")
endforeach(LPATH)
elseif(WIN32)
foreach(IPATH ${IPATHS})
set(MYCOMPILE_FLAGS "${MYCOMPILE_FLAGS} /I${IPATH}")
endforeach(IPATH)

foreach(LPATH ${LPATHS})
set(MYLINK_FLAGS "${MYLINK_FLAGS} /LIBPATH:\"${LPATH}\"")
endforeach(LPATH)
endif(UNIX)

add_library(${NAME} ${KIND} ${SOURCES})

target_link_libraries(${NAME} ${LIBS})

set_target_properties(${NAME} PROPERTIES
COMPILE_DEFINITIONS "${DEFINITIONS}"
COMPILE_FLAGS "${MYCOMPILE_FLAGS}"
LINK_FLAGS "${MYLINK_FLAGS}"
)
endfunction(build_library)


This function build_library is designed to allow you to pass target specific
configurations where includes/etc are different for each target.  You assign
the includes/defintions/etc to variables and then pass the values as
follows:

build_library(foo STATIC
 "${FOO_SOURCES}"
 "${FOO_COMPILE_DEFINITIONS}"
 "${FOO_COMPILE_FLAGS}"
 "${FOO_LINK_FLAGS}"
 "${FOO_LIBS}"
 "${FOO_INCLUDE_DIRECTORIES}"
 "${FOO_LINK_DIRECTORIES}"
)

The sources, compile definitions, libraries, include directories and link
directories variables should all be lists of values while the compile flags
and the link flags should be strings of compiler/linker flags.  The second
argument of the function sets the kind of library, STATIC/SHARED/etc...

This function then 'hacks' the include directories into the compiler flags
and the link directories into the link flags with the appropriate command
line escape by platform (-I for Unix, /I for Windows, etc...).

Hope this helps,

Steve

On Wed, Nov 4, 2009 at 8:39 AM, Olivier Pierard
wrote:

> Hi,
>
> A quite basic question...
>
> In a given project, I build several libraries and an executable.  How
> can I get a different 'include_directories' for each library and not the
> same list for all of them (typically, I don't want to have access to the
> includes related to the last library when compiling the first one).
>
> Thank you,
>
> Olivier
>
>
> ___
> 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] simple ctest

2009-11-04 Thread Mathieu Malaterre
On Wed, Nov 4, 2009 at 4:52 PM,   wrote:
> I changed over to learn the windows batch a bit and I created a short script 
> to do the work, for some things I planed to integrate into ctest.
>
> The rest works like a charm (configuring, building, reporting, packaging etc)
>
> I am not sure about the status of ctest scripting - is it widely use?

I gave up one time and used shell script.
Now I am stuck with this shell script and being forced to install
cygwin just to be able to execute this shell script, while if I had
taken the time it could be writen using ctest and be portable. You'll
have the same problem when you'll start doing stuff on *nix platform
and your batch file will be duplicated in some kind of shell script.

2cts
-- 
Mathieu
___
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] FindBoost: FIND_PACKAGE ( Boost COMPONENTS filesystem )

2009-11-04 Thread Marcel Loose
Hi Philip,

I've been following this thread with interest. Your solution puts the
burden on the (ignorant) end-user's shoulders. How is that poor
developer going to solve the pre/post version 1.34 issue, which is a
Boost-internal issue? In an ideal world, Boost would provide the
FindBoost.cmake file, or would generate the BoostConfig.cmake file.

Anyway, IMHO this really should be solved in FindBoost.cmake. One
possible way to make maintenance less of a burden is to define Boost's
(version-dependent) inter-dependencies once in FindBoost.cmake and let
the macro resolve these dependencies. Something like:

set(Boost_filesystem_DEPENDENCIES)
set(Boost_wave_DEPENDENCIES)
set(Boost_serialization_DEPENDENCIES filesystem)   # Just assuming
# Assume filesystem depends on system for Boost > 1.34
if(${_boost_maj}.${_boost_min} VERSION_GREATER 1.34)
  list(APPEND Boost_filesystem_DEPENDENCIES system)
endif()
# Assume wave depends on system for Boost > 1.36
if(${_boost_maj}.${_boost_min} VERSION_GREATER 1.36)
  list(APPEND Boost_wave_DEPENDENCIES system)
endif()

Does that make any sense?

Best regards,
Marcel Loose.

On Wed, 2009-11-04 at 11:14 -0500, Philip Lowman wrote:
> Mathieu, 
> 
> It's a nice idea, but given that Boost could make any one of its
> libraries dependent on "system" at any time they want in the future
> (and for all I know there are others already dependent on it, besides
> wave and filesystem), I'd rather the user be responsible for adding
> "system" manually.  It's not too hard to figure this out from the link
> errors. 
> 
> > On Nov 4, 2009 9:40 AM, "Mathieu Malaterre"
> >  wrote:
> > 
> > Philip,
> > 
> >  I guess I was not very clear in my previous email. But here is my
> > proposed change:
> > 
> > @@ -322,8 +322,14 @@
> >   if(Boost_VERSION AND Boost_FIND_COMPONENTS)
> >  math(EXPR _boost_maj "${Boost_VERSION} / 10")
> >  math(EXPR _boost_min "${Boost_VERSION} / 100 % 1000")
> > - if(${_boost_maj}.${_boost_min} VERSION_LESS 1.35)
> > -   list(REMOVE_ITEM Boost_FIND_COMPONENTS system)
> > + if(${_boost_maj}.${_boost_min} VERSION_GREATER 1.34)
> > +   # when use asked for filesystem or wave, automatically add
> > +   # system to the list of components
> > +   list(FIND Boost_FIND_COMPONENTS filesystem v1)
> > +   list(FIND Boost_FIND_COMPONENTS wave v2)
> > +   if(v1 OR v2)
> > + list(APPEND Boost_FIND_COMPONENTS system)
> > +   endif(v1 OR v2)
> >  endif()
> >   endif()
> > 
> > 
> > Therefore calling
> > 
> > 
> > FIND_PACKAGE ( Boost COMPONENTS filesystem REQUIRED)
> > 
> > will work on boost 1.34 and boost > 1.34
> > 
> > Comments ?
> > 
> > On Tue, Nov 3, 2009 at 3:20 PM, Mathieu Malaterre
> > 
> > 
> >  wrote: > The way I see it to address
> > is that 'system' is an internal d...
> > 
> > --
> > Mathieu
> 
> ___
> 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] simple ctest

2009-11-04 Thread S Roderick

On Nov 4, 2009, at 11:43 AM, Mathieu Malaterre wrote:


On Wed, Nov 4, 2009 at 4:52 PM,   wrote:
I changed over to learn the windows batch a bit and I created a  
short script to do the work, for some things I planed to integrate  
into ctest.


The rest works like a charm (configuring, building, reporting,  
packaging etc)


I am not sure about the status of ctest scripting - is it widely use?


I gave up one time and used shell script.
Now I am stuck with this shell script and being forced to install
cygwin just to be able to execute this shell script, while if I had
taken the time it could be writen using ctest and be portable. You'll
have the same problem when you'll start doing stuff on *nix platform
and your batch file will be duplicated in some kind of shell script.

2cts
--
Mathieu


Ditto here. Take the time to use CTest scripts ...

My 2c.
Stephen

___
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] installing/overwriting single file

2009-11-04 Thread Randy Heiland
During an 'install', I would like to copy/overwrite a source file to a  
destination file.  How?  Something like the following (in syntax),  
although I am assuming that it is only legal to copy a file into a dir  
(and therefore the 'foo.cxx' isn't allow)?


INSTALL(FILES
${CMAKE_SOURCE_DIR}/foo_new.cxx
DESTINATION ${CMAKE_INSTALL_PREFIX}/foo.cxx
)

thanks, Randy___
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] installing/overwriting single file

2009-11-04 Thread Dixon, Shane
I think you could add foo_new.cxx to a target and do something like this:
 
SET_TARGET_PROPERTIES( MyFoo PROPERTIES
  OUTPUT_NAME "foo.cxx" )
INSTALL( TARGET MyFoo )
 
I don't think you need the destination if you're just installing to 
${CMAKE_PREFIX_PATH}, but I could be wrong.
 
Another option might be to copy the foo_new.cxx to the binary directory using 
configure_file and then install from there.  I've done that before and it works.
 
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/foo_new.cxx ${CMAKE_BINARY_DIR}/foo.cxx 
COPY_ONLY )
INSTALL( FILES ${CMAKE_BINARY_DIR}/foo.cxx )


--
Shane Dixon
Linux Engineer
Atmel Corporation



 



From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
Randy Heiland
Sent: Wednesday, November 04, 2009 11:19 AM
To: cmake@cmake.org
Subject: [CMake] installing/overwriting single file


During an 'install', I would like to copy/overwrite a source file to a 
destination file.  How?  Something like the following (in syntax), although I 
am assuming that it is only legal to copy a file into a dir (and therefore the 
'foo.cxx' isn't allow)? 

INSTALL(FILES  
${CMAKE_SOURCE_DIR}/foo_new.cxx
DESTINATION ${CMAKE_INSTALL_PREFIX}/foo.cxx
)

thanks, Randy
___
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] find_package is fantastic

2009-11-04 Thread Brad King
Mathieu Malaterre wrote:
> Just wanted to say : great job on the find_package interface !

Thanks!

> This is extremely convenient to use for package using cmake as build package.
> All I had to do is configure a *Config.cmake and a
> *ConfigVersion.cmake file. And then from the outside I can simply
> find_package(MyPackage HINTS $ENV{MyPackage_ROOT})
> 
> -> No need to write a FindMyPackage.cmake
> -> *Congif.cmake files are auto-magically found
> -> Version is automatically taken into account.
> -> I can easily configure/build, thanks to a simple env var.

FYI, you don't actually need the HINTS option either.
Just set CMAKE_PREFIX_PATH in your environment to point
at the installation prefix (or even the build tree).

You can also set the env var MyPacakage_DIR and it will be used
automatically.  I've just committed documentation and testing
for this old but previously un-advertised feature.

-Brad


Document and test find_package _DIR env var
/cvsroot/CMake/CMake/Source/cmFindPackageCommand.cxx,v  <--  
Source/cmFindPackageCommand.cxx
new revision: 1.67; previous revision: 1.66
/cvsroot/CMake/CMake/Tests/FindPackageTest/CMakeLists.txt,v  <--  
Tests/FindPackageTest/CMakeLists.txt
new revision: 1.20; previous revision: 1.19

___
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] find_package is fantastic

2009-11-04 Thread Mathieu Malaterre
On Wed, Nov 4, 2009 at 7:30 PM, Brad King  wrote:
> FYI, you don't actually need the HINTS option either.
> Just set CMAKE_PREFIX_PATH in your environment to point
> at the installation prefix (or even the build tree).
>
> You can also set the env var MyPacakage_DIR and it will be used
> automatically.  I've just committed documentation and testing
> for this old but previously un-advertised feature.

This is even simplier !

Speaking of missing documentation, there may be a general confusion
due to some case-insensive cmake module. When one look at
FindLibXml2.cmake, which sets LIBXML2_LIBRARIES / LIBXML2_INCLUDE_DIR,
people may think that
setting MyPackage_DIR is equivalent to setting MYPACKAGE_DIR. This is
not the case and for example:

  find_package(CaSeSeNsItiVe)

will actually look for CaSeSeNsItiVeConfig.cmake and one has to set
CaSeSeNsItiVe_DIR.

2cts
-- 
Mathieu
___
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] FindBoost: FIND_PACKAGE ( Boost COMPONENTS filesystem )

2009-11-04 Thread Philip Lowman
Personally, I think FindBoost is complex enough without having to  also keep
track of boost's internal dependencies as well.  Maybe things would be
better if the boost people published this info with every release.

If you'd like to check in support for the feature and volunteer to maintain
it, however, that's fine by me.  It would make so much more sense to do
within Boost itself,  though.

On Nov 4, 2009 11:54 AM, "Marcel Loose"  wrote:

Hi Philip,

I've been following this thread with interest. Your solution puts the
burden on the (ignorant) end-user's shoulders. How is that poor
developer going to solve the pre/post version 1.34 issue, which is a
Boost-internal issue? In an ideal world, Boost would provide the
FindBoost.cmake file, or would generate the BoostConfig.cmake file.

Anyway, IMHO this really should be solved in FindBoost.cmake. One
possible way to make maintenance less of a burden is to define Boost's
(version-dependent) inter-dependencies once in FindBoost.cmake and let
the macro resolve these dependencies. Something like:

set(Boost_filesystem_DEPENDENCIES)
set(Boost_wave_DEPENDENCIES)
set(Boost_serialization_DEPENDENCIES filesystem)   # Just assuming
# Assume filesystem depends on system for Boost > 1.34

if(${_boost_maj}.${_boost_min} VERSION_GREATER 1.34)
 list(APPEND Boost_filesystem_DEPENDENCIES system)
endif()
# Assume wave depends on system for Boost > 1.36
if(${_boost_maj}.${_boost_min} VERSION_GREATER 1.36)
 list(APPEND Boost_wave_DEPENDENCIES system)
endif()

Does that make any sense?

Best regards,
Marcel Loose.

On Wed, 2009-11-04 at 11:14 -0500, Philip Lowman wrote: > Mathieu, > > It's
a nice idea, but give...

> ___ > Powered by
www.kitware.com > > Visit other Kitw...
___
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] FindBoost: FIND_PACKAGE ( Boost COMPONENTS filesystem )

2009-11-04 Thread Mathieu Malaterre
On Wed, Nov 4, 2009 at 7:50 PM, Philip Lowman  wrote:
> Personally, I think FindBoost is complex enough without having to  also keep
> track of boost's internal dependencies as well.  Maybe things would be
> better if the boost people published this info with every release.

I understand your point. Thanks for maintaining this module.

> If you'd like to check in support for the feature and volunteer to maintain
> it, however, that's fine by me.  It would make so much more sense to do
> within Boost itself,  though.

Yup, using cmake this would be trivial:

ADD_LIBRARY(filesystem ${filesystem_SRCS})
SET_TARGET_PROPERTIES(filesystem LINK_INTERFACE_LIBRARIES "system")

If only those people could ditch, this bjam based build system and
start using the cmake one...

-- 
Mathieu
___
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] FindBoost: FIND_PACKAGE ( Boost COMPONENTS filesystem )

2009-11-04 Thread Michael Jackson


On Nov 4, 2009, at 1:57 PM, Mathieu Malaterre wrote:


On Wed, Nov 4, 2009 at 7:50 PM, Philip Lowman  wrote:
Personally, I think FindBoost is complex enough without having to   
also keep
track of boost's internal dependencies as well.  Maybe things would  
be

better if the boost people published this info with every release.


I understand your point. Thanks for maintaining this module.

If you'd like to check in support for the feature and volunteer to  
maintain
it, however, that's fine by me.  It would make so much more sense  
to do

within Boost itself,  though.


Yup, using cmake this would be trivial:

ADD_LIBRARY(filesystem ${filesystem_SRCS})
SET_TARGET_PROPERTIES(filesystem LINK_INTERFACE_LIBRARIES "system")

If only those people could ditch, this bjam based build system and
start using the cmake one...

--
Mathieu


Actually.. there is a grass-roots effort to add on a CMake build  
system to boost. There is currently a git repo for Boost 1.40.0 and  
1.41.0 that has a CMake build system and is starting to produce the  
needed *.cmake files. There is an active discussion on the boost-cmake  
mailing list in the past few days on just this topic.


Start here

http://lists.boost.org/boost-cmake/2009/10/0710.php

Mike Jackson

___
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] Running custom command before executing test

2009-11-04 Thread Mohit Aron
Hello,

I'm trying to figure out how to run a custom command before a test is
executed by ctest. Looking at the manual, searching on Google etc have
been futile so far. So I'm posting on this list for help.

Assume I have two test sources that lie at:

/home/user/workspace/path1/test/test1.cc
/home/user/workspace/path2/test/test2.cc

When these tests are run, I'd like to execute a custom command just before
running the test - the command depends on the path of the test. For example,
before running test1, I'd like to execute:

mkdir -p /home/user/workspace/testoutput/path1/test

The idea is to instruct the test to place its temporary files in that
directory. I can pass the path of the above output directory as an
argument to the test (in add_test()). However, I don't know how to
execute the custom mkdir command above. That is, how to modify
CMakeLists.txt so that it automatically generates the custom command
when one runs 'make test'.

I can run the custom command from within the test, but that's really
suboptimal as it has to be repeated for all the tests.

I'd appreciate help on how to do this.


- Mohit
___
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] installing/overwriting single file

2009-11-04 Thread Alexander Neundorf
On Wednesday 04 November 2009, Randy Heiland wrote:
> During an 'install', I would like to copy/overwrite a source file to a
> destination file.  How?  Something like the following (in syntax),
> although I am assuming that it is only legal to copy a file into a dir
> (and therefore the 'foo.cxx' isn't allow)?
>
>   INSTALL(FILES
>   ${CMAKE_SOURCE_DIR}/foo_new.cxx
>   DESTINATION ${CMAKE_INSTALL_PREFIX}/foo.cxx
>   )

Does 
INSTALL(FILES ${CMAKE_SOURCE_DIR}/foo_new.cxx
DESTINATION ${CMAKE_INSTALL_PREFIX}
RENAME foo.cxx)

do what you want ?

Alex
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Nmake verbose=1 gives no valuable output for cl.exe

2009-11-04 Thread Dixon, Shane
I added a definition using 

SET_TARGET_PROPERTIES( MyProjDLL-sw PROPERTIES
COMPILE_FLAGS "-DEMULATION_MODE" )

I tried to use "nmake verbose=1 MyProjDLL-sw" to watch the command-line come by 
and verify it had the right definition, but all I get is this:

C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe  
@C:\DOCUME~1\SHANE~1.DIX\LOCALS~1\Temp\nm54B2.tmp
myprojdll.c

Do I have a command-line that's too long so it has to be put into a .tmp file?  
I can't find the file after the run so I'm assuming it gets deleted.  How can I 
see what's getting passed to cl.exe?

--
Shane Dixon
Linux Engineer
Atmel Corporation 

___
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] installing/overwriting single file

2009-11-04 Thread Randy Heiland
That does indeed work great - thanks!  If anyone knows if this  
solution is dependent on a recent cmake version, I'd welcome hearing  
about it.  I happen to be using 2.8rc3, but would like to know if it  
might cause problems for earlier versions.


-Randy

On Nov 4, 2009, at 4:07 PM, Alexander Neundorf wrote:


On Wednesday 04 November 2009, Randy Heiland wrote:
During an 'install', I would like to copy/overwrite a source file  
to a

destination file.  How?  Something like the following (in syntax),
although I am assuming that it is only legal to copy a file into a  
dir

(and therefore the 'foo.cxx' isn't allow)?

INSTALL(FILES
${CMAKE_SOURCE_DIR}/foo_new.cxx
DESTINATION ${CMAKE_INSTALL_PREFIX}/foo.cxx
)


Does
INSTALL(FILES ${CMAKE_SOURCE_DIR}/foo_new.cxx
   DESTINATION ${CMAKE_INSTALL_PREFIX}
   RENAME foo.cxx)

do what you want ?

Alex
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


___
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] FindXXX.cmake...or finding stuff semi-reliably on Windows

2009-11-04 Thread Lucas Thode
N00by question: How do you make a FindXXX.cmake file that can find XXX even
semi-reliably on Windows?  I wrote a bunch of 'em which work just fine on
Linux, but don't seem to work so well on Windows boxes...

--Lucas
___
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] Nmake verbose=1 gives no valuable output for cl.exe

2009-11-04 Thread David Cole
In the bottom of Modules/Platform/Windows.cmake:

# uncomment these out to debug nmake and borland makefiles
#SET(CMAKE_START_TEMP_FILE "")
#SET(CMAKE_END_TEMP_FILE "")
#SET(CMAKE_VERBOSE_MAKEFILE 1)

Uncomment those three SET lines to see verbose nmake output...


HTH,
David


On Wed, Nov 4, 2009 at 5:07 PM, Dixon, Shane  wrote:

> I added a definition using
>
> SET_TARGET_PROPERTIES( MyProjDLL-sw PROPERTIES
>COMPILE_FLAGS "-DEMULATION_MODE" )
>
> I tried to use "nmake verbose=1 MyProjDLL-sw" to watch the command-line
> come by and verify it had the right definition, but all I get is this:
>
> C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe
>  @C:\DOCUME~1\SHANE~1.DIX\LOCALS~1\Temp\nm54B2.tmp
> myprojdll.c
>
> Do I have a command-line that's too long so it has to be put into a .tmp
> file?  I can't find the file after the run so I'm assuming it gets deleted.
>  How can I see what's getting passed to cl.exe?
>
> --
> Shane Dixon
> Linux Engineer
> Atmel Corporation
>
> ___
> 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] Nmake verbose=1 gives no valuable output for cl.exe

2009-11-04 Thread Dixon, Shane
Is this a recent change?  I don't recall having to do anything like that 
before?  I'm running latest RC5.  Isn't this the kind of behavior that 
verbose=1 should set by default?  What's verbose about it if all the 
command-line options are obscured from the user in .tmp files that disappear?

--
Shane Dixon
Linux Engineer
Atmel Corporation



 



From: David Cole [mailto:david.c...@kitware.com] 
Sent: Wednesday, November 04, 2009 3:37 PM
To: Dixon, Shane
Cc: cmake@cmake.org
Subject: Re: [CMake] Nmake verbose=1 gives no valuable output for cl.exe


In the bottom of Modules/Platform/Windows.cmake:

# uncomment these out to debug nmake and borland makefiles
#SET(CMAKE_START_TEMP_FILE "")
#SET(CMAKE_END_TEMP_FILE "")
#SET(CMAKE_VERBOSE_MAKEFILE 1)

Uncomment those three SET lines to see verbose nmake output...


HTH,
David



On Wed, Nov 4, 2009 at 5:07 PM, Dixon, Shane  wrote:


I added a definition using

SET_TARGET_PROPERTIES( MyProjDLL-sw PROPERTIES
   COMPILE_FLAGS "-DEMULATION_MODE" )

I tried to use "nmake verbose=1 MyProjDLL-sw" to watch the command-line 
come by and verify it had the right definition, but all I get is this:

C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe  
@C:\DOCUME~1\SHANE~1.DIX\LOCALS~1\Temp\nm54B2.tmp
myprojdll.c

Do I have a command-line that's too long so it has to be put into a 
.tmp file?  I can't find the file after the run so I'm assuming it gets 
deleted.  How can I see what's getting passed to cl.exe?

--
Shane Dixon
Linux Engineer
Atmel Corporation

___
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] Nmake verbose=1 gives no valuable output for cl.exe

2009-11-04 Thread David Cole
Not really recent. It was put in place to eliminate the "command line too
long" problem on Windows. It only applies to Windows nmake and Borland make
builds.

According to cvs annotate, it's been that way in that file since revision
1.3 in Aug. 2003


On Wed, Nov 4, 2009 at 5:44 PM, Dixon, Shane  wrote:

>  Is this a recent change?  I don't recall having to do anything like that
> before?  I'm running latest RC5.  Isn't this the kind of behavior that
> verbose=1 should set by default?  What's verbose about it if all the
> command-line options are obscured from the user in .tmp files that
> disappear?
>
> --
> Shane Dixon
> Linux Engineer
> Atmel Corporation
>
>
>
>  --
> *From:* David Cole [mailto:david.c...@kitware.com]
> *Sent:* Wednesday, November 04, 2009 3:37 PM
> *To:* Dixon, Shane
> *Cc:* cmake@cmake.org
> *Subject:* Re: [CMake] Nmake verbose=1 gives no valuable output for cl.exe
>
> In the bottom of Modules/Platform/Windows.cmake:
>
> # uncomment these out to debug nmake and borland makefiles
> #SET(CMAKE_START_TEMP_FILE "")
> #SET(CMAKE_END_TEMP_FILE "")
> #SET(CMAKE_VERBOSE_MAKEFILE 1)
>
> Uncomment those three SET lines to see verbose nmake output...
>
>
> HTH,
> David
>
>
> On Wed, Nov 4, 2009 at 5:07 PM, Dixon, Shane wrote:
>
>> I added a definition using
>>
>> SET_TARGET_PROPERTIES( MyProjDLL-sw PROPERTIES
>>COMPILE_FLAGS "-DEMULATION_MODE" )
>>
>> I tried to use "nmake verbose=1 MyProjDLL-sw" to watch the command-line
>> come by and verify it had the right definition, but all I get is this:
>>
>> C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe
>>  @C:\DOCUME~1\SHANE~1.DIX\LOCALS~1\Temp\nm54B2.tmp
>> myprojdll.c
>>
>> Do I have a command-line that's too long so it has to be put into a .tmp
>> file?  I can't find the file after the run so I'm assuming it gets deleted.
>>  How can I see what's getting passed to cl.exe?
>>
>> --
>> Shane Dixon
>> Linux Engineer
>> Atmel Corporation
>>
>> ___
>> 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