Re: [CMake] cross g++ linking shared instead of static libgcc

2011-01-12 Thread Hendrik Sattler
Am Donnerstag, 13. Januar 2011, 02:10:12 schrieb Darren Hollenbeck:
> I am using CMake to cross compile with an arm toolchain and getting a
> linker error:
> undefined reference to `__sync_fetch_and_add_4'
> 
> the toolchain has both a shared and static libgcc:
> ./lib/gcc/arm-linux-gnueabi/4.5.2/libgcc.a
> ./lib/gcc/arm-linux-gnueabi/4.5.2/libgcc_eh.a
> ./arm-linux-gnueabi/lib/libgcc_s.so.1
> ./arm-linux-gnueabi/lib/libgcc_s.so
> 
> the path for both is in the linker directories (from CMakeCXXCompiler.cmake
> generated in the build directory/CMakeFiles), but the path for the static
> is first:
> SET(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES
> "/opt/gatecraft/arm/lib/gcc/arm-linux-gnueabi/4.5.2;/opt/gatecraft/arm/arm-
> linux-gnueabi/lib;/opt/gatecraft/arm/arm-linux-gnueabi/usr/lib")

Does this matter? No, the libraries have differen names!

> The libraries are not the same, the .so does not have the symbol the linker
> is complaining about but the .a does (I inspected this with nm). What I
> can't figure out is why I can switch the CMAKE_CXX_COMPILER defined in my
> toolchain file to another toolchain (with the same shared/static and linker
> path order) - keeping everything else the same - and the build succeeds. I
> can't find any significant difference in anything in the build directory
> between the two, yet one will link libgcc.a (and therefore works) and the
> other won't (and gives the error above).
> 
> I found that I have a work-around by forcing -static-libgcc in the linker
> flags, but this doesn't explain why it works without this change when I
> switch the compiler to the other toolchain.
> 
> 
> Anyone able to explain the discrepancy here and offer a fix?

You probably have different defaults (by gcc configure flags) for code 
generation. Anyway, this is a problem either with gcc itself, how you 
configured it or a problem with use a atomic operations in your code.
Totally unrelated to cmake.

HS
___
Powered by www.kitware.com

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

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

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


[CMake] cross g++ linking shared instead of static libgcc

2011-01-12 Thread Darren Hollenbeck
I am using CMake to cross compile with an arm toolchain and getting a linker
error:
undefined reference to `__sync_fetch_and_add_4'

the toolchain has both a shared and static libgcc:
./lib/gcc/arm-linux-gnueabi/4.5.2/libgcc.a
./lib/gcc/arm-linux-gnueabi/4.5.2/libgcc_eh.a
./arm-linux-gnueabi/lib/libgcc_s.so.1
./arm-linux-gnueabi/lib/libgcc_s.so

the path for both is in the linker directories (from CMakeCXXCompiler.cmake
generated in the build directory/CMakeFiles), but the path for the static is
first:
SET(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES
"/opt/gatecraft/arm/lib/gcc/arm-linux-gnueabi/4.5.2;/opt/gatecraft/arm/arm-linux-gnueabi/lib;/opt/gatecraft/arm/arm-linux-gnueabi/usr/lib")

The libraries are not the same, the .so does not have the symbol the linker
is complaining about but the .a does (I inspected this with nm). What I
can't figure out is why I can switch the CMAKE_CXX_COMPILER defined in my
toolchain file to another toolchain (with the same shared/static and linker
path order) - keeping everything else the same - and the build succeeds. I
can't find any significant difference in anything in the build directory
between the two, yet one will link libgcc.a (and therefore works) and the
other won't (and gives the error above).

I found that I have a work-around by forcing -static-libgcc in the linker
flags, but this doesn't explain why it works without this change when I
switch the compiler to the other toolchain.


Anyone able to explain the discrepancy here and offer a fix?
___
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] CHECK_INCLUDE_FILES ignores CMAKE_FIND_ROOT_PATH, but should it?

2011-01-12 Thread Bjørn Forsman
2011/1/10 Bjørn Forsman :
> Hi all,
>
> I just found out that CHECK_INCLUDE_FILES ignores CMAKE_FIND_ROOT_PATH. The
> documentation for CHECK_INCLUDE_FILES says:
>
>  ...
>  The following variables may be set before calling this macro  to
>  modify the way the check is run:
>
>    CMAKE_REQUIRED_FLAGS = string of compile command line flags
>    CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
>    CMAKE_REQUIRED_INCLUDES = list of include directories
>
> So it seems intentional. But wouldn't it make sense to let CHECK_INCLUDE_FILES
> look in CMAKE_FIND_ROOT_PATH? Or maybe more precise, give the compiler include
> flags for CMAKE_FIND_ROOT_PATH/{include/,usr/include}? It just seems wrong to 
> me
> that include files in CMAKE_FIND_ROOT_PATH can be ignored like that and it
> destroys the meaning of CMAKE_FIND_ROOT_PATH. Comments?
>
> Is maybe CHECK_INCLUDE_FILES deprecated and FIND_PATH/FIND_FILE is the way
> to go?
>
> I'm using CMake 2.8.2.

Anyone?

I'll try rephrasing my question.
I'm trying to build the cdrkit package using CMAKE_FIND_ROOT_PATH:

SET(CMAKE_FIND_ROOT_PATH $ENV{STAGING_DIR})
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

cdrkit attempts to find sys/capability.h using CHECK_INCLUDE_FILES.
This fails, even though the header is in
$STAGING_DIR/usr/include/sys/capability.h.

So what is the Right Thing to do here? Change CHECK_INCLUDE_FILES
to also look in CMAKE_FIND_ROOT_PATH or change the cdkit CMakeLists.txt
file to use FIND_PATH instead?

I guess the latter should be pretty easy, but I'd hate to give up on
the idea that
CMake packages can be truly re-rooted simply by using CMAKE_FIND_ROOT_PATH.

Best regards,
Bjørn Forsman
___
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] InstallRequiredSystemLibraries.cmake

2011-01-12 Thread J Decker
This currently has no support for watcom's libraries, I'm working on
adding that in the same method basically that visual studio uses for
all of its versions; this is still in progress but I'll come up with
soemhting like a patch in abit.

While doing this I found that there is a bug with VS2010 support..

There is a reference of VC90 that should be VC100 for copying the
debug libraries.


line 135
  SET(MSVC10_CRT_DIR

"${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
  SET(__install__libs ${__install__libs}
"${MSVC10_CRT_DIR}/Microsoft.VC100.DebugCRT.manifest"
"${MSVC10_CRT_DIR}/msvcp100d.dll"
"${MSVC10_CRT_DIR}/msvcr100d.dll"
)

should be

  SET(MSVC10_CRT_DIR

"${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC100.DebugCRT")
  SET(__install__libs ${__install__libs}
"${MSVC10_CRT_DIR}/Microsoft.VC100.DebugCRT.manifest"
"${MSVC10_CRT_DIR}/msvcp100d.dll"
"${MSVC10_CRT_DIR}/msvcr100d.dll"
)
___
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] CPack and configure_file

2011-01-12 Thread Eric Noulard
2011/1/12 Tobias Ellinghaus :
> Am Tuesday 11 January 2011 schrub Eric Noulard:
>
> [...]
>
>> in fact I think the "real" source for this is the fact the CPack lacks
>> the notion
>> of "EXTRA" distribution file which is available with autoconf, EXTRA_DIST
>> var
>> http://www.gnu.org/software/hello/manual/automake/Basics-of-Distribution.h
>> tml or the dist-hook:
>> http://www.gnu.org/software/hello/manual/automake/The-dist-Hook.html#The-di
>> st-Hook
>>
>> The fact is CPack doesn't know much about "source package" and
>> in fact it package source using the CPACK_INSTALLED_DIRECTORIES directory
>> list. (look at the generated CPackSourceConfig.cmake)
>>
>> I think you can "emulate" the extra thing of autoconf.
>> If you want ot package "more" than the source tree with
>> "package_source" you can try
>> the following in your main CMakeLists.txt (before include(CPack))
>>
>> SET(CPACK_SOURCE_INSTALLED_DIRECTORIES
>> "${CMAKE_SOURCE_DIR};/;${CMAKE_BINARY_DIR}/extra;/extra")
>>
>> then the content of the directory
>> ${CMAKE_BINARY_DIR}/extra will added in the package source archive
>> inside "extra" dir.
>>
>> it should work.
>
> It does indeed work perfectly IFF I don't add CMAKE_BINARY_DIR to
> CPACK_SOURCE_IGNORE_FILES which is needed when someone creates a folder (let's
> say "build/") inside of the source dir and runs cmake from this folder which
> seems to be quite wide spread.
>
> Is it possible to have CPack somehow give more authority to
> CPACK_SOURCE_INSTALLED_DIRECTORIES than CPACK_SOURCE_IGNORE_FILES?

None that I am aware of.
You'll have to tweak your regex in CPACK_SOURCE_IGNORE_FILES... or...
write the file outside the build tree [ugly of the ugly]

Like I said my proposal is a hack not a real feature :-(
A real feature for doing what you want is needed I think...


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


Re: [CMake] Clarification for quoting of parameters for "add_executable()"

2011-01-12 Thread SF Markus Elfring

What would you like it to print?


It depends on the syntax interpretation if the passed quoted parameter will be 
processed as a CMake list.


David Cole pointed it out to me that this is not the case if some data are 
enclosed by quotation marks.

http://public.kitware.com/Bug/view.php?id=11677#c24588

If I follow this view here, then I expect the following log display.

=>Alpha.cxx;/home/elfring/Projekte/CMake/Test/11677/source/Zulu.cxx<=
Configuring done
CMake Error at CMakeLists.txt:5 (add_executable):
  Cannot find source file 
"Alpha.cxx;/home/elfring/Projekte/CMake/Test/11677/source/Zulu.cxx".  Tried 
extensions .c .C .c++ .cc .cpp

  .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx

The wording of the error message shows an unchanged input parameter now.

Regards,
Markus
___
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 Digest, Vol 81, Issue 41

2011-01-12 Thread Allen D Byrne
OK, I got past my JNI issue (must set java version number) - except now I have 
a problem with the classpath for building the java files only on windows! On 
linux everyone's happy. On windows, using VS2008, the classpath in the project 
files have been converted from ';' to spaces? 

Any ideas?

Allen
> Date: Tue, 11 Jan 2011 12:38:09 +0100
> From: Andreas Schneider 
> Subject: [CMake] CMake Java Support
> To: cmake@cmake.org
> Cc: Bill Hoffman 
> Message-ID: <20110238.09236@redhat.com>
> Content-Type: Text/Plain;  charset="utf-8"
> 
> Hello CMake,
> 
> my name is Andreas Schneider and I'm working for Red Hat. At the end of last 
> year I've worked on Dogtag PKI [1]. The Dogtag Certificate System [2] is an 
> enterprise-class open source Certificate Authority.
> 
> The project is written in serveral different laguages (C, C++ and Java), so 
> I've used CMake as the new build system. To be able to build the java project 
> I needed Java support in CMake. So I've started to write functions to compile 
> java files, find jar files, bundle jar files and generate javadoc.
> 
> It should provide everything to build java and jni projects. You find the 
> files here:
> 
> http://git.cryptomilk.org/projects/cmake-tools.git/tree/language/java
> 
> 
> FindJNI.cmake:
> 
> Find JNI libraries and headers. I think this is the file from CMake
> itself.
> 
> FindJava.cmake:
> 
> Find all needed Java tools like javac, javadoc, jar, etc.
> 
> UseJava.cmake:
> 
> This file provides all needed function to support creating java
> projects in CMake. Most of the function are documented in detail.
> There is some documentation missing. I will add this soon.
> 
> UseJavaClassFilelist.cmake:
> 
> This is needed to find the class files in the build directory. One
> .java file can create multiple .class files. So you have to glob for
> these file. There is support to only look for certain .class files.
> 
> UseJavaSymlinks.cmake:
> 
> This is a helper to create symlinks for versioned jar files.
> 
> 
> git clone git://git.cryptomilk.org/projects/cmake-tools.git
> 
> 
> It would be nice if this would be included into the CMake distribution, but 
> at 
> the moment there is still documentation missing. I hope that this will help 
> some people to get their Java project built with CMake.
> 
> Comments, suggestions and patches are welcome!
> 
> Best regards,
> 
> 
> -- andreas
> 
> 
> [1] https://fedorahosted.org/pki/browser/trunk/pki
> [2] http://pki.fedoraproject.org/wiki/PKI_Main_Page
> 
> -- 
> Andreas Schneider   GPG-ID: 8B7EB4B8
> Red Hat   a...@redhat.com
> Samba Team a...@samba.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

Re: [CMake] Clarification for quoting of parameters for "add_executable()"

2011-01-12 Thread Bill Hoffman

On 1/12/2011 4:21 PM, SF Markus Elfring wrote:

I hope that the involved technical details can be better resolved in a
wider audience.


Now I would like to show a small script which demonstrates a specific
detail in the wording of an error message that I did not expect in this
way.

cmake_minimum_required(VERSION 2.6)
project(Bug11677)
set(MY_SOURCES "Alpha.cxx" "${Bug11677_SOURCE_DIR}/Zulu.cxx")
message(STATUS "=>${MY_SOURCES}<=")
add_executable(Bug11677 "${MY_SOURCES}")


Log result example for the build file generation try:

=>Alpha.cxx;/home/elfring/Projekte/CMake/Test/11677/source/Zulu.cxx<=
Configuring done
CMake Error at CMakeLists.txt:5 (add_executable):
Cannot find source file "Zulu.cxx". Tried extensions .c .C .c++ .cc .cpp
.cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx


elfr...@sonne:~/Projekte/CMake/Test/11677/source> ls -l
insgesamt 12
-rw-r--r-- 1 elfring users 130 10. Jan 22:37 Alpha.cxx
-rw-r--r-- 1 elfring users 198 12. Jan 21:46 CMakeLists.txt
-rw-r--r-- 1 elfring users 130 10. Jan 22:37 Zulu.cxx


How do you think about this situation?



What would you like it to print?


-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] Clarification for quoting of parameters for "add_executable()"

2011-01-12 Thread SF Markus Elfring

I hope that the involved technical details can be better resolved in a wider 
audience.


Now I would like to show a small script which demonstrates a specific detail in 
the wording of an error message that I did not expect in this way.


cmake_minimum_required(VERSION 2.6)
project(Bug11677)
set(MY_SOURCES "Alpha.cxx" "${Bug11677_SOURCE_DIR}/Zulu.cxx")
message(STATUS "=>${MY_SOURCES}<=")
add_executable(Bug11677 "${MY_SOURCES}")


Log result example for the build file generation try:

=>Alpha.cxx;/home/elfring/Projekte/CMake/Test/11677/source/Zulu.cxx<=
Configuring done
CMake Error at CMakeLists.txt:5 (add_executable):
  Cannot find source file "Zulu.cxx".  Tried extensions .c .C .c++ .cc .cpp
  .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx


elfr...@sonne:~/Projekte/CMake/Test/11677/source> ls -l
insgesamt 12
-rw-r--r-- 1 elfring users 130 10. Jan 22:37 Alpha.cxx
-rw-r--r-- 1 elfring users 198 12. Jan 21:46 CMakeLists.txt
-rw-r--r-- 1 elfring users 130 10. Jan 22:37 Zulu.cxx


How do you think about this situation?

Regards,
Markus
___
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 have a target depend on an External Project

2011-01-12 Thread David Cole
So add_dependencies should work for you.

Let us know if it's not working like you think it should...


On Wed, Jan 12, 2011 at 3:48 PM, kent williams wrote:

> Ironically the reason I want to make a target depend on an external
> project is that our top level project is already built as an
> ExternalProject for all the reasons that have been mentioned.
>
> I need a custom target to depend on THAT external project, just in the
> sense that I want it to be built only after my MAIN project is built.
> There's no chicken V egg problems -- my custom target is independent
> from that target at configure time. It just needs to happen after that
> ExternalProject is built successfully.
>
>
> On Wed, Jan 12, 2011 at 1:12 PM, David Cole 
> wrote:
> > add_dependencies does work to make sure that ExternalProject targets
> build
> > before internal targets, if you need that.
> > But, like Marcus said, you probably need the ExternalProject to be
> > configured and built before your own calls to find_package... so if you
> have
> > that chicken and egg problem, you should also build your project as an
> > ExternalProject.
> > Almost all of the projects I know of that are using ExternalProject are
> > producing a so-called "SuperBuild" of themselves, wherein all the targets
> of
> > the SuperBuild are ExternalProject_Add calls, and the last one is the
> > "project of interest."
> >
> > HTH,
> > David
> >
> > On Wed, Jan 12, 2011 at 2:09 PM, Allen D Byrne 
> wrote:
> >>
> >> While Marcus states what is likely the preferred way, I just added an
> >> ADD_DEPENDENCIES(internal_target external_target) statement that seems
> to
> >> always work?
> >>
> >> Allen
> >>
> >> > Date: Wed, 12 Jan 2011 13:23:52 -0500
> >>
> >> > From: "Marcus D. Hanwell" 
> >>
> >> > Subject: Re: [CMake] How to have a target depend on an External
> >>
> >> > Project
> >>
> >> > To: kent williams 
> >>
> >> > Cc: CMake ML 
> >>
> >> > Message-ID:
> >>
> >> > 
> >> > 
> >
> >>
> >> > Content-Type: text/plain; charset=ISO-8859-1
> >>
> >> >
> >>
> >> > On Wed, Jan 12, 2011 at 12:53 PM, kent williams
> >>
> >> >  wrote:
> >>
> >> > > For better or worse (mostly better) we are now heavy users of
> >>
> >> > > ExternalProject. ?That module works really well to pull in external
> >>
> >> > > dependencies and get them built.
> >>
> >> > >
> >>
> >> > > ExternalProject_add has a DEPENDS keyword that lets you specify
> >>
> >> > > dependencies on other External Projects. ?But an ExternalProject
> isn't
> >>
> >> > > an actual CMake target, so I can't figure out how to make a regular
> >>
> >> > > CMake target depend on an External Project.
> >>
> >> > >
> >>
> >> > > Suggestions?
> >>
> >> >
> >>
> >> > Don't mix external projects and real targets. An external project
> >>
> >> > dependency is different to a target dependency. When expressing
> >>
> >> > external project dependencies you are stating that this external
> >>
> >> > project needs these others to be built before it is even configured.
> >>
> >> >
> >>
> >> > With regular targets there is an assumption that the dependency is
> >>
> >> > part of the current build, and so CMake knows everything about it, or
> >>
> >> > it was already built. If you have Qt in an external project, and a Qt
> >>
> >> > based application depending on it, the find_package(Qt4) will fail
> >>
> >> > during initial configure, as there is no Qt built/installed.
> >>
> >> >
> >>
> >> > Instead you would normally have your own project as an external
> >>
> >> > project that depends on the others it requires to build. That way,
> >>
> >> > when your external project is configured the others will have been
> >>
> >> > built and therefore could be found.
> >>
> >> >
> >>
> >> > I hope that makes the mechanism a little clearer. You could take a
> >>
> >> > look at the Titan project as one example where we have many external
> >>
> >> > projects that we build, and the Libraries/Applications external
> >>
> >> > projects that depend upon them and use them.
> >>
> >> >
> >>
> >> > Marcus
> >>
> >> >
> >>
> >> ___
> >> 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 proje

Re: [CMake] How to have a target depend on an External Project

2011-01-12 Thread kent williams
Ironically the reason I want to make a target depend on an external
project is that our top level project is already built as an
ExternalProject for all the reasons that have been mentioned.

I need a custom target to depend on THAT external project, just in the
sense that I want it to be built only after my MAIN project is built.
There's no chicken V egg problems -- my custom target is independent
from that target at configure time. It just needs to happen after that
ExternalProject is built successfully.


On Wed, Jan 12, 2011 at 1:12 PM, David Cole  wrote:
> add_dependencies does work to make sure that ExternalProject targets build
> before internal targets, if you need that.
> But, like Marcus said, you probably need the ExternalProject to be
> configured and built before your own calls to find_package... so if you have
> that chicken and egg problem, you should also build your project as an
> ExternalProject.
> Almost all of the projects I know of that are using ExternalProject are
> producing a so-called "SuperBuild" of themselves, wherein all the targets of
> the SuperBuild are ExternalProject_Add calls, and the last one is the
> "project of interest."
>
> HTH,
> David
>
> On Wed, Jan 12, 2011 at 2:09 PM, Allen D Byrne  wrote:
>>
>> While Marcus states what is likely the preferred way, I just added an
>> ADD_DEPENDENCIES(internal_target external_target) statement that seems to
>> always work?
>>
>> Allen
>>
>> > Date: Wed, 12 Jan 2011 13:23:52 -0500
>>
>> > From: "Marcus D. Hanwell" 
>>
>> > Subject: Re: [CMake] How to have a target depend on an External
>>
>> > Project
>>
>> > To: kent williams 
>>
>> > Cc: CMake ML 
>>
>> > Message-ID:
>>
>> > 
>>
>> > Content-Type: text/plain; charset=ISO-8859-1
>>
>> >
>>
>> > On Wed, Jan 12, 2011 at 12:53 PM, kent williams
>>
>> >  wrote:
>>
>> > > For better or worse (mostly better) we are now heavy users of
>>
>> > > ExternalProject. ?That module works really well to pull in external
>>
>> > > dependencies and get them built.
>>
>> > >
>>
>> > > ExternalProject_add has a DEPENDS keyword that lets you specify
>>
>> > > dependencies on other External Projects. ?But an ExternalProject isn't
>>
>> > > an actual CMake target, so I can't figure out how to make a regular
>>
>> > > CMake target depend on an External Project.
>>
>> > >
>>
>> > > Suggestions?
>>
>> >
>>
>> > Don't mix external projects and real targets. An external project
>>
>> > dependency is different to a target dependency. When expressing
>>
>> > external project dependencies you are stating that this external
>>
>> > project needs these others to be built before it is even configured.
>>
>> >
>>
>> > With regular targets there is an assumption that the dependency is
>>
>> > part of the current build, and so CMake knows everything about it, or
>>
>> > it was already built. If you have Qt in an external project, and a Qt
>>
>> > based application depending on it, the find_package(Qt4) will fail
>>
>> > during initial configure, as there is no Qt built/installed.
>>
>> >
>>
>> > Instead you would normally have your own project as an external
>>
>> > project that depends on the others it requires to build. That way,
>>
>> > when your external project is configured the others will have been
>>
>> > built and therefore could be found.
>>
>> >
>>
>> > I hope that makes the mechanism a little clearer. You could take a
>>
>> > look at the Titan project as one example where we have many external
>>
>> > projects that we build, and the Libraries/Applications external
>>
>> > projects that depend upon them and use them.
>>
>> >
>>
>> > Marcus
>>
>> >
>>
>> ___
>> 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


Re: [CMake] How to have a target depend on an External Project

2011-01-12 Thread David Cole
add_dependencies does work to make sure that ExternalProject targets build
before internal targets, if you need that.

But, like Marcus said, you probably need the ExternalProject to be
configured and built before your own calls to find_package... so if you have
that chicken and egg problem, you should also build your project as an
ExternalProject.

Almost all of the projects I know of that are using ExternalProject are
producing a so-called "SuperBuild" of themselves, wherein all the targets of
the SuperBuild are ExternalProject_Add calls, and the last one is the
"project of interest."


HTH,
David


On Wed, Jan 12, 2011 at 2:09 PM, Allen D Byrne  wrote:

>  While Marcus states what is likely the preferred way, I just added an
> ADD_DEPENDENCIES(internal_target external_target) statement that seems to
> always work?
>
> Allen
>
> > Date: Wed, 12 Jan 2011 13:23:52 -0500
>
> > From: "Marcus D. Hanwell" 
>
> > Subject: Re: [CMake] How to have a target depend on an External
>
> > Project
>
> > To: kent williams 
>
> > Cc: CMake ML 
>
> > Message-ID:
>
> > 
> > 
> >
>
> > Content-Type: text/plain; charset=ISO-8859-1
>
> >
>
> > On Wed, Jan 12, 2011 at 12:53 PM, kent williams
>
> >  wrote:
>
> > > For better or worse (mostly better) we are now heavy users of
>
> > > ExternalProject. ?That module works really well to pull in external
>
> > > dependencies and get them built.
>
> > >
>
> > > ExternalProject_add has a DEPENDS keyword that lets you specify
>
> > > dependencies on other External Projects. ?But an ExternalProject isn't
>
> > > an actual CMake target, so I can't figure out how to make a regular
>
> > > CMake target depend on an External Project.
>
> > >
>
> > > Suggestions?
>
> >
>
> > Don't mix external projects and real targets. An external project
>
> > dependency is different to a target dependency. When expressing
>
> > external project dependencies you are stating that this external
>
> > project needs these others to be built before it is even configured.
>
> >
>
> > With regular targets there is an assumption that the dependency is
>
> > part of the current build, and so CMake knows everything about it, or
>
> > it was already built. If you have Qt in an external project, and a Qt
>
> > based application depending on it, the find_package(Qt4) will fail
>
> > during initial configure, as there is no Qt built/installed.
>
> >
>
> > Instead you would normally have your own project as an external
>
> > project that depends on the others it requires to build. That way,
>
> > when your external project is configured the others will have been
>
> > built and therefore could be found.
>
> >
>
> > I hope that makes the mechanism a little clearer. You could take a
>
> > look at the Titan project as one example where we have many external
>
> > projects that we build, and the Libraries/Applications external
>
> > projects that depend upon them and use them.
>
> >
>
> > Marcus
>
> >
>
> ___
> 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] How to have a target depend on an External Project

2011-01-12 Thread Allen D Byrne

While Marcus states what is likely the preferred way, I just added an 
ADD_DEPENDENCIES(internal_target external_target) statement that seems to 
always work?

Allen

> Date: Wed, 12 Jan 2011 13:23:52 -0500
> From: "Marcus D. Hanwell" 
> Subject: Re: [CMake] How to have a target depend on an External
> Project
> To: kent williams 
> Cc: CMake ML 
> Message-ID:
> 
> Content-Type: text/plain; charset=ISO-8859-1
> 
> On Wed, Jan 12, 2011 at 12:53 PM, kent williams
>  wrote:
> > For better or worse (mostly better) we are now heavy users of
> > ExternalProject. ?That module works really well to pull in external
> > dependencies and get them built.
> >
> > ExternalProject_add has a DEPENDS keyword that lets you specify
> > dependencies on other External Projects. ?But an ExternalProject isn't
> > an actual CMake target, so I can't figure out how to make a regular
> > CMake target depend on an External Project.
> >
> > Suggestions?
> 
> Don't mix external projects and real targets. An external project
> dependency is different to a target dependency. When expressing
> external project dependencies you are stating that this external
> project needs these others to be built before it is even configured.
> 
> With regular targets there is an assumption that the dependency is
> part of the current build, and so CMake knows everything about it, or
> it was already built. If you have Qt in an external project, and a Qt
> based application depending on it, the find_package(Qt4) will fail
> during initial configure, as there is no Qt built/installed.
> 
> Instead you would normally have your own project as an external
> project that depends on the others it requires to build. That way,
> when your external project is configured the others will have been
> built and therefore could be found.
> 
> I hope that makes the mechanism a little clearer. You could take a
> look at the Titan project as one example where we have many external
> projects that we build, and the Libraries/Applications external
> projects that depend upon them and use them.
> 
> Marcus
> 
___
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] CPack and configure_file

2011-01-12 Thread Tobias Ellinghaus
Am Tuesday 11 January 2011 schrub Eric Noulard:

[...]

> in fact I think the "real" source for this is the fact the CPack lacks
> the notion
> of "EXTRA" distribution file which is available with autoconf, EXTRA_DIST
> var
> http://www.gnu.org/software/hello/manual/automake/Basics-of-Distribution.h
> tml or the dist-hook:
> http://www.gnu.org/software/hello/manual/automake/The-dist-Hook.html#The-di
> st-Hook
> 
> The fact is CPack doesn't know much about "source package" and
> in fact it package source using the CPACK_INSTALLED_DIRECTORIES directory
> list. (look at the generated CPackSourceConfig.cmake)
> 
> I think you can "emulate" the extra thing of autoconf.
> If you want ot package "more" than the source tree with
> "package_source" you can try
> the following in your main CMakeLists.txt (before include(CPack))
> 
> SET(CPACK_SOURCE_INSTALLED_DIRECTORIES
> "${CMAKE_SOURCE_DIR};/;${CMAKE_BINARY_DIR}/extra;/extra")
> 
> then the content of the directory
> ${CMAKE_BINARY_DIR}/extra will added in the package source archive
> inside "extra" dir.
> 
> it should work.

It does indeed work perfectly IFF I don't add CMAKE_BINARY_DIR to 
CPACK_SOURCE_IGNORE_FILES which is needed when someone creates a folder (let's 
say "build/") inside of the source dir and runs cmake from this folder which 
seems to be quite wide spread.

Is it possible to have CPack somehow give more authority to 
CPACK_SOURCE_INSTALLED_DIRECTORIES than CPACK_SOURCE_IGNORE_FILES?

Tobias


signature.asc
Description: This is a digitally signed message part.
___
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] Still have a problem to cross-compile a simple C++ program

2011-01-12 Thread David Cole
First, use the correct spelling:
-DCMAKE_TOOLACHAIN_FILE

should be:
-DCMAKE_TOOLCHAIN_FILE

If that doesn't solve it entirely, then try using a name without the "+"
character in it for the PROJECT command.

If that doesn't do it, give us more details, I guess.

I'm not a cross-compiling expert, so hopefully somebody else who is can
chime in here as well.


HTH,
David



On Wed, Jan 12, 2011 at 1:41 PM, Enrique Izaguirre <
enrique.izagui...@gmail.com> wrote:

> Hello again:
> For some reason when I try to compile a simple C++ program, it takes the
> wrong compiler, even though I am setting the appropriate one in the
> Toolchain file; I am working on Cygwin, and I am trying to compile for a
> LInux environment using g++-linux compiler, which I tested it and works
> correctly.
>
> I have a folder named helloC++-linux, where I have all my stuff:
> A simple hello.cpp program
> My CMakeLists.txt contains:
> #CMakeLists.txt :  CMake configuration file
> PROJECT(helloC++-linux CXX)
> #States that CMake required version must be >= 2.6
> CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
> #File to build and executable:
> ADD_EXECUTABLE(hello.o hello.cpp)
>
> My Toolchain file (named Toolchain-linuxcpp.cmake) contains:
>SET(CMAKE_SYSTEM_NAME Linux)
>#specify the cross-compiler
>SET(CMAKE_CXX_COMPILER /bin/g++-linux)
>
>
> and I tried to build it using following command:
> cmake -DCMAKE_TOOLACHAIN_FILE=./Toolchain-linuxcpp.cmake .
>
> But when building, CMake looks for a compiler, and takes  /usr/bin/c++.exe
> instead of /bin/g++-linux.
>
> I tried also using CMAKE_FORCE_CXX_COMPILER, but I got the same results. Is
> there any way of
> make it take the compiler from /bin, instead of from /usr/bin ?
>
> Thanks
>
> Best Regards
>
> Enrique
>
>
> ___
> 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] Still have a problem to cross-compile a simple C++ program

2011-01-12 Thread Enrique Izaguirre
Hello again:
For some reason when I try to compile a simple C++ program, it takes the
wrong compiler, even though I am setting the appropriate one in the
Toolchain file; I am working on Cygwin, and I am trying to compile for a
LInux environment using g++-linux compiler, which I tested it and works
correctly.

I have a folder named helloC++-linux, where I have all my stuff:
A simple hello.cpp program
My CMakeLists.txt contains:
#CMakeLists.txt :  CMake configuration file
PROJECT(helloC++-linux CXX)
#States that CMake required version must be >= 2.6
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
#File to build and executable:
ADD_EXECUTABLE(hello.o hello.cpp)

My Toolchain file (named Toolchain-linuxcpp.cmake) contains:
   SET(CMAKE_SYSTEM_NAME Linux)
   #specify the cross-compiler
   SET(CMAKE_CXX_COMPILER /bin/g++-linux)


and I tried to build it using following command:
cmake -DCMAKE_TOOLACHAIN_FILE=./Toolchain-linuxcpp.cmake .

But when building, CMake looks for a compiler, and takes  /usr/bin/c++.exe
instead of /bin/g++-linux.

I tried also using CMAKE_FORCE_CXX_COMPILER, but I got the same results. Is
there any way of
make it take the compiler from /bin, instead of from /usr/bin ?

Thanks

Best Regards

Enrique
___
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] CTest options being ignored : CTest - 2.8.2

2011-01-12 Thread Nolen, Steven D
It appears there are some inconsistencies with specifying different 
SOURCE/BUILD when using functions like ctest_configure, ctest_coverage, etc.  I 
have tried specifying different binary/source directories but it only seems 
like it has been partially implemented.  To verify this, I went into 
cmCTestCoverageHandler and confirmed that it was sometimes using the configure 
option BinaryDir and sometimes it was using the global(?) variable set with 
CTEST_BINARY_DIRECTORY.  Moreover, when it does use the option specified 
version, it fails to use the correct {stage}.xml file for the results.  To make 
my system work I had to switch the global BinaryDir to the appropriate one for 
the subproject and then switch it back before calling ctest_submit.  I can post 
the ctest script that does this if necessary.
System: linux x86-64 RHEL

___
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 have a target depend on an External Project

2011-01-12 Thread Marcus D. Hanwell
On Wed, Jan 12, 2011 at 12:53 PM, kent williams
 wrote:
> For better or worse (mostly better) we are now heavy users of
> ExternalProject.  That module works really well to pull in external
> dependencies and get them built.
>
> ExternalProject_add has a DEPENDS keyword that lets you specify
> dependencies on other External Projects.  But an ExternalProject isn't
> an actual CMake target, so I can't figure out how to make a regular
> CMake target depend on an External Project.
>
> Suggestions?

Don't mix external projects and real targets. An external project
dependency is different to a target dependency. When expressing
external project dependencies you are stating that this external
project needs these others to be built before it is even configured.

With regular targets there is an assumption that the dependency is
part of the current build, and so CMake knows everything about it, or
it was already built. If you have Qt in an external project, and a Qt
based application depending on it, the find_package(Qt4) will fail
during initial configure, as there is no Qt built/installed.

Instead you would normally have your own project as an external
project that depends on the others it requires to build. That way,
when your external project is configured the others will have been
built and therefore could be found.

I hope that makes the mechanism a little clearer. You could take a
look at the Titan project as one example where we have many external
projects that we build, and the Libraries/Applications external
projects that depend upon them and use them.

Marcus
___
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] ctest and git submodules

2011-01-12 Thread Brad King
On 1/12/2011 12:43 PM, David Cole wrote:
> Are you using CMake 2.8.3? If not, you should upgrade. There were some
> improvements made w.r.t. ctest_update and git repos in that release. I
> think the submodule update was one of them...

Among the improvements was the submodule update command:

  http://www.cmake.org/Bug/view.php?id=10662

That fix was first in 2.8.2 but there have been more improvements.

-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] ctest and git submodules

2011-01-12 Thread Marcus D. Hanwell
On Wed, Jan 12, 2011 at 12:16 PM, Gerhard Gappmeier
 wrote:
> Hi,
>
> my project is stored in a git repo with submodules.
>
> I'm wondering if ctest is updating also the submodules when running
>
> ctest Nightly|Continuous etc.
>
> or just the main repo.
>
> I believe not, unless I have some other problems with my test script.
>
> I could do a manual "git pull && git submodule init && git submodule update"
>
> before running ctest, but then "ctest -D Continuous" will do nothing because
> it doesn't detect the change anymore.
>
> Has anybody working ctest with git submodules?
>
See this ParaView CTest script for an example of how we handle
submodules in ParaView right now. ctest_update will see changes in the
main repo, but not any of the submodules. The submodules are then
updated, and the build begins. Last time I looked there was no
automatic update of the submodules.

http://www.cdash.org/CDash/viewNotes.php?buildid=823021

Marcus
___
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] List operations

2011-01-12 Thread Andreas Pakulat
On 12.01.11 11:56:53, kent williams wrote:
> I'm generating a list of files with file(GLOB), but then I want to
> remove some filenames from the resulting list.
> 
> So essentially I'd like a CMake function like this
> 
> function(RemoveItemsFromList ListA ListToRemove)
> endfunction(RemoveItemsFromList)
> 
> and I don't know what to put in the middle ;-)

There's no need for a function, the list() function can already do that:

list( REMOVE_ITEM yourlist ${listToRemove} )

Andreas

-- 
Give thought to your reputation.  Consider changing name and moving to
a new town.
___
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] List operations

2011-01-12 Thread kent williams
I'm generating a list of files with file(GLOB), but then I want to
remove some filenames from the resulting list.

So essentially I'd like a CMake function like this

function(RemoveItemsFromList ListA ListToRemove)
endfunction(RemoveItemsFromList)

and I don't know what to put in the middle ;-)
___
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 have a target depend on an External Project

2011-01-12 Thread kent williams
For better or worse (mostly better) we are now heavy users of
ExternalProject.  That module works really well to pull in external
dependencies and get them built.

ExternalProject_add has a DEPENDS keyword that lets you specify
dependencies on other External Projects.  But an ExternalProject isn't
an actual CMake target, so I can't figure out how to make a regular
CMake target depend on an External Project.

Suggestions?
___
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] ctest and git submodules

2011-01-12 Thread David Cole
Are you using CMake 2.8.3? If not, you should upgrade. There were some
improvements made w.r.t. ctest_update and git repos in that release. I think
the submodule update was one of them...


HTH,
David


On Wed, Jan 12, 2011 at 12:16 PM, Gerhard Gappmeier <
gerhard.gappme...@ascolab.com> wrote:

>  Hi,
>
> my project is stored in a git repo with submodules.
>
> I'm wondering if ctest is updating also the submodules when running
>
> ctest Nightly|Continuous etc.
>
> or just the main repo.
>
> I believe not, unless I have some other problems with my test script.
>
> I could do a manual "git pull && git submodule init && git submodule
> update"
>
> before running ctest, but then "ctest -D Continuous" will do nothing
> because it doesn't detect the change anymore.
>
> Has anybody working ctest with git submodules?
>
>
> --
>
> Gerhard Gappmeier
>
> ascolab GmbH - automation systems communication laboratory
>
> Tel.: +49 9131 691 123
>
> Fax: +49 9131 691 128
>
> Web: http://www.ascolab.com
>
> GPG Key Id: 5AAC50C4
>
> GPG Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4
>
> --
>
> ascolab GmbH
>
> Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
>
> Sitz der Gesellschaft: Am Weichselgarten 7 . 91058 Erlangen . Germany
>
> Registernummer: HRB 9360
>
> Registergericht: Amtsgericht Fürth
>
> ___
> 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] ctest and git submodules

2011-01-12 Thread David Cole
Are you using CMake 2.8.3? If not, you should upgrade. There were some
improvements made w.r.t. ctest_update and git repos in that release. I think
the submodule update was one of them...


HTH,
David


On Wed, Jan 12, 2011 at 12:16 PM, Gerhard Gappmeier <
gerhard.gappme...@ascolab.com> wrote:

>  Hi,
>
> my project is stored in a git repo with submodules.
>
> I'm wondering if ctest is updating also the submodules when running
>
> ctest Nightly|Continuous etc.
>
> or just the main repo.
>
> I believe not, unless I have some other problems with my test script.
>
> I could do a manual "git pull && git submodule init && git submodule
> update"
>
> before running ctest, but then "ctest -D Continuous" will do nothing
> because it doesn't detect the change anymore.
>
> Has anybody working ctest with git submodules?
>
>
> --
>
> Gerhard Gappmeier
>
> ascolab GmbH - automation systems communication laboratory
>
> Tel.: +49 9131 691 123
>
> Fax: +49 9131 691 128
>
> Web: http://www.ascolab.com
>
> GPG Key Id: 5AAC50C4
>
> GPG Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4
>
> --
>
> ascolab GmbH
>
> Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
>
> Sitz der Gesellschaft: Am Weichselgarten 7 . 91058 Erlangen . Germany
>
> Registernummer: HRB 9360
>
> Registergericht: Amtsgericht Fürth
>
> ___
> 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] ctest and git submodules

2011-01-12 Thread Gerhard Gappmeier
Hi,

my project is stored in a git repo with submodules.
I'm wondering if ctest is updating also the submodules when running
ctest Nightly|Continuous etc.
or just the main repo.

I believe not, unless I have some other problems with my test script.

I could do a manual "git pull && git submodule init && git submodule update"
before running ctest, but then "ctest -D Continuous" will do nothing because 
it doesn't detect the change anymore.

Has anybody working ctest with git submodules?

-- 
Gerhard Gappmeier
ascolab GmbH - automation systems communication laboratory
Tel.: +49 9131 691 123
Fax: +49 9131 691 128
Web: http://www.ascolab.com
GPG Key Id: 5AAC50C4
GPG Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4

--
ascolab GmbH
Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
Sitz der Gesellschaft: Am Weichselgarten 7 . 91058 Erlangen . Germany
Registernummer: HRB 9360
Registergericht: Amtsgericht Fürth
___
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] feature request for eclipse

2011-01-12 Thread Andrea Galeazzi

Suppose you have a project with a lot of sub-projects like:
 add_subdirectory("path1/lib1"  "${CMAKE_CURRENT_BINARY_DIR}/lib1")
 add_subdirectory("path2/lib2"  "${CMAKE_CURRENT_BINARY_DIR}/lib2")
.
When I choose VS as target CMake generates a solution made up of each 
sub-project with all files. Unfortunately that's not possible with 
eclipse because a project must be,at least, a sibling of source 
directory in order to browse the source files.
So I wrote a simple program that generates an eclipse project by parsing 
each add_subdirectory statement in a sibling directory named dir_postfix.
For instance,  add_subdirectory("path1/lib1"  
"${CMAKE_CURRENT_BINARY_DIR}/lib1") generates an eclipse project in the 
directory path1/lib1_eclipse_debug.

After that I import all generated project into my workspace.
My question is: don't you think this could be an useful "native" feature 
that  should improve the eclipse/cmake interaction?

Did anyone ever have such need?
___
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] fixup_bundle, shared libs and Plugins

2011-01-12 Thread Crni Gorac
On Tue, Jan 11, 2011 at 11:00 PM, David Cole  wrote:
> On Tue, Jan 11, 2011 at 4:21 PM, Crni Gorac  wrote:
>>
>>   [ ... ]
>>
>> I hope you guys don't mind if I jump in and re-ask related question I
>> posted couple days ago (I'm sure Michael will soon face the same
>> problem, if he's building also for for Mac, so he may be interested
>> too): Is it possible with all this BundleUtilities mechanism to have
>> these prerequisite library/plugin files, that fixup_bundle() is
>> copying in, stripped?  On Qt SDK for Mac, Qt libraries and plugins are
>> not stripped, and thus generated package/installer gets rather
>> large...
>>
>> 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
>
> "Stripping" during fixup_bundle would be a good feature request for a future
> CMake release. We could do it simply by adding a variable that controls
> whether stripping gets done or not, and then setting that variable to OFF by
> default so that it behaves the same as it does now unless you explicitly
> enable it.
> Does anybody have time to work up a patch to do this?
>
> David
>

I was trying to make needed changes in BundleUtilities.cmake already,
but unfortunately to no avail.  I'd say it's one of these situations
when adding feature shouldn't be that hard for module maintainer, but
for mere mortals like myself it's rather tricky...

In any case, I think we should follow here what is already there for
BU_CHMOD_BUNDLE_ITEMS variable, so probably BU_STRIP_FILES variable
could be added for this, and then "if(BU_STRIP_FILES) ... endif()"
block could be put into fixup_bundle_item() function with some lines
inside that would check is given file executable or library, and
utilize CMAKE_STRIP to do the stripping.   However,
fixup_bundle_item() seems to be called on APPLE platform only, and
that is one issue here - I guess we need stripping for UNIX (and then
for Cygwin too).  Also, on the other side I really don't fully
understand how frameworks are handled, so I'm not sure would libraries
that are within frameworks get stripped here.  Thus as said above -
still seems like task for someone more knowledgeable...
___
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 Error: Error required internal CMake variable not set, ...

2011-01-12 Thread Michael Hertling
On 01/12/2011 04:29 PM, Enrique Izaguirre wrote:
> Hello,
> 
> I am new to CMake and following a few examples, I am now trying to
> cross-compile a C++ program from Cygwin to Linux, and I got the following
> errors:
> 
> CMake Error: Error required internal CMake variable not set, cmake may be
> not be built correctly.
> Missing variable is:
> CMAKE_C++_COMPILER_ENV_VAR
> CMake Error: Error required internal CMake variable not set, cmake may be
> not be built correctly.
> Missing variable is:
> CMAKE_C++_COMPILER
> :
> 
> 
> I have a folder named helloC++-linux, where I have all my stuff:
> A simple hello.cpp program
> My CMakeLists.txt contains:
> #CMakeLists.txt :  CMake configuration file
> PROJECT(helloC++-linux C++)

Try with PROJECT(helloC++-linux CXX), i.e. CXX instead of C++.
 ^^
> #States that CMake required version must be >= 2.6
> CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
> 
> #File to build and executable:
> ADD_EXECUTABLE(hello.o hello.cpp)
> 
> My Toolchain file (named Toolchain-linuxcpp.cmake) contains:
>INCLUDE (CMakeForceCompiler)
>SET(CMAKE_SYSTEM_NAME Linux)
> 
>#specify the cross-compiler
>SET(CMAKE_CXX_COMPILER /bin/g++-linux)
> 
> 
> and I tried to build it using following command:
> cmake -DCMAKE_TOOLACHAIN_FILE=./Toolchain-linuxcpp.cmake .
> 
> 
> Before this, I tried it compiling a simple C program, using gcc-linux
> compiler and setting CMAKE_C_COMPILER variable, and it worked correctly, but
> once that I am trying to do it with C++ I got these errors. I couldn't find
> anything about this on the web. Could you help me please?
> 
> Thanks
> 
> Enrique
___
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] conditional selection of either local "just built" or system versions of a library

2011-01-12 Thread Michael Hertling
On 01/11/2011 05:46 PM, Marco wrote:
> Dear CMake experts,
> 
> I'm facing the following problem. I have a project with many 
> subdirectories, all at the same hierarchical level:
> 
> /my/project/path/CMakeLists.txt
> /my/project/path/A - include
>   |- src
>   |- CMakeLists.txt
> 
> /my/project/path/B - include
>   |- src
>   |- CMakeLists.txt
> 
> Each subdir corresponds to a package that a user is allowed to modify 
> and build against a given "general release" already installed centrally 
> or against other locally built packages.
> 
> Some of the executables of package A must be linked against an object 
> file generated by package B. The user could build package B, so that the 
> object file needed by executables in package A is the "local" one, but 
> could also decide to rely on the one that comes from the already 
> installed release.
> 
> To give an example:
> 
> - package A has something like:
>add_executable(X src/X.cc)
>target_link_libraries(X ${RIGHTPATH}/ObjFile.o A B C)
>add_dependencies(X obj_file_target)
> 
> - package B has something like:
>add_custom_command(
> OUTPUT ${LIBRARY_OUTPUT_PATH}/ObjFile.o
> COMMAND ${CMAKE_CXX_COMPILER}  -Wall
> -I${PROJECT_SOURCE_DIR}/include -c
> ${CMAKE_CURRENT_SOURCE_DIR}/src/ObjFile.cc -o 
> ${LIBRARY_OUTPUT_PATH}/ObjFile.o)
> 
> add_custom_target(obj_file_target DEPENDS ${LIBRARY_OUTPUT_PATH}/ObjFile.o)
> 
> In this way executable X triggers the compilation of ObjFile.o which is 
> put into ${LIBRARY_OUTPUT_PATH}.
> 
> The point is that if the user wants to use the system ObjFile.o located 
> in, say, /Soft/Releases/V1/lib/ObjFile.o I don't have a way to determine 
> for package A the value of RIGHTPATH (either ${LIBRARY_OUTPUT_PATH} or 
> /Soft/Releases/V1/lib/) as the path variable is set when I enter package 
> A which can happen before I enter package B.
> 
> How could I solve this issue? Is there a way to conditionally select 
> which library my exe will be linked against?

You might use a user-supplied path to the external B as indicator:

SET(LIBRARY_OUTPUT_PATH ...)  # Must be known at this place.
SET(RIGHTPATH ${LIBRARY_OUTPUT_PATH})  # Assume internal B.
SET(PATH_TO_B "" CACHE PATH "Path to external B")
IF(PATH_TO_B)
SET(RIGHTPATH ${PATH_TO_B})  # Use external B.
ENDIF()
ADD_SUBDIRECTORY(A)
IF(NOT PATH_TO_B)
ADD_SUBDIRECTORY(B)
ENDIF()

So, the user can set PATH_TO_B on the command line or in the GUI to
demand the usage of the external B; if PATH_TO_B is left alone, the
internal B is used. Here, it is crucial that LIBRARY_OUTPUT_PATH is
set in the CMakeLists.txt above B. Because ADD_DEPENDENCIES() isn't
insulted if a prerequisite target doesn't exists, it can remain in
A/CMakeLists.txt without guard regardless whether B/CMakeLists.txt
is processed or not.

Regards,

Michael
___
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 Error: Error required internal CMake variable not set, ...

2011-01-12 Thread Enrique Izaguirre
Hello,

I am new to CMake and following a few examples, I am now trying to
cross-compile a C++ program from Cygwin to Linux, and I got the following
errors:

CMake Error: Error required internal CMake variable not set, cmake may be
not be built correctly.
Missing variable is:
CMAKE_C++_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be
not be built correctly.
Missing variable is:
CMAKE_C++_COMPILER
:


I have a folder named helloC++-linux, where I have all my stuff:
A simple hello.cpp program
My CMakeLists.txt contains:
#CMakeLists.txt :  CMake configuration file
PROJECT(helloC++-linux C++)

#States that CMake required version must be >= 2.6
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

#File to build and executable:
ADD_EXECUTABLE(hello.o hello.cpp)

My Toolchain file (named Toolchain-linuxcpp.cmake) contains:
   INCLUDE (CMakeForceCompiler)
   SET(CMAKE_SYSTEM_NAME Linux)

   #specify the cross-compiler
   SET(CMAKE_CXX_COMPILER /bin/g++-linux)


and I tried to build it using following command:
cmake -DCMAKE_TOOLACHAIN_FILE=./Toolchain-linuxcpp.cmake .


Before this, I tried it compiling a simple C program, using gcc-linux
compiler and setting CMAKE_C_COMPILER variable, and it worked correctly, but
once that I am trying to do it with C++ I got these errors. I couldn't find
anything about this on the web. Could you help me please?

Thanks

Enrique
___
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] CPack tar ownership

2011-01-12 Thread Eric Noulard
2011/1/12 Tim St. Clair :
> As a side issue: not all platforms which support the TGZ natively
> support fakeroot.
>
> I think ownership rights should likely be a CPACK option as a result.

True off course.
Would you be willing to file a feature request and possibly a patch proposal?

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


Re: [CMake] CPack tar ownership

2011-01-12 Thread Tim St. Clair
As a side issue: not all platforms which support the TGZ natively
support fakeroot.

I think ownership rights should likely be a CPACK option as a result.

Cheers,
Tim

On Sat, Jan 8, 2011 at 8:22 AM, Eric Noulard  wrote:
> 2011/1/8 Tim St. Clair :
>> This will be across several *nix platforms,
>>
>> I tried fakeroot but when I expand it has the euid of the user.
>
> This is odd, by the way which version of CMake are you using?
>
> On my ubuntu 10.04 box with CMake 2.8.3, I get:
>
> A) cpack -G TGZ
> leads to a tar+gz archive whose content its owned by the user.
> (as printed out using 'tar ztvf file.tgz')
>
> B) fakeroot cpack -G TGZ
> leads to a tar+gz archive whose content its owned by root.
> (as printed out using 'tar ztvf file.tgz')
>
>
> An alternative solution would be to force ownership on extraction,
> GNU tar has the option:
> --no-same-owner
>           extract files as yourself
>
> which should do the job (I suppose you can be root when extracting).
>
>
> Do you have any self contained example which exhibits the problem?
>
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org
>



-- 
Cheers,
Timothy St. Clair
___
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 Java Support

2011-01-12 Thread Allen D Byrne
Andreas,
Thanks for providing these files! I have finally been able to progress on 
converting our java product to cmake.
I have one suggestion:

Add to the add_java function the classpath for the target;

set(${_TARGET_NAME}_CLASSPATH 
".${CMAKE_JAVA_INCLUDE_PATH_FINAL}/${_TARGET_NAME}.jar" PARENT_SCOPE)

I needed this on linux (uses ':' in classpath not ';' ) to do an add_test.

Also two questions: 
How do I get the jar files into an output folder for build/test (not install 
task)?

After I build my JNI Library with normal C process how do I connect the java 
JAR  to use the library? I'm not sure how to use INSTALL_JNI_SYMLINK?

Allen


> 
> Hello CMake,
> 
> my name is Andreas Schneider and I'm working for Red Hat. At the end of last 
> year I've worked on Dogtag PKI [1]. The Dogtag Certificate System [2] is an 
> enterprise-class open source Certificate Authority.
> 
> The project is written in serveral different laguages (C, C++ and Java), so 
> I've used CMake as the new build system. To be able to build the java project 
> I needed Java support in CMake. So I've started to write functions to compile 
> java files, find jar files, bundle jar files and generate javadoc.
> 
> It should provide everything to build java and jni projects. You find the 
> files here:
> 
> http://git.cryptomilk.org/projects/cmake-tools.git/tree/language/java
> 
> 
> FindJNI.cmake:
> 
>   Find JNI libraries and headers. I think this is the file from CMake
>   itself.
> 
> FindJava.cmake:
> 
>   Find all needed Java tools like javac, javadoc, jar, etc.
> 
> UseJava.cmake:
> 
>   This file provides all needed function to support creating java
>   projects in CMake. Most of the function are documented in detail.
>   There is some documentation missing. I will add this soon.
> 
> UseJavaClassFilelist.cmake:
> 
>   This is needed to find the class files in the build directory. One
>   .java file can create multiple .class files. So you have to glob for
>   these file. There is support to only look for certain .class files.
> 
> UseJavaSymlinks.cmake:
> 
>   This is a helper to create symlinks for versioned jar files.
> 
> 
> git clone git://git.cryptomilk.org/projects/cmake-tools.git
> 
> 
> It would be nice if this would be included into the CMake distribution, but 
> at 
> the moment there is still documentation missing. I hope that this will help 
> some people to get their Java project built with CMake.
> 
> Comments, suggestions and patches are welcome!
> 
> Best regards,
> 
> 
>   -- andreas
> 
> 
> [1] https://fedorahosted.org/pki/browser/trunk/pki
> [2] http://pki.fedoraproject.org/wiki/PKI_Main_Page
> 
___
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 assign version numbers from a source header to CMake variables?

2011-01-12 Thread SF Markus Elfring

Here is the code:


I have got another idea.

Did anybody try to use the C/C++ preprocessor ("cpp" and eventually including 
the compiler) to output a file in a format which is suitable for processing of 
this data as a project specification for CMake?


Regards,
Markus
___
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] Path to installed target

2011-01-12 Thread Michael Wild
On 01/12/2011 03:03 PM, Alexey Livshits wrote:
>> Thing is, you can't *rely* on DESTDIR *not* being used by the user of
>> your project. If a user shoots himself in the foot, that's his fault,
>> but when designing your test architecture you IMHO shouldn't make the
>> use of DESTDIR impossible. I'm sure Debian/Ubuntu/the/whole/zoo would
>> object to that...
> 
> That's right. I don't want to rely on DESTDIR. That's the problem, not
> a solution. Otherwise I could use CMAKE_INSTALL_PREFIX and I would be
> fine.

But then, if you override that your users (if there are any besides
you/your company) will hate you, because they can't install the software
where they want.

Michael
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
> Thing is, you can't *rely* on DESTDIR *not* being used by the user of
> your project. If a user shoots himself in the foot, that's his fault,
> but when designing your test architecture you IMHO shouldn't make the
> use of DESTDIR impossible. I'm sure Debian/Ubuntu/the/whole/zoo would
> object to that...

That's right. I don't want to rely on DESTDIR. That's the problem, not
a solution. Otherwise I could use CMAKE_INSTALL_PREFIX and I would be
fine.
-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Michael Wild
On 01/12/2011 02:47 PM, David Cole wrote:
> On Wed, Jan 12, 2011 at 8:34 AM, Alexey Livshits  wrote:
> 
>>> Well, if you don't want any help fixing the real problem, then the
>>> answer is simple: CMake can't possibly give you that information because
>>> of DESTDIR.
>>
>> Thank you.
>>
>>> So, go and fix your project.
>>
>> I wish I could, but its not so simple. If you have an idea, just let me
>> know.
>>
>> --
>> BG,
>> Alexey
>> ___
>> 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
>>
> 
> 
> 
> Why can't you just set CMAKE_INSTALL_PREFIX to some path that you know and
> then reference that from your tests that run the installed version?
> 
> 
> DESTDIR will never work on Windows with drive letters in the way:
> (for example, if DESTDIR=D:\, and your install rules install some component
> to an absolute path, say C:\Program Files\Whatever, then the resulting
> attempt would go to "D:\C:\Pro..." which is obviously non-sensical.)
> 
> DESTDIR simply does not mix with Windows drive letters, so there always has
> to be another way to attack the problem when Windows is a consideration.
> 
> Since Windows is always a consideration for the vast majority of CMake-based
> projects, DESTDIR is typically avoided as a general technique (except as
> guarded by appropriate if(NOT WIN32) usage...)
> 
> 
> Does that help?
> 
> David
> 

Thing is, you can't *rely* on DESTDIR *not* being used by the user of
your project. If a user shoots himself in the foot, that's his fault,
but when designing your test architecture you IMHO shouldn't make the
use of DESTDIR impossible. I'm sure Debian/Ubuntu/the/whole/zoo would
object to that...

Michael
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
> Why can't you just set CMAKE_INSTALL_PREFIX to some path that you know and
> then reference that from your tests that run the installed version?

I thought about it, but I'd like to keep it independent of some known
path. If you mean, there is no other way, I should give them a try.

> DESTDIR will never work on Windows with drive letters in the way:
> (for example, if DESTDIR=D:\, and your install rules install some component
> to an absolute path, say C:\Program Files\Whatever, then the resulting
> attempt would go to "D:\C:\Pro..." which is obviously non-sensical.)
> DESTDIR simply does not mix with Windows drive letters, so there always has
> to be another way to attack the problem when Windows is a consideration.
> Since Windows is always a consideration for the vast majority of CMake-based
> projects, DESTDIR is typically avoided as a general technique (except as
> guarded by appropriate if(NOT WIN32) usage...)
>
> Does that help?

This is sick :( I use DESTDIR to keep on disk multiple versions of the software.
Thank you for your help.

-- 
BG,
Alexey
___
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] redirect object output directory

2011-01-12 Thread Andrea Galeazzi




David Cole ha scritto:
It is *possible*, but you would have to change the source
code to CMake...
  
  We select directories on a per-target basis to avoid name
clashes between object files named the same but from different targets.
  
  
  There is no way to adjust it as a project CMakeLists writer...
intentionally. We view it as helping you avoid name clashes.
  
  
  Is there a reason you need to put them in a certain place? Or do
you just want to have the same organization as you had before adopting
CMake? Or...?
  
  
  HTH,
  David
  
  
  
  On Wed, Jan 12, 2011 at 6:54 AM, Andrea
Galeazzi 
wrote:
  Is
it possible to change the default path (project.dir) where the object
files (.o or .obj) are put?
___
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
  
  
  
  


The only reason is because we use to put the project files and the
build-binary file in two different units, anyway I don't think it's
gonna be a big deal to have them under the same root folder especially
if the only way  is to change the source code of CMake and maintain a
brunch of  it! 


___
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] Path to installed target

2011-01-12 Thread David Cole
On Wed, Jan 12, 2011 at 8:34 AM, Alexey Livshits  wrote:

> > Well, if you don't want any help fixing the real problem, then the
> > answer is simple: CMake can't possibly give you that information because
> > of DESTDIR.
>
> Thank you.
>
> > So, go and fix your project.
>
> I wish I could, but its not so simple. If you have an idea, just let me
> know.
>
> --
> BG,
> Alexey
> ___
> 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
>



Why can't you just set CMAKE_INSTALL_PREFIX to some path that you know and
then reference that from your tests that run the installed version?


DESTDIR will never work on Windows with drive letters in the way:
(for example, if DESTDIR=D:\, and your install rules install some component
to an absolute path, say C:\Program Files\Whatever, then the resulting
attempt would go to "D:\C:\Pro..." which is obviously non-sensical.)

DESTDIR simply does not mix with Windows drive letters, so there always has
to be another way to attack the problem when Windows is a consideration.

Since Windows is always a consideration for the vast majority of CMake-based
projects, DESTDIR is typically avoided as a general technique (except as
guarded by appropriate if(NOT WIN32) usage...)


Does that help?

David
___
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 assign version numbers from a source header to CMake variables?

2011-01-12 Thread Alexey Livshits
> Which software licence does belong to your approach?

I don't know :)

-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
> Well, if you don't want any help fixing the real problem, then the
> answer is simple: CMake can't possibly give you that information because
> of DESTDIR.

Thank you.

> So, go and fix your project.

I wish I could, but its not so simple. If you have an idea, just let me know.

-- 
BG,
Alexey
___
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 assign version numbers from a source header to CMake variables?

2011-01-12 Thread SF Markus Elfring

Here is the code:


Thanks. - Very nice.   :-)

Which software licence does belong to your approach?


Would anybody like to transform your example into an official CMake module?

Regards,
Markus
___
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 assign version numbers from a source header to CMake variables?

2011-01-12 Thread Alexey Livshits
Here is the code:

find_file(myproject_BUILD_NUMBER_FILE_FOUND myproject_build_number.txt
PATHS ${myproject_SOURCE_DIR})

if(${myproject_BUILD_NUMBER_FILE_FOUND} MATCHES "NOTFOUND")
set(myproject_CURRENT_BUILD_NUM 1)
else()
file(READ ${myproject_SOURCE_DIR}/myproject_build_number.txt 
OLD_BUILD_NUM)
if(BUILD_VERSION)
math(EXPR myproject_CURRENT_BUILD_NUM "${OLD_BUILD_NUM} + 1")
file(WRITE ${myproject_SOURCE_DIR}/myproject_build_number.txt
"${myproject_CURRENT_BUILD_NUM}")
else()  
set(myproject_CURRENT_BUILD_NUM ${OLD_BUILD_NUM})
endif() 
endif()

configure_file(${myproject_SOURCE_DIR}/version/myproject_version.h.in
${myproject_SOURCE_DIR}/version/myproject_version.h @ONLY)


-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Michael Wild
On 01/12/2011 02:16 PM, Alexey Livshits wrote:
> As I mentioned above, there are targets foo1 and foo2, build from foo
> sources, and the output name has to be foo. This is the conflict. The
> test depends from foo1 and bar2.
> 
>> If you don't explain the problem more clearly, people won't be able to
>> help you; particularly because I suspect that you are asking the wrong
>> question...
> 
> Well, my question was very clear imho, I just wanted to know, how to
> determine the path. In fact I'm looking for a better approach how to
> organize my project, but this is not the point here.
> 

Well, if you don't want any help fixing the real problem, then the
answer is simple: CMake can't possibly give you that information because
of DESTDIR.

So, go and fix your project.


Michael
___
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 assign version numbers from a source header to CMake variables?

2011-01-12 Thread SF Markus Elfring

I use a simple text file with the build number, which is tracked under
VCS. During the build I parse it, generate my version header, increase
the number, save it to the file and check it in.


Which (CMake) commands do you use for this approach?

Regards,
Markus
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
As I mentioned above, there are targets foo1 and foo2, build from foo
sources, and the output name has to be foo. This is the conflict. The
test depends from foo1 and bar2.

> If you don't explain the problem more clearly, people won't be able to
> help you; particularly because I suspect that you are asking the wrong
> question...

Well, my question was very clear imho, I just wanted to know, how to
determine the path. In fact I'm looking for a better approach how to
organize my project, but this is not the point here.

-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
> If the two "version" are needed you may build them in a single build.
>...
> but may be I'm missing something about your "2 versions"?
That's what I already do. The problem is, libv1 and libv2 should be
called libv.

> Alternatively, may be you can decide that your needed
> "temporary" install will always be in a fixed location relative to the
> build tree:
>
> ${CMAKE_BINARY_DIR}/tempinstall/
> then you always know where are installed the lib, executable etc...

Looks dirty, but this could be the solution :) Thank you.
-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Michael Wild
On 01/12/2011 01:48 PM, Alexey Livshits wrote:
>> Yes, make the tests run without installation. To give more advice, we'd
>> need to know more about those "dependencies". Are they other
>> executables? Data files? Libraries?
> 
> Well, if I could do that, I wouldn't ask ;)
> I have 2 versions, which are built from the same sources. So I have to
> have 2 different output directories. Some shared libraries are built
> only for one version, but needed for both. CMake install process helps
> perfectly here.
> Some tests require shared libraries from both versions. So I created
> the new install component for tests, but I cannot address them for
> CTest.

Sorry, I'm still confused. What I understand is that you have e.g.:

src/
|--foo/ # shared library bar
|  |-- fooa.c
|  |-- foob.c
|  `-- fooc.c
`--bar/ # shared libraries foo1 and foo2, both link against bar
   |-- bara.c
   `-- barb.c

test/
|-- testa.c # requires foo1
|-- testb.c # requires foo2
`-- testc.c # requires both, foo1 and foo2

What I don't understand is whether foo1 and foo2 are actually
conflicting or not (they would be if one was a debug version and the
other a release version, they wouldn't be conflicting if e.g. one was a
single-precision version where all the symbols have a *f suffix and the
other was a double-precision version where the symbols have a *d suffix).

Further, are the tests linking against foo1 and foo2, or are those
plugins (i.e. dynamically loaded)?

If you don't explain the problem more clearly, people won't be able to
help you; particularly because I suspect that you are asking the wrong
question...

Michael




___
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] Path to installed target

2011-01-12 Thread Eric Noulard
2011/1/12 Alexey Livshits :
>> Yes, make the tests run without installation. To give more advice, we'd
>> need to know more about those "dependencies". Are they other
>> executables? Data files? Libraries?
>
> Well, if I could do that, I wouldn't ask ;)
> I have 2 versions, which are built from the same sources. So I have to
> have 2 different output directories. Some shared libraries are built
> only for one version, but needed for both. CMake install process helps
> perfectly here.

If the two "version" are needed you may build them in a single build.

add_library(libv1 ${LIB_SRC})

add_library(libv2 ${LIB_SRC})
set_target_properties(libv2 PROPERTIES COMPILE_FLAGS "-DV2")

add_executable(t1 t1.c)
target_link_libraries(t1 libv1)
add_executable(t2 t2.c)
target_link_libraries(t2 libv2)
add_executable(t3 t3.c)
target_link_libraries(t3 libv1 libv2)

so that in the same build you have the 2 versions you can directly use
with add_test.

add_test(Test1 t1)
add_test(Test2 t2)
add_test(Test3 t3)

but may be I'm missing something about your "2 versions"?

> Some tests require shared libraries from both versions. So I created
> the new install component for tests, but I cannot address them for
> CTest.

Alternatively, may be you can decide that your needed
"temporary" install will always be in a fixed location relative to the
build tree:

${CMAKE_BINARY_DIR}/tempinstall/
then you always know where are installed the lib, executable etc...

-- 
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] crosscompiling: what happened after change cmakelists.txt?

2011-01-12 Thread Dave Milter
Hi,

when I run cmake like this:
cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-sdk-gcc.cmake
-DMY_TOOLCHAIN_PATH=$HOME/toolchains/sdk/ path/to/CMakeLists.txt

with toolchain-sdk-gcc.cmake:

SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)

SET(QT_QMAKE_EXECUTABLE ${MY_TOOLCHAIN_PATH}/bin/qmake)

# specify the cross compiler
SET(CMAKE_C_COMPILER   ${MY_TOOLCHAIN_PATH}/bin/arm-angstrom-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER ${MY_TOOLCHAIN_PATH}/bin/arm-angstrom-linux-gnueabi-g++)

all works fine,  it found suitable qt build for ARM,
but later if I modify CMakeLists.txt and type "make",
it lose right path to qmake (but right path to , replace it with path
to system qt, build for x86.

So question, how can I force cmake to cache

QT_QMAKE_EXECUTABLE like CMAKE_C_COMPILER, and do not lose
right path to qmake?
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
> Yes, make the tests run without installation. To give more advice, we'd
> need to know more about those "dependencies". Are they other
> executables? Data files? Libraries?

Well, if I could do that, I wouldn't ask ;)
I have 2 versions, which are built from the same sources. So I have to
have 2 different output directories. Some shared libraries are built
only for one version, but needed for both. CMake install process helps
perfectly here.
Some tests require shared libraries from both versions. So I created
the new install component for tests, but I cannot address them for
CTest.
-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Michael Wild
On 01/12/2011 01:24 PM, Alexey Livshits wrote:
>> What do you want to do?
> 
> I have some tests, which cannot be run without installation because of
> dependencies. So I need to specify the install path to add_test. Is
> there a better approach?
> 

Yes, make the tests run without installation. To give more advice, we'd
need to know more about those "dependencies". Are they other
executables? Data files? Libraries?


Michael
___
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] TRY_LINK and CheckCXXSourceLinks ??

2011-01-12 Thread Marcel Loose
>>> On 11-1-2011 at 21:51, in message
<20110111213036.af4c126...@public.kitware.com>, Rolf Eike Beer
 wrote: 
> Am Dienstag, 11. Januar 2011, 11:20:06 schrieb David Cole:
>> Yes... this confused me when I first encountered it as well.
>> 
>> TRY_COMPILE is misnamed in CMake.
>> 
>> In functionality, it's actually a TRY_LINK operation.
> 
> Update the doc?
> 
> Eike

I opened an issue for this:
http://public.kitware.com/Bug/view.php?id=11688

Marcel.

___
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 assign version numbers from a source header to CMake variables?

2011-01-12 Thread Alexey Livshits
2011/1/12 SF Markus Elfring :
> Hello,
>
> I would like the add the CMake approach for software generation to a
> project. My project example supports also other build tools.
> This has got consequences on the way how informations like version numbers
> are shared between these approaches.
>
> The CMake tutorial describes components for the desired solution (in the
> section "Adding a Version Number and Configured Header File").
> http://cmake.org/cmake/help/cmake_tutorial.html
>
> I imagine to add a specific header file that will contain the shared data in
> the format of the source programming language. This will be a few C/C++
> preprocessor definitions.
> Now I would like to know how to get these informations into CMake variables
> for further reuse. I would appreciate your advices.
>
> Regards,
> Markus

Hello Markus,
I use a simple text file with the build number, which is tracked under
VCS. During the build I parse it, generate my version header, increase
the number, save it to the file and check it in. Maybe this could be
helpful for you.
-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
> What do you want to do?

I have some tests, which cannot be run without installation because of
dependencies. So I need to specify the install path to add_test. Is
there a better approach?

-- 
BG,
Alexey
___
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] redirect object output directory

2011-01-12 Thread David Cole
It is *possible*, but you would have to change the source code to CMake...

We select directories on a per-target basis to avoid name clashes between
object files named the same but from different targets.

There is no way to adjust it as a project CMakeLists writer...
intentionally. We view it as helping you avoid name clashes.

Is there a reason you need to put them in a certain place? Or do you just
want to have the same organization as you had before adopting CMake? Or...?

HTH,
David


On Wed, Jan 12, 2011 at 6:54 AM, Andrea Galeazzi  wrote:

> Is it possible to change the default path (project.dir) where the object
> files (.o or .obj) are put?
> ___
> 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] Path to installed target

2011-01-12 Thread Eric Noulard
2011/1/12 Alexey Livshits :
> Hello,
> how can I determine the path to installed target?

When ?
If it is inside a CMakeLists.txt i.e. at CMake time usually you can't
unless you specify absolute install path in your install rules.

> The problem is, if I
> set DESTDIR for example "D:\", I the install path becomes
> "D:\Programme\", so I cannot use DESTDIR to determine
> the path.

That's the purpose of DESTDIR?
What do you want to do?


-- 
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] redirect object output directory

2011-01-12 Thread Andrea Galeazzi
Is it possible to change the default path (project.dir) where the object 
files (.o or .obj) are put?

___
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 assign version numbers from a source header to CMake variables?

2011-01-12 Thread SF Markus Elfring

Are you using source control?


Yes. - But there are challenges to query content management systems in a 
portable way.




I use a combination of version in the main CMakeLists.txt and the svn
rev. Variables from these get into a generated project header file
that is also generated in the main CMakeLists.txt


I imagine a data flow like the following file example.
"shared_data.h" ⇒ "project_specifications.cmake" ⇒ "config.h.in"

Does my idea fit to your software generation approaches?

Regards,
Markus
___
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 assign version numbers from a source header to CMake variables?

2011-01-12 Thread John Drescher
> I would like the add the CMake approach for software generation to a
> project. My project example supports also other build tools.
> This has got consequences on the way how informations like version numbers
> are shared between these approaches.
>
> The CMake tutorial describes components for the desired solution (in the
> section "Adding a Version Number and Configured Header File").
> http://cmake.org/cmake/help/cmake_tutorial.html
>
> I imagine to add a specific header file that will contain the shared data in
> the format of the source programming language. This will be a few C/C++
> preprocessor definitions.
> Now I would like to know how to get these informations into CMake variables
> for further reuse. I would appreciate your advices.
>

Are you using source control?

I use a combination of version in the main CMakeLists.txt and the svn
rev. Variables from these get into a generated project header file
that is also generated in the main CMakeLists.txt

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] How to assign version numbers from a source header to CMake variables?

2011-01-12 Thread SF Markus Elfring

Hello,

I would like the add the CMake approach for software generation to a project. My 
project example supports also other build tools.
This has got consequences on the way how informations like version numbers are 
shared between these approaches.


The CMake tutorial describes components for the desired solution (in the section 
"Adding a Version Number and Configured Header File").

http://cmake.org/cmake/help/cmake_tutorial.html

I imagine to add a specific header file that will contain the shared data in the 
format of the source programming language. This will be a few C/C++ preprocessor 
definitions.
Now I would like to know how to get these informations into CMake variables for 
further reuse. I would appreciate your advices.


Regards,
Markus
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
Hello,
how can I determine the path to installed target? The problem is, if I
set DESTDIR for example "D:\", I the install path becomes
"D:\Programme\", so I cannot use DESTDIR to determine
the path.

-- 
BG,
Alexey
___
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