[CMake] problems with multiple relocateable components

2016-01-28 Thread Thomas Lehmann
I'm currently "fighting" with the relocation using cpack ...
When creating an executable AND a library resulting in
two RPM's with two different paths lets say ...

 - /foo/bin/mybin| executable
 - /usr/local/include| library headers
 - /usr/local/lib64  | library binary file

That's how I configured the components ...

set(CPACK_RPM_bin_PACKAGE_PREFIX "/foo/bin")
set(CPACK_RPM_devel_PACKAGE_PREFIX "/usr/local")

I alway get this:

CMake Warning (dev) at /usr/share/cmake-3.4/Modules/CPackRPM.cmake:633
(message):
  CPackRPM:Warning: Path /usr/lib64/libfoo.a is not on one of the
  relocatable paths! Package will be partially relocatable.
Call Stack (most recent call first):
  /usr/share/cmake-3.4/Modules/CPackRPM.cmake:1282
(cpack_rpm_prepare_relocation_paths)
  /usr/share/cmake-3.4/Modules/CPackRPM.cmake:1770
(cpack_rpm_generate_package)

I guess ... I can use CPACK_RPM_RELOCATION_PATHS but my problem is
that I don't know the installation path in the sub directory of the library
since
I did add_subdirectory(Library) ...

Any idea, comments, proposes?

Kind Regards,
Thomas
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] How to on multiple RPM packages

2016-01-15 Thread Thomas Lehmann
Hi,

We are currently looking forward to migrate to CMake and
we are struggling a bit with cpack.

The first project we migrate provides a executable binary but also
a library and its headers.

I do not find an example on how to provide separate RPM's
for them; one for the binary and one for the headers+library.
The required results (rough example):

- foo-1.2.3.4-1.x86_64.rpm
- libfoo-1.2.3.4-1.x86.64.rpm

Anybody who can help us with this?

Regards,
Thomas
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Dependency not executed, why?

2010-11-19 Thread Thomas Lehmann
- cmake 2.8.2
- the removing of the 'S' is not solving the problem.



Thomas Lehmann
Scrum Master

RTS Realtime Systems Software GmbH, Rembrandtstrasse 13, D-60596 Frankfurt am 
Main
T: +49.69.61009.0 / F: +49.69.61009.181

Sitz: Frankfurt am Main - HRB 84467 Amtsgericht Frankfurt am Main
Geschäftsführer: Steffen Gemuenden, Igor Sluga

www.rtsgroup.net

This email and any attachments are for the exclusive and confidential use of 
the intended recipient. If you are not the intended recipient, or an employee 
or agent responsible for delivering this message to the intended recipient, 
please do not read, distribute or take action in reliance upon this message. If 
you have received this in error, please notify me immediately by return email 
and promptly delete this message and its attachments from your computer system.
-Original Message-
 From: Eric Noulard [mailto:eric.noul...@gmail.com]
 Sent: Freitag, 19. November 2010 08:43
 To: Thomas Lehmann
 Cc: cmake@cmake.org
 Subject: Re: [CMake] Dependency not executed, why?

 2010/11/19 Thomas Lehmann t.lehm...@rtsgroup.net
 
  Hi,
 
 
 
  I've found an example to use bison and flex in cmake.
 
  I have a static library where I want to add the generated
 
  sources but the dependencies are not triggered. Why?
 
 
 
  project(test)
 
 
 
  include_directories(.
 
  ${CMAKE_BINARY_DIR}/libs/test)
 
 
 
  add_custom_target(ScannerAndParser echo Creating scanner.cxx and
 parser.cxx)
 
 
 
  add_custom_command(
 
  SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/scanner.l
 
  COMMAND flex
 
  ARGS -o ${CMAKE_BINARY_DIR}/libs/test/scanner.cxx
 
  ${CMAKE_CURRENT_SOURCE_DIR}/scanner.l
 
  TARGET ScannerAndParser
 
  DEPENDS ${CMAKE_BINARY_DIR}/libs/test/scanner.cxx
 
  OUTPUTS ${CMAKE_BINARY_DIR}/libs/test/scanner.cxx)


 OUTPUTS (with 'S') should be OUTPUT (without 'S')

 I don't know the SOURCE option ?

 Which version of CMake do you use?

 --
 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] Dependency not executed, why?

2010-11-18 Thread Thomas Lehmann
Hi,

I've found an example to use bison and flex in cmake.
I have a static library where I want to add the generated
sources but the dependencies are not triggered. Why?

project(test)

include_directories(.
${CMAKE_BINARY_DIR}/libs/test)

add_custom_target(ScannerAndParser echo Creating scanner.cxx and parser.cxx)

add_custom_command(
SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/scanner.l
COMMAND flex
ARGS -o ${CMAKE_BINARY_DIR}/libs/test/scanner.cxx
${CMAKE_CURRENT_SOURCE_DIR}/scanner.l
TARGET ScannerAndParser
DEPENDS ${CMAKE_BINARY_DIR}/libs/test/scanner.cxx
OUTPUTS ${CMAKE_BINARY_DIR}/libs/test/scanner.cxx)

add_custom_command(
SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/parser.y
COMMAND bison
ARGS -y -d ${CMAKE_CURRENT_SOURCE_DIR}/parser.y
 -o ${CMAKE_BINARY_DIR}/libs/test/parser.cxx
TARGET ScannerAndParser
DEPENDS ${CMAKE_BINARY_DIR}/libs/test/parser.cxx
OUTPUTS ${CMAKE_BINARY_DIR}/libs/test/parser.cxx)

file(GLOB lib_sources *.cxx ${CMAKE_BINARY_DIR}/libs/test/scanner.cxx
${CMAKE_BINARY_DIR}/libs/test/parser.cxx)

set_source_files_properties(${CMAKE_BINARY_DIR}/libs/test/parser.cxx GENERATED)

add_library(test STATIC ${lib_sources})
add_dependencies(test ScannerAndParser)



Thomas Lehmann
Scrum Master

[cid:rts-logo.png@fbda10bfcd534b0b8e20728cd423552e]

RTS Realtime Systems Software GmbH, Rembrandtstrasse 13, D-60596 Frankfurt am 
Main
T: +49.69.61009.0 / F: +49.69.61009.181

Sitz: Frankfurt am Main - HRB 84467 Amtsgericht Frankfurt am Main
Gesch?ftsf?hrer: Steffen Gemuenden, Igor Sluga

www.rtsgroup.net

This email and any attachments are for the exclusive and confidential use of 
the intended recipient. If you are not the intended recipient, or an employee 
or agent responsible for delivering this message to the intended recipient, 
please do not read, distribute or take action in reliance upon this message. If 
you have received this in error, please notify me immediately by return email 
and promptly delete this message and its attachments from your computer system.
inline: rts-logo.png___
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] Howto to work with variables from central makefiles....

2010-11-17 Thread Thomas Lehmann
Hi all,

for an automatically forced include I have provided an
option like this:

set(WIN32_SPEC ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/global/win32_spec.h)
add_definitions(-FI ${WIN32_SPEC})

But when including this central file (find_package) the variable 
CMAKE_CURRENT_SOURCE_DIR
changes and then the path and filename of the header is wrong.

How to proceed best?
Can I avoid that for those set statement the variable is not overwritten by 
those
files including this central makefile?

Kind Regards
Thomas


Thomas Lehmann
Scrum Master

[cid:rts-logo.png@a9b66252e87e47c980cdfd1dfb10cfae]

RTS Realtime Systems Software GmbH, Rembrandtstrasse 13, D-60596 Frankfurt am 
Main
T: +49.69.61009.0 / F: +49.69.61009.181

Sitz: Frankfurt am Main - HRB 84467 Amtsgericht Frankfurt am Main
Gesch?ftsf?hrer: Steffen Gemuenden, Igor Sluga

www.rtsgroup.net

This email and any attachments are for the exclusive and confidential use of 
the intended recipient. If you are not the intended recipient, or an employee 
or agent responsible for delivering this message to the intended recipient, 
please do not read, distribute or take action in reliance upon this message. If 
you have received this in error, please notify me immediately by return email 
and promptly delete this message and its attachments from your computer system.
inline: rts-logo.png___
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] Howto to work with variables from central makefiles....

2010-11-17 Thread Thomas Lehmann
  for an automatically forced include I have provided an
 
  option like this:
 
 
 
  set(WIN32_SPEC
 ${CMAKE_CURRENT_SOURCE_DIR}/../../libs/global/win32_spec.h)

 May you could use an absolute reference using

 ${PROJECT_SOURCE_DIR}/libs/global/win32_spec.h

 if your project is name TOTO
 (from the PROJECT(TOTO CXX) statement)
 you use

 ${TOTO_SOURCE_DIR}/libs/global/win32_spec.h.

it depends on how I use cmake. I can use the root of all
sources or I use a subtree.
Let's say I have following setup.

/src/libs
/src/cmake
/src/apps

when I call cmake /src or cmake /src/apps is relating the
application to be build no difference but the variable CMAKE_SOURCE_DIR
will change. My central files are in /src/cmake.

I would like avoiding to redefine search paths and variables in each individual
makefile depending on its location in the source tree. One example:

code
# ensuring that packages are found
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
  ${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/make)

# most common definitions, macros, ... required by most projects
find_package(AllOptions)
/code

I think that the problem is that cmake does not know where the real root
is. I have not found something except adjusting an environment variable
but this is something I would like to avoid when possible...

Thomas




 
  add_definitions(-FI ${WIN32_SPEC})
 
 
  But when including this central file (find_package) the variable
 CMAKE_CURRENT_SOURCE_DIR
  changes and then the path and filename of the header is wrong.
 
 
 
  How to proceed best?
  Can I avoid that for those set statement the variable is not
 overwritten by those
  files including this central makefile?

 You may use a CACHED variable
 set(WIN32_SPEC ${PROJECT_SOURCE_DIR}/libs/global/win32_spec.h CACHE
 FILEPATH Central Include)

 the first calling this will set the value then other set will be
 ignored.
 If you want to override a CACHE var value you'll have to use FORCE set
 option.



 --
 Erk
 Membre de l'April - « promouvoir et défendre le logiciel libre » -
 http://www.april.org

Thomas Lehmann
Scrum Master

RTS Realtime Systems Software GmbH, Rembrandtstrasse 13, D-60596 Frankfurt am 
Main
T: +49.69.61009.0 / F: +49.69.61009.181

Sitz: Frankfurt am Main - HRB 84467 Amtsgericht Frankfurt am Main
Geschäftsführer: Steffen Gemuenden, Igor Sluga

www.rtsgroup.net

This email and any attachments are for the exclusive and confidential use of 
the intended recipient. If you are not the intended recipient, or an employee 
or agent responsible for delivering this message to the intended recipient, 
please do not read, distribute or take action in reliance upon this message. If 
you have received this in error, please notify me immediately by return email 
and promptly delete this message and its attachments from your computer system.
___
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] Using modules, adjusting CMAKE_MODULE_PATH

2010-11-02 Thread Thomas Lehmann
Hi all,

what I read is that I have to adjust CMAKE_MODULE_PATH so
that include or find_packages can work.

My problem is that I don't want to use environment variables
to tell where the root of all sources is:

set(CMAKE_MODULE_PATH ${ CMAKE_MODULE_PATH } ${SRCROOT})

But I really don't like the idea.

Now assume /src, /src/libs, /src/apps are some paths of the source tree.
In /obj I could do one of the following:

-  cmake /src
rebuild all.

-  cmake /src/libs  
 rebuild all libs.

-  cmake /src/appsrebuild 
all apps.

-  cmake /src/apps/concreteapp1  rebuild 
one app only.

For each scenario I want to ensure that I can find/include a module.
Is this possible?

Kind Regards
Thomas


Thomas Lehmann
Scrum Master

[cid:rts-logo.png@302c55e3a904430bbf60a70f8dc2ba7f]

RTS Realtime Systems Software GmbH, Rembrandtstrasse 13, D-60596 Frankfurt am 
Main
T: +49.69.61009.0 / F: +49.69.61009.181

Sitz: Frankfurt am Main - HRB 84467 Amtsgericht Frankfurt am Main
Gesch?ftsf?hrer: Steffen Gemuenden, Igor Sluga

www.rtsgroup.net

This email and any attachments are for the exclusive and confidential use of 
the intended recipient. If you are not the intended recipient, or an employee 
or agent responsible for delivering this message to the intended recipient, 
please do not read, distribute or take action in reliance upon this message. If 
you have received this in error, please notify me immediately by return email 
and promptly delete this message and its attachments from your computer system.
inline: rts-logo.png___
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] Using modules, adjusting CMAKE_MODULE_PATH

2010-11-02 Thread Thomas Lehmann
I have not changed anything in the source tree
and the current folder for the build tree is
empty before I start calling cmake.

The build is working fine (by the way) but this
warning disturbs.

CMP0011: Included scripts do automatic cmake_policy PUSH and POP.

I'm not sure what I should do now.
I have created a simple macro only including this in a project.

FindAllOptions.cmake:
cmake_minimum_required(VERSION 2.6)

macro(requires_lib target sources binaries)
if (TARGET ${target})
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/${sources}/${target}
 ${CMAKE_BINARY_DIR}/${binaries}/${target})
else  (TARGET ${target})
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${sources}/${target}
 ${CMAKE_BINARY_DIR}/${binaries}/${target})
endif (TARGET ${target})
endmacro(requires_lib)

Used here in a CMakeLists.txt:
# ensuring that packages are found
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
  ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/modules)

# most common options, macros, ... required by most projects
find_package(AllOptions)

project(app2)

# defining include dependencies:
include_directories( ../../libs/one
 ../../libs/two)

requires_lib(one ../../libs libs)
requires_lib(two ../../libs libs)

# all sources of current folder are required for this application:
file(GLOB sources *.cxx)

# defining the build target with the found sources:
add_executable(app2 ${sources})

# linking libraries to the application:
target_link_libraries(app2 one two)




Thomas Lehmann
Scrum Master

RTS Realtime Systems Software GmbH, Rembrandtstrasse 13, D-60596 Frankfurt am 
Main
T: +49.69.61009.0 / F: +49.69.61009.181

Sitz: Frankfurt am Main - HRB 84467 Amtsgericht Frankfurt am Main
Gesch?ftsf?hrer: Steffen Gemuenden, Igor Sluga

www.rtsgroup.net

This email and any attachments are for the exclusive and confidential use of 
the intended recipient. If you are not the intended recipient, or an employee 
or agent responsible for delivering this message to the intended recipient, 
please do not read, distribute or take action in reliance upon this message. If 
you have received this in error, please notify me immediately by return email 
and promptly delete this message and its attachments from your computer system.
-Original Message-
 From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf
 Of Rolf Eike Beer
 Sent: Dienstag, 2. November 2010 14:01
 To: cmake@cmake.org
 Subject: Re: [CMake] Using modules, adjusting CMAKE_MODULE_PATH

  Hi all,
 
  your solution is working fine but I got this message:
 
  CMake Error: The source
  F:/Checkouts/prototyping/cmake_sandbox/CMakeLists.txt does not match
 the
  source F:/Checkouts/prototyping/cmake_sandbox/rtd/CMakeLists.txt
 used to
  generate cache.  Re-run cmake with a different source directory.
 
  f:\Checkouts\prototyping\cmake_sandbox\objcmake ../rtd
  CMake Warning (dev) at app2/CMakeLists.txt:6 (find_package):
Policy CMP0011 is not set: Included scripts do automatic
 cmake_policy
  PUSH
and POP.  Run cmake --help-policy CMP0011 for policy details.  Use
 the
cmake_policy command to set the policy and suppress this warning.
 
The included script
 
 
 F:/Checkouts/prototyping/cmake_sandbox/cmake/modules/FindAllOptions.cmak
 e
 
affects policy settings.  CMake is implying the NO_POLICY_SCOPE
 option
  for
compatibility, so the effects are applied to the including context.
  This warning is for project developers.  Use -Wno-dev to suppress it.
 
  -- Configuring done
  -- Generating done
  -- Build files have been written to:
  F:/Checkouts/prototyping/cmake_sandbox/obj

 You try to reuse a CMake build try. That will never work. Once you have
 configured a build tree the source directory (the location, not the
 contents) must not change. Use multiple build trees.

 Eike
 ___
 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] Using msbuild

2010-11-01 Thread Thomas Lehmann
Hi all,

on Unix  I can use make install but I have no clue how
do it on windows. Can somebody please help?

This is what I have defined in my demo environment:
install(TARGETS app2 RUNTIME DESTINATION ${CMAKE_BINARY_DIR}/bin)

Try:
msbuild Project.sln /target:install
 INSTALL:
  The project INSTALL is not selected for building in solution configuration 
 Debug|Win32.

Kind Regards
Thomas


Thomas Lehmann
Scrum Master

[cid:rts-logo.png@383e954c38bc4c12a7162081b917ee07]

RTS Realtime Systems Software GmbH, Rembrandtstrasse 13, D-60596 Frankfurt am 
Main
T: +49.69.61009.0 / F: +49.69.61009.181

Sitz: Frankfurt am Main - HRB 84467 Amtsgericht Frankfurt am Main
Gesch?ftsf?hrer: Steffen Gemuenden, Igor Sluga

www.rtsgroup.net

This email and any attachments are for the exclusive and confidential use of 
the intended recipient. If you are not the intended recipient, or an employee 
or agent responsible for delivering this message to the intended recipient, 
please do not read, distribute or take action in reliance upon this message. If 
you have received this in error, please notify me immediately by return email 
and promptly delete this message and its attachments from your computer system.
inline: rts-logo.png___
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] Using msbuild

2010-11-01 Thread Thomas Lehmann
Perfect!
Why does it not work with msbuild  directly?

Kind Regards
Thomas


f:\Checkouts\prototyping\cmake_sandbox\objcmake --build . --target install

Microsoft (R) Visual Studio Version 9.0.21022.8.
Copyright (C) Microsoft Corp. Alle Rechte vorbehalten.
1


Thomas Lehmann
Scrum Master

-- Erstellen gestartet: Projekt: INSTALL, Konfiguration: Debug Win32 --
1
1Postbuildereignis wird ausgeführt...
1-- Install configuration: Debug
1-- Installing: F:/Checkouts/prototyping/cmake_sandbox/obj/bin/app1.exe
1-- Installing: F:/Checkouts/prototyping/cmake_sandbox/obj/bin/app2.exe
1Das Buildprotokoll wurde unter 
file://f:\Checkouts\prototyping\cmake_sandbox\obj\INSTALL.dir\Debug\BuildLog.htm
 gespeichert.
1INSTALL - 0 Fehler, 0 Warnung(en)
== Erstellen: 1 erfolgreich, Fehler bei 0, 6 aktuell, 0 übersprungen 
==

From: David Cole [mailto:david.c...@kitware.com]
Sent: Montag, 1. November 2010 14:22
To: Thomas Lehmann
Cc: cmake@cmake.org
Subject: Re: [CMake] Using msbuild

If you open up the sln file in Visual Studio, is there an INSTALL target?

You can try using cmake --build on the command line:

cmake --build . --target install --config Debug

Should work...


Let us know,
David

On Mon, Nov 1, 2010 at 8:30 AM, Thomas Lehmann 
t.lehm...@rtsgroup.netmailto:t.lehm...@rtsgroup.net wrote:
Hi all,

on Unix  I can use make install but I have no clue how
do it on windows. Can somebody please help?

This is what I have defined in my demo environment:
install(TARGETS app2 RUNTIME DESTINATION ${CMAKE_BINARY_DIR}/bin)

Try:
msbuild Project.sln /target:install
 INSTALL:
  The project INSTALL is not selected for building in solution configuration 
 Debug|Win32.

Kind Regards
Thomas


Thomas Lehmann
Scrum Master

Error! Filename not specified.

RTS Realtime Systems Software GmbH, Rembrandtstrasse 13, D-60596 Frankfurt am 
Main
T: +49.69.61009.0 / F: +49.69.61009.181

Sitz: Frankfurt am Main - HRB 84467 Amtsgericht Frankfurt am Main
Geschäftsführer: Steffen Gemuenden, Igor Sluga
www.rtsgroup.nethttp://www.rtsgroup.net

This email and any attachments are for the exclusive and confidential use of 
the intended recipient. If you are not the intended recipient, or an employee 
or agent responsible for delivering this message to the intended recipient, 
please do not read, distribute or take action in reliance upon this message. If 
you have received this in error, please notify me immediately by return email 
and promptly delete this message and its attachments from your computer system.

___
Powered by www.kitware.comhttp://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] How to differ?

2010-10-29 Thread Thomas Lehmann
Hi,

I'm new to the cmake tool trying to find out how to apply
this best to our system. Here's a problem I would like
to know how to do best:

Assume following setup:

-  /projects/libs/one

-  /projects/libs/two

-  /projects/apps/first

-  /projects/apps/two

Both application are using both libraries.
Being in /tmp/obj 

I have  some options to prepare a build:

-  cmake /projects   (this means: intending to build all)

-  cmake /projects/libs (this means: intending to  build all libraries 
only)

-  cmake /projects/apps (this means: intending to build all 
applications)

-  cmake /projects/apps/first (this means: intending to build app 
first only)

Now the question(s):

-  Using build all is fine. I'm using link_directories for both 
applications.
But using the last two examples I fail with cannot find -lone (and two).
How can I fix this?

-  I know I could use include_subdirectory but then I fail with first 
and third
example. I will get a message like another target with same name already 
exists.
Both question are relating to same.

We would like to be flexible...
Could somebody provide a little help please?

Kind Regards
Thomas





Thomas Lehmann
Scrum Master

[cid:rts-logo.png@c547960bd3b149468eddcd645a5a1841]

RTS Realtime Systems Software GmbH, Rembrandtstrasse 13, D-60596 Frankfurt am 
Main
T: +49.69.61009.0 / F: +49.69.61009.181

Sitz: Frankfurt am Main - HRB 84467 Amtsgericht Frankfurt am Main
Gesch?ftsf?hrer: Steffen Gemuenden, Igor Sluga

www.rtsgroup.net

This email and any attachments are for the exclusive and confidential use of 
the intended recipient. If you are not the intended recipient, or an employee 
or agent responsible for delivering this message to the intended recipient, 
please do not read, distribute or take action in reliance upon this message. If 
you have received this in error, please notify me immediately by return email 
and promptly delete this message and its attachments from your computer system.
inline: rts-logo.png___
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 differ?

2010-10-29 Thread Thomas Lehmann
At the end you can see a version which was working well
but we found it somewhat complicated with the paths.


 1) Write a single CMake-enabled project with which you may build all
 or part of the project

 2) Write several separate CMake-enabled project which are inter-
 dependant?

 I would personnally try 1) unless you have good reason not to do so.
 The projects/CMakeLists.txt would be the main project
 consisting in some
 add_subdirectory(libs/)
 add_subdirectory(apps//)

Yes. we do that.

 then for each lib there will be some
 projects/libs//CMakeLists.txt consisting in
 add_library( list of source) command

Yes. we have this.

 and for each app there will be some
 projects/apps//CMakeLists.txt which contains
 add_executable( list of source)
 target_link_library( )
 include_directories(${CMAKE_SOURCE_DIR}/libs/)

Yes. But how do that program generate the libraries
when they are not build yet?


 from this structure you should be able to build part or all of the
 target
 just by calling the appropriate one. CMake should take care of building
 the dependencies using the target_link_library links.


cmake can be used for different paths in a source tree.

Trying to create both apps both are trying to build both
libraries on different locations - cmake complains.

The command after here fails without handling to use
link_directories or add_subdirectory properly:

/tmp/obj cmake /projects/apps

1) I can rebuild all
2) I can build a set of applications
3) I can build just one application

Independent on what scenario I use I want to ensure that
all dependencies are built and used.

Thomas


Thomas Lehmann
Scrum Master

RTS Realtime Systems Software GmbH, Rembrandtstrasse 13, D-60596 Frankfurt am 
Main
T: +49.69.61009.0 / F: +49.69.61009.181

Sitz: Frankfurt am Main - HRB 84467 Amtsgericht Frankfurt am Main
Gesch?ftsf?hrer: Steffen Gemuenden, Igor Sluga

www.rtsgroup.net

This email and any attachments are for the exclusive and confidential use of 
the intended recipient. If you are not the intended recipient, or an employee 
or agent responsible for delivering this message to the intended recipient, 
please do not read, distribute or take action in reliance upon this message. If 
you have received this in error, please notify me immediately by return email 
and promptly delete this message and its attachments from your computer system.
___
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