[CMake] Skipping Tests if FIXTURES_SETUP is skipped

2018-05-08 Thread Jörg Kreuzberger
Hi!

I'm working with the FIXTURES feature of the ctest's and find it very usefull.

I want to skip certain tests if the setup test is skipped

so i added a tests with SKIP_RETURN_CODE feature and set it as FIXTURES_SETUP 
"tty" (just calling command tty -s on unix)
my assumption is that now all tests with FIXTURES_REQUIRED "tty" are also 
skipped.
but it does not seem so. The setup test is skipped, but all tests are executed 
(and fail)

The documentation only says the if the SETUP tests FAILS, the tests requiring 
the FIXTURES_SETUP are not executed,
but then the setup test itself goes into FAIL count, i want it to be skipped

It this a bug or are there better solutions than my hack? I now generate files 
in setup test and add them as REQUIRED_FILES in the dependent tests.


Any help appreciated,
Joerg

-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] CPack Multicore Usage

2017-07-24 Thread Jörg Kreuzberger
I think i had a wrong understanding of the cpack process itself.
so i did a cmake configure and called cpack to build the software and generate 
the packages (deb, tgz)
but better would be to
configure, build with make -jx and then call cpack, cause cpack does not 
"rebuild" the software again, it uses the compiled software and just starts the 
"install" into its _CPack_Packages subdirectories

Thank for your patience :-)


-Ursprüngliche Nachricht-
Von:Chuck Atkins <chuck.atk...@kitware.com>
Gesendet:   Fr 21.07.2017 21:32
Betreff:Re: [CMake] CPack Multicore Usage
An: Konstantin Tokarev <annu...@yandex.ru>; 
CC: Jörg Kreuzberger <j.kreuzber...@procitec.de>; cmake@cmake.org; 
>  
> > In calls to cpack only one core is used if Makefiles are used. Is there any 
> option to enable multicore?
> 
> It depends on what your trying to achieve.  Typically the bottleneck for 
> CPack 
> is in the compression step of the resulting tar (or rpm, etc.).  In that 
> case, 
> CMake is limited by the libarchive, libz, libbz2, liblzma, etc. 
> implementations 
> it's linked to, which are typically single threaded.  It's really no 
> different 
> than taking an install tree and running "tar -czf foo.tgz 
> /path/t/foo-prefix".  
> So in that sense, even if you can parallelizes the "temporary" install step 
> where it collects the files to packages, actually generating and compressing 
> the package, which is the costly part, will likely remain a single process.
> 
> 
> 
>

-- 

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] CPack Multicore Usage

2017-07-20 Thread Jörg Kreuzberger
Hi

My Project is compiling multicore without any problems using Unix makefiles or 
ninja.

In calls to cpack only one core is used if Makefiles are used. Is there any 
option to enable multicore?
If i use ninja in cpack builds, the cpack build is broken, cause there seems no 
dependencies considered?

Is ninja use in cpack intended? Or are there any contraints using ninja and 
cpack?

Greetz, Joerg

-- 

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] cmake install behaviour with git

2015-10-01 Thread Jörg Kreuzberger
-Ursprüngliche Nachricht-
Von:Nils Gladitz <nilsglad...@gmail.com>
Gesendet:   Do 01.10.2015 09:40
Betreff:Re: [CMake] cmake install behaviour with git
An:     Jörg Kreuzberger <j.kreuzber...@procitec.de>; cmake@cmake.org; 
> On 10/01/2015 08:35 AM, Jörg Kreuzberger wrote:
> > This comes from installs, there we install some configuration files with 
> > the 
> builded targets.
> > e.g. you install a builded executable, together with an config xml file 
> > from 
> SCM.
> > If you make a product install, you want to "overwrite" the original config 
> xml with an "product" xml config
> > file, also from the SCM.
> >
> > So there are two install steps, the second "configure/modify" some files of 
> the first. This worked cause the file
> > timestamps differed. Now not, cause the second install gets "Up-to-date" 
> message and has to use CMAKE_ALWAYS_INSTALL.
> 
> I don't comprehend this at all.
> Why would the two instances of the config file with distinct content 
> have the same modification time in this scenario?

cause they come from git clone and git sets the timestamp of the files to the 
time of the clone,
not of the "original" modification time. So after a clone all files(!) have the 
same timestamp.

> Could you provide a minimal, self-contained test case that reproduces 
> this issue?
should be now problem, i send it later to you.

> I don't think that makes much sense.
> 
> A modified file is much more likely to retain its size than its 
> modification time.
i sense of "builded files" yes, in sense of files only coming from SCM not

> So if modification times really stay the same for some reason the file 
> size on its own would be a very error prone change indicator.
But better than noting. best would be a hash to detect modified content, but 
this will take some time to prove...

Ok, as i now understood nobody has a similar scenario and i will try to get it 
workaround by myself

Thanks all for support!

-- 

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] cmake install behaviour with git

2015-10-01 Thread Jörg Kreuzberger
> > 
> > Now install behaves differnt, cause cmake checks only file time difference. 
> Files previously overwritten are now
> > considered Up-to-date
> 
> Why would you want to overwrite files that have not changed? 

This comes from installs, there we install some configuration files with the 
builded targets.
e.g. you install a builded executable, together with an config xml file from 
SCM.
If you make a product install, you want to "overwrite" the original config xml 
with an "product" xml config
file, also from the SCM.

So there are two install steps, the second "configure/modify" some files of the 
first. This worked cause the file
timestamps differed. Now not, cause the second install gets "Up-to-date" 
message and has to use CMAKE_ALWAYS_INSTALL.

The same "application install" is used in "product install" there we bundle 
several applications to an "product" and then apply product specific 
configuration, modifying some xml files (same name, different size, normaly 
different timestamp :-) )

The idea behind this install overwrite is that we could provide an install for 
an application with "default" configuration, so that any developer could use 
the application without further need to add additonal files (all files to run 
the application like config files, shared libraries and so on).

> We?re using CMake with git without any trouble - no solution to be found. The 
> install target works flawlessly and as expected.

I do agree with you, except for this scenario of non-builded files. So the 
question is ok, why not consider the file size in up-to-date check.
Should be not to expensive to get this information together with the file time 
from the os.

> I think you?ll need to provide some more details about what you?re doing. Are 
> you by any chance doing in-source builds? Why are you so focussed on 'git 
> clone?? That is the kind of thing you would do once, and then almost never 
> again, so I don?t see how that can be related to running an install target.

We do not make an in-source-builds. i am focused on git clone cause we do it on 
our SOFTWARE RELEASE systems.
These are virtual machines, upstarting for any release build, cloning (with 
depth=1) the software and start builds,
install, and package creation (rpm and msi). For those builds the "former" 
behaviour is broken.

I do also not want to start a discussion about this git clone behaviour, i 
accepted this as is. I think the solutions provided in groups, aplying the 
timestamps after checkout from any meta data is also no good idea. The concept 
of the
modified timestamps is also still good for the builded install files.

Thanks for your patience, if you read this mail to the end :-)
Joerg

-- 

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] cmake install behaviour with git

2015-10-01 Thread Jörg Kreuzberger
> What was unclear to me is that it now sounds like you are installing two 
> distinct files from your repository to the same destination file rather 
> than re-installing a modified version of the same file.
Yes, your are right i am doing exactly this

> I think that is conceptually an error prone thing to do irregardless of 
> the SCM in use.
yes you are right, but it worked until the git change :-)
i will fix it in your CMakeLists.txt

-- 

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] cmake install behaviour with git

2015-09-30 Thread Jörg Kreuzberger
Hi!

the cmake install behaviour of files was ok for me, as long as we used svn.
Now we changed to git and i have a problem now with the install behaviour.

On git the timestamps of all files get the time of the clone. So files not build
(e.g. configuration files, xml files etc) from the repository have the same 
timestamp.

Now install behaves differnt, cause cmake checks only file time difference. 
Files previously overwritten are now
considered Up-to-date

I am forcing now overwrite with CMAKE_ALWAYS_INSTALL, but this takes then a 
long time, cause now all
binary files (with differnt timestamps) get installed (e.g. huge qt dlls, 
executables etc :-) )

Has anyone found a solution for this after a git migration?
Adapting the file timestamps after clone seems not the thing i want to do :-)
Or should i post a feature-request to check also the file size for Up-to-date 
checking?

Thanks for any hints,
Joerg

-- 

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] Code Coverage of CMake Scripts

2015-07-14 Thread Jörg Kreuzberger
Hi!

i just want to get coverage information from the configure step itself
to find uncovered cmake makros and scripts.

The --trace option seems to be the way to do it.
is there any tool/script available to get these information in a good report?

BEST solution would be something like lgov or govr :-)

Thanks for any suggestions :-)

Joerg

-- 

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] MinGW and sh.exe

2015-06-17 Thread Jörg Kreuzberger
Hi!

i get an error at cmake configure step on windows with -G MinGW Makefiles, if 
the OpenSSH bin folder is in the PATH environment cause cmake detects sh.exe 
and then throws an error. This seems to be intended due to this link
http://www.cmake.org/Wiki/CMake_MinGW_Compiler_Issues
But if i now configure a second time, everything is fine and the generated 
MinGW Makefiles are generated properly and could be build normaly with 
mingw32-make wihtout any msys or sh environment.

So is the first cmake error an error? The link ist quite old (2006)

Thanks for any help.
Joerg

-- 

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] find_file unexpected finds

2015-05-08 Thread Jörg Kreuzberger
Hi!

i have a problem with find_file, finding files in directory structures not part 
of the PATHS option and no other CMAKE VARIABLES relevant to find_file set.

I use find_file to find external libraries in different versions, they are 
located in different git repos.
each repo has its find script
E.g.

base/libexternv1/cmake/FindLibExternV1.cmake
base/libexternv1/lib/win/alib.lib
base/libexternv2/cmake/FindLibExternV2.cmake
base/libexternv2/lib/win/alib.lib
base/project/CMakeLists.txt - the CMAKE_SOURCE_DIR

the project now includes the correct FinLibExternV2.cmake (using include( 
../libexternv1/cmake/FindLibExternV2.cmake )
in FindLibExternV2, the lib search with findfile

find_file( VAR  alib.lib PATHS ${CMAKE_CURRENT_LIST_DIR}/../lib/win/alib.lib )

My problem is: it always finds the lib from the libexternv1 directory, seems to 
ignore the PATHS hint. FindLibExternV1.cmake is never included.

Environment: CMAKE 3.2.2 and Visual Studio Generator 2013 x64 on Win7

-- 

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] CMP0054 and CMake Modules

2015-03-26 Thread Jörg Kreuzberger
Updated to cmake 3.2.1 from 3.0.0 and got several hints due to POLICY CMP0054 
(handling of quoted variables)

i set the policy to new and changed my local cmake files.

But i also got a warning from CMake Modules like FindMFC.cmake (Line 39).

do i make something wrong or is this an Error in FindMFC which i have to report?

Can i assume that ALL Modules provided with normal cmake install support this 
policy with NEW?
Currently i get no warning from other modules if policy is unset.
i also assume i can change the policy during cmake processing?

(e.g. set the behaviour to old, include FindMFC.cmake, set the behaviour to new 
and do the rest of my CMakeLists.txt)

Thanks for any support,
Joerg

-- 

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] Visual Studio Dependencies broken for custom target sln

2015-02-19 Thread Jörg Kreuzberger
Hi!

I have a problem with visual studio dependencies that i actually do not 
understand. Perhaps you can give me an hint.
I have made my libs, apps with cmake successfull and everything is fine with 
any SINGLE Configuration generator, even
jom nmake makefiles, linux, etc.

For building my apps serveral custom targets and custom commands are defined to 
build additinal files (e.g. qm files and others) and dependencies added with 
add_dependencies()

To have shortcuts for the build (that means build and install only a few of all 
apps) i have also made a custom target (empty) named e.g. buildNetwork with 
dependencies to some other targets (apps) for compilation and install in an 
extra CMakeLists.txt with seperate project() name

Now the question:

if i use the top-level-solution in ${CMAKE_BINARY_DIR}, the custom target 
buildNetwork builds with all dependencies, that means with all applications 
and their custom targets( e.g. for qm file creation).

if i use the solution for my buildNetwork custom target, the sln includes all 
applications, custom targets.
But if i build, it only builds the dependent applications, but not their 
dependent custom targets.
That means e.g. if i use this solution, i do not get any qm files. It tries to 
build them, but they are excluded in the configuration of the sln (skipped 
during build)

Workaround seems to be that i must use the ALL keyword in my custom targets, 
but i thought i do not need this and handle it via the explicit set 
dependencies, like it worked for the other generators

Cmake Version used is 3.0.0 and Generator is VS 2013 x64

-- 

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] Visual Studio Dependencies broken for custom target sln

2015-02-19 Thread Jörg Kreuzberger
Dependency handling works with 3.2-rc1. So i will migrate.

-- 

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] INSTALL with FILES and generator expressions

2014-11-21 Thread Jörg Kreuzberger
Hi!

i would like to install files with generator expressions. I define a variable 
with my qt install files.
These looks like this:

QT_INSTALL_FILES 
$$CONFIG:Debug:/home/src/qt/486-64-dbg/lib/libQtCore-486-ubgcc482x64.so.4;$$CONFIG:Release:/home/src/qt/486-64-dbg/lib/libQtCore-486-ubgcc482x64.so.4;$$CONFIG:Debug:/home/src/qt/486-64-dbg/lib/libQtXml-486-ubgcc482x64.so.4;$$CONFIG:Release:/home/src/qt/486-64-dbg/lib/libQtXml-486-ubgcc482x64.so.4;/home/src/s4_branch/s4/src/procitec/src/tools/internal/genmaw/$$CONFIG:Debug:/home/src/qt/486-64-dbg/lib/libQtCore-486-ubgcc482x64.so.4;/home/src/s4_branch/s4/src/procitec/src/tools/internal/genmaw/$$CONFIG:Release:/home/src/qt/486-64-dbg/lib/libQtCore-486-ubgcc482x64.so.4;/home/src/s4_branch/s4/src/procitec/src/tools/internal/genmaw/$$CONFIG:Debug:/home/src/qt/486-64-dbg/lib/libQtXml-486-ubgcc482x64.so.4;/home/src/s4_branch/s4/src/procitec/src/tools/internal/genmaw/$$CONFIG:Release:/home/src/qt/486-64-dbg/lib/libQtXml-486-ubgcc482x64.so.4

If i now install, cmake prepends the CMAKE_CURRENT_SOURCE_DIR to the files and 
fails with cannot find file /my/current/source/dir/home/

Why is the file detected as full path?
Environment is unix and cmake 3.0, generator is unix makefiles

Thanks for any help
Joerg

-- 

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] INSTALL with FILES and generator expressions

2014-11-21 Thread Jörg Kreuzberger
Ok, found the issues.
A little later in the script a collegue added a few lines which resolved the 
files with realpath.
this seems to corrupt the generator expression :-)

after removing those lines, everything workes as expected.

Have a nice weekend.
Joerg

-- 

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] Philosophy with Tests for Beginners

2014-10-16 Thread Jörg Kreuzberger
Hi!

I have a question regarding handling with tests.
currently my sources are build together with tests. the tests in the binary 
location could be executed via make test or ctest. So far so good.

Considering our Jenkins / Build Configurations i want to seperate build and 
tests. That means i want to build the tests with JOB A and execute them on JOB 
B.
So i have to bring the tests from A to B.
This could i do if i e.g. install the tests (adding install command in 
CMakeLists) and execute them and find them via scripts.

Is there another solution (e.g. undocumented CMAKE_PACKAGE_TEST ) or another 
approach that solves my problem in a way that i can use e.g. ctest in the other 
jobs too?

Other questions is about handling extra files. So i have for example a test 
which relies on a test file. Currently i copy it as PRE_BUILD step into the 
tests binary dir, so it is available on test execution. Is there a better 
approach without using an install step?

-- 

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] What is the CMake equivalent for autotools make dist ?

2014-10-14 Thread Jörg Kreuzberger
Hi!

This was also new to me, quite good. Question is now: i have configured cpack 
in my CMakeLists to use TGZ only (on linux).
The binary package is made as tgz. For the source 3 packages are generated (as 
in your example). How could this be
limited to the same as for the binaries or a different but just one?
With my sources it takes some time to package...


Subject: Re: [CMake] What is the CMake equivalent for autotools make
   dist ?

With CPack enabled, make help will show all the valid targets.  The
package_source target should be one of those targets.

A simple project on Linux built with make package_source gives me:

${CMAKE_BINARY_DIR}/_CPack_Packages/Linux-Source/{TZ,TGZ,TBZ2}/CPack_Example-0.1.1-Linux.tar.{bz2,gz,Z}

All three files contain all the source files in my
${CMAKE_SOURCE_DIR}.  (Including CMakeLists.txt)

Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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] What is the CMake equivalent for autotools make dist ?

2014-10-14 Thread Jörg Kreuzberger
Ok, found it: i must set CPACK_SOURCE_TZ to off to avoid the source to be 
packaged as tz.
its a little bit different as for the binary package, but ok.

Thanks

Joerg

Hi!

This was also new to me, quite good. Question is now: i have configured cpack 
in my CMakeLists to use TGZ only (on linux).
The binary package is made as tgz. For the source 3 packages are generated (as 
in your example). How could this be
limited to the same as for the binaries or a different but just one?
With my sources it takes some time to package...


Subject: Re: [CMake] What is the CMake equivalent for autotools make
  dist ?

With CPack enabled, make help will show all the valid targets.  The
package_source target should be one of those targets.

A simple project on Linux built with make package_source gives me:

${CMAKE_BINARY_DIR}/_CPack_Packages/Linux-Source/{TZ,TGZ,TBZ2}/CPack_Example-0.1.1-Linux.tar.{bz2,gz,Z}

All three files contain all the source files in my
${CMAKE_SOURCE_DIR}.  (Including CMakeLists.txt)

Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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] target_link_libraries on imported targets

2014-07-29 Thread Jörg Kreuzberger
Thanks, it worked like expected :-)

-Ursprüngliche Nachricht-
Von:Nils Gladitz nilsglad...@gmail.com
Gesendet:   Mo 28.07.2014 11:03
Betreff:Re: [CMake] target_link_libraries on imported targets
An: Jörg Kreuzberger j.kreuzber...@procitec.de; cmake@cmake.org; 
 On 07/28/2014 10:33 AM, Jörg Kreuzberger wrote:
 
  But on this imported targets i cannot define these link dependencies with 
 target_link_libraries. Which properties could i set on the IMPORTED Targets 
 to 
 get the same behaviour?
 
 http://cmake.org/cmake/help/v3.0/prop_tgt/INTERFACE_LINK_LIBRARIES.html
 
 Nils
 


Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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] target_link_libraries on imported targets

2014-07-28 Thread Jörg Kreuzberger
Hi!

i am using the cmake feature with target_link_libraries for static libraries to 
describe additional link dependencies from static libs e.g. to system libs and 
qt libraries.

The cmake files is use are used for developper build and customer build, but 
the customer does not get all source code to all libraries.

So i am using target definitions with imported targets.

But on this imported targets i cannot define these link dependencies with 
target_link_libraries. Which properties could i set on the IMPORTED Targets to 
get the same behaviour?

Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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] Source List Compilation Depending on Configuration

2014-07-21 Thread Jörg Kreuzberger
Hi!

if i want to add sources to list of compilation i can rely on CMAKE_BUILD_TYPE.
E.g if i want to add a source file only for release, i append it to list of 
source files only then.

BUT: how can i do this for multi configuration like vs?
So i want to add it to the sources, so that it appears in vs, but only want to 
compile it in release build?

Is there an easy way to handle this?

Thanks,
Joerg

Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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] Source List Compilation Depending on Configuration

2014-07-21 Thread Jörg Kreuzberger
Hm, following your suggestion i replace lines
if( ${CMAKE_BUILD_TYPE} STREQUAL Release)
add_definitions( -DNDEBUG )
endif()

with 
set_directory_properties( PROPERTIES COMPILE_DEFINITIONS_RELEASE 
${COMPILE_DEFINITIONS_RELEASE};NDEBUG )

it didnt worked. ( inspecting e.q. flags.make and compilation )

if i set COMPILE_DEFINITIONS (without config) it worked. This is the point i 
stuct like above again.



-Ursprüngliche Nachricht-
Von:Nils Gladitz nilsglad...@gmail.com
Gesendet:   Mo 21.07.2014 12:13
Betreff:Re: [CMake] Source List Compilation Depending on Configuration
An: Jörg Kreuzberger j.kreuzber...@procitec.de; cmake@cmake.org; 
 On 07/21/2014 11:46 AM, Jörg Kreuzberger wrote:
  Hi!
 
  if i want to add sources to list of compilation i can rely on 
 CMAKE_BUILD_TYPE.
  E.g if i want to add a source file only for release, i append it to list of 
 source files only then.
 
  BUT: how can i do this for multi configuration like vs?
  So i want to add it to the sources, so that it appears in vs, but only want 
 to compile it in release build?
 
  Is there an easy way to handle this?
 
 I don't think CMake supports configuration specific source files (I 
 assume this might not be supported by all target build systems?).
 
 It should be possible to use the preprocessor (with configuration 
 specific defines through the COMPILE_DEFINITIONS_CONFIG property) to 
 work around it.
 
 E.g. either guard the source file's content itself with
#ifdef CONFIG_SPECIFIC_DEFINE
source file content
#endif
 
 or add a wrapper source file that does something like
 
#ifdef CONFIG_SPECIFIC_DEFINE
#include config1.cpp
#endif
 
 or even
 
#ifdef CONFIG_SPECIFIC_DEFINE
#include config1.cpp
#else
#include config2.cpp
#endif
 
 Nils
 
 


Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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] Source List Compilation Depending on Configuration

2014-07-21 Thread Jörg Kreuzberger
1) i reset it with
 set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_INIT} )
 set( CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE_INIT} )
 set( CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG_INIT} )

 and then append my own custom compiler definitions. -DNDEBUG appears in 
flags.make, only in CXX_FLAGS, but not in CXX_DEFINES!

and this is the issue i had with it: as long it appears only in CXX_FLAGS, it 
works for the code compilation but it does not work for qt4_wrapp_cpp (missing 
defines for moc).


2) the point i want to change global compiler properties is in my toplevel 
CMakeLists.txt,
there i do 
include( cmake/GlobalCompilerSettings.cmake)

3) following your example, it does not work for COMPILE_DEFINITIONS_RELEASE, 
but does work for COMPILE_DEFINITIONS.
(works means it appears in CXX_DEFINES)
using release cmake 3.0.0 version. Platform is ubuntu linux (makefile generator)




-Ursprüngliche Nachricht-
Von:Nils Gladitz nilsglad...@gmail.com
Gesendet:   Mo 21.07.2014 14:45
Betreff:Re: AW: [CMake] Source List Compilation Depending on 
Configuration
An: Jörg Kreuzberger j.kreuzber...@procitec.de; 
CC: cmake@cmake.org; 
 On 07/21/2014 02:29 PM, Jörg Kreuzberger wrote:
  Hm, following your suggestion i replace lines
  if( ${CMAKE_BUILD_TYPE} STREQUAL Release)
  add_definitions( -DNDEBUG )
  endif()
 
  with
  set_directory_properties( PROPERTIES COMPILE_DEFINITIONS_RELEASE 
 ${COMPILE_DEFINITIONS_RELEASE};NDEBUG )
 
 ${COMPILE_DEFINITIONS_RELEASE} does not expand the property but you 
 could use set_property() with the APPEND flag for that.
 
 NDEBUG is set by default for MinSizeRel, Release and RelWithDebInfo so 
 you should have found it in the Release flags even without using the 
 property (unless you override the default flags).
 
 With
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_RELEASE FOOBAR)
 
 I get
./CMakeFiles/foo.dir/flags.make:CXX_DEFINES = -DFOOBAR
 When configuring a Release build with the Makefiles generator.
 
 Nils
 
 
 
 
 


Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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] Source List Compilation Depending on Configuration

2014-07-21 Thread Jörg Kreuzberger
ok, then it worked.
i got no warning on the policies, maybe i would have then detected it further. 
Can i enable them globally?

-Ursprüngliche Nachricht-
Von:Nils Gladitz nilsglad...@gmail.com
Gesendet:   Mo 21.07.2014 15:36
Betreff:Re: AW: [CMake] Source List Compilation Depending on 
Configuration
An: Jörg Kreuzberger j.kreuzber...@procitec.de; 
CC: cmake@cmake.org; 
 On 07/21/2014 03:19 PM, Jörg Kreuzberger wrote:
  1) i reset it with
set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_INIT} )
set( CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE_INIT} )
set( CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG_INIT} )
 
and then append my own custom compiler definitions. -DNDEBUG appears in 
 flags.make, only in CXX_FLAGS, but not in CXX_DEFINES!
 
  and this is the issue i had with it: as long it appears only in CXX_FLAGS, 
  it 
 works for the code compilation but it does not work for qt4_wrapp_cpp 
 (missing 
 defines for moc).
 
 
  2) the point i want to change global compiler properties is in my toplevel 
 CMakeLists.txt,
  there i do
  include( cmake/GlobalCompilerSettings.cmake)
 
  3) following your example, it does not work for 
  COMPILE_DEFINITIONS_RELEASE, 
 but does work for COMPILE_DEFINITIONS.
  (works means it appears in CXX_DEFINES)
  using release cmake 3.0.0 version. Platform is ubuntu linux (makefile 
 generator)
 
 I forgot that COMPILE_DEFINITIONS_CONFIG were deprecated.
 When you require 3.0 the property is ignored (Policy CMP0043).
 
 $$CONFIG:Release:NDEBUG in COMPILE_DEFINITIONS should work.
 
 Nils
 
 


Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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] COMPILE_DEFINITONS Generator Expressions and MOC

2014-07-21 Thread Jörg Kreuzberger
Hi!

After much help from Nils from the list i am able to use GENERATOR expressions 
in my compile definitions.
But i end up in the moc'ing step for my qt4 files.

The cmake macros QT4_WRAP_CPP generates a moc command file called 
moc_...cxx_parameters, that contains the generator expression values
-D$$CONFIG:Release:NDEBUG

at this point cmake should have already resolved them to
-DNDEBUG
if i build a release?

or then are the generator expressions for moc resolved?

Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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] Determine dependency between targets

2014-07-16 Thread Jörg Kreuzberger
Hi!

i am looking for a way to determine REAL LINKER dependencies between an 
application and static libraries for use with gcc.

the include dependencies and cmake dependencies are quite good to determine.

For the linker is more or less the question, against which libraries i should 
link. This is done more or less by try and error.

eg. app depends on lib2. This lib depends on lib1.
so in cmake i would link against lib2 and lib1

ok, so i add a dependency (target_link_libraries( lib2 lib1) and link app only 
agains lib2.

But if the link dependency changes ( lib2 does not require to link against lib1 
any more), how can i detect it to remove the target_link_libraries( .. ) entry 
from lib2 ?

Or the other way around, if i use only PARTS of lib2 that does not require to 
link to lib1 (stripping -ffunctions-sections), how can i determine that?

Greetz,
Joerg

Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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] CMake Visual Studio Configuration Single

2014-07-01 Thread Jörg Kreuzberger
 I'm not sure why you would recommend anything related to 
 CMAKE_BUILD_TYPE for the Visual Studio generators. I would be curious 
 to know exactly how you are using it, because internally, 
 CMAKE_BUILD_TYPE (to the best of my knowledge) is completely ignored by 
 the Visual Studio generators.

I had three issues with it, two seems solved with cmake 3.0
My project is organised in a form like 
root
 - common / libs / ..
 - programs / ..


1) Installation of files 
 In the installation ( install TARGET ...) i had to install some shared 
libraries from the common/libs targets
 with cmake 2.8.12 i was not able to use TARGET_FILE:target, so i solved with 
with properties, which always must consider if or not they are build with 
single or multi configuration
  e.g.
   if( WIN32 )
if( MINGW)
  set_property( ...   ${CMAKE_CURRENT_BINARY_DIR}/x.dll)
else()
  set_property( ...   ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/x.dll)
   else if( UNIX )

i think this is solved with cmake 3.0, i can use the TARGET_FILE:target 
directly in install calls

2) use programs/libs from build for running tests
In CMake 2.8 i was not able to use the TARGET_PATH:target notation in calls 
to set_test_properties() so i had to differ here the files paths too. This is 
solved with cmake 3.0

3) using imported location
my project is used for developer and customer build (customer gets sourcecode). 
But he does not get all source code, some of the libaries he only gets binary.
To use same cmake files in programs/, i use the set_target_properties( .. 
IMPORTED_LOCATION ...). Depending on how we build it (mingw, devstudio etc), i 
differ between the paths like above. No other solution found here... 
find_package, find_programs and so on is here no alternative, cause i want to 
use the TARGETS.

4) installation
i have one installation target. install( TARGET ... LOCATION ..) if i build 
debug, this contains debug, if i build release, this contains release. So it 
gets mixed and i have to differ location...


So i think 2 out of 4 issues are solved with cmake 3.0

As newbee to cmake i only could not understand why this single / multi 
configuration stuff is supported. it makes it more complicated, but i assume it 
is like always: historical grown.

I personally would totaly accept seperated vs solutions for debug and release 
in different build directories, only relying on CMAKE_BUILD_TYPE at cmake 
configuration time, with output in same directory structure (without 
debug/release) like e.g. with nmake.

Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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] CMake Visual Studio Configuration Single

2014-06-30 Thread Jörg Kreuzberger
Hi!

During my migration from qmake to cmake it is pure hell for me to support the 
multi configuration visual studio solutions, especially for some parts like the 
installation steps, custom targets and so on. Most of them are because of the 
problem with the different build dirs in this multi configuration projects.

Fortunately cmake 3.0 seems to support the $TARGET_... notations also in 
install steps, so some problems are solved.

But due to the nature of visual studio solutions it could be also possible for 
cmake to generate Signale Configuration Visual Studio solutions.
Is there any options to do this or is only multi configuration supported?

Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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] CMake Visual Studio Configuration Single

2014-06-30 Thread Jörg Kreuzberger
I thought the CMAKE_BUILD_TYPE only would work for nmake makefile generation 
(Single Configuration Generator) and is ignored in Visual Studio SLN Generator 
(Multi Configuration Generator).

Maybe i should clear or reduce the list of CMAKE_CONFIGURATION_TYPES to just 
one?



-Ursprüngliche Nachricht-
Von:J Decker d3c...@gmail.com
Gesendet:   Mo 30.06.2014 09:52
Betreff:Re: [CMake] CMake Visual Studio Configuration Single
An: Jörg Kreuzberger j.kreuzber...@procitec.de; 
CC: cmake@cmake.org; 
 ya, ignore the other types, and just set CMAKE_BUILD_TYPE appropriratly.
 
 
 On Mon, Jun 30, 2014 at 12:43 AM, Jörg Kreuzberger j.kreuzber...@procitec.de 
 mailto:j.kreuzber...@procitec.de  wrote:
 Hi!
 
 During my migration from qmake to cmake it is pure hell for me to support the 
 multi configuration visual studio solutions, especially for some parts like 
 the 
 installation steps, custom targets and so on. Most of them are because of the 
 problem with the different build dirs in this multi configuration projects.
 
 Fortunately cmake 3.0 seems to support the $TARGET_... notations also in 
 install steps, so some problems are solved.
 
 But due to the nature of visual studio solutions it could be also possible 
 for 
 cmake to generate Signale Configuration Visual Studio solutions.
 Is there any options to do this or is only multi configuration supported?
 
 Mannheim HRB 504702
 Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. 
 (FH) 
 Dipl.-Inf. (FH) Jens Heyen
 
 This e-mail may contain confidential and/or legally protected information. If 
 you are not the intended recipient (or have received this e-mail in error) 
 please notify the sender immediately and delete this e-mail. Any unauthorized 
 copying, disclosure or distribution of the material in this email is strictly 
 forbidden.
 Thank you!
 
 
 --
 
 Powered by www.kitware.com http://www.kitware.com 
 
 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ 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 
 http://cmake.org/cmake/help/support.html 
 CMake Consulting: http://cmake.org/cmake/help/consulting.html 
 http://cmake.org/cmake/help/consulting.html 
 CMake Training Courses: http://cmake.org/cmake/help/training.html 
 http://cmake.org/cmake/help/training.html 
 
 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html 
 http://www.kitware.com/opensource/opensource.html 
 
 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/mailman/listinfo/cmake 
 http://public.kitware.com/mailman/listinfo/cmake 
 


Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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] Dependencies between static libraries

2014-05-26 Thread Jörg Kreuzberger
Hi!

i had a problem between depencendies of static libraris. Due to the used tools 
(qt, moc, uic) a library depends on another library, especially on header files 
generated by uic.

This is a litte bit a broken design, but cannot fix it currently.

On massive parallel builds ( 8 cores on ssd ) i get compiliation issues 
(missing header file) or broken dependencies ( header is updated later, lib 
already build).

So i decided to use add_dependencies() macro for cmake to clarify these 
dependencies. Since then it seems that no more failure occured.

Is this a correct way to handle this issue or are other solutions more reliable?

Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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://www.cmake.org/mailman/listinfo/cmake

[CMake] CMake Roadmap

2014-05-19 Thread Jörg Kreuzberger
Hi!

My question: When is cmake 3.0 available for productive usage?

Currently i am switching from qmake to cmake.
With success, at least with many support from this mailing list. Thanks.

I am currently using 2.8.12 and start now using cmake in productive 
environment, that means start creation of virtual machines for our automatic 
build system (GERRIT, JENKINS)

But i cannot find any clear roadmap when 3.0 FINAL would be released for 
productive usage.

Can you give me any hint where i can find this information?

Thanks,
Joerg

Mannheim HRB 504702
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) 
Dipl.-Inf. (FH) Jens Heyen

This e-mail may contain confidential and/or legally protected information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this email is strictly 
forbidden.
Thank you!


-- 

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://www.cmake.org/mailman/listinfo/cmake

[CMake] Test Shared Library Dependencies and set_tests_properties()

2014-05-12 Thread Jörg Kreuzberger
Hi!

For using tests those tests have sometimes dependencies to shared libraries, 
from cache and from build.

For execution i therefore call set_test_properties( testname PROPERTIES 
ENVIRONMENT )
with LD_LIBRARY_PATH on Linux and PATH for windows. This seems to work on linux 
for cached entries like e.g.  ${QT_LIBRARY_DIR} or others. If i want to add 
to add $TARGET_FILE_DIR:othertarget cmake seems not to resolve this path to 
an internaly build shard library dir.

It just adds \$TARGET_FILE_DIR:othertarget to the test cmake file in the 
CMAKE_CURRENT_BINARY_DIR instead of resolving this path.

On Windows i have the issue that i cannot set the path cause the semicolon is 
interpreted as list seperator

e.g. set_test_properties( mytest PROPERTIES ENVIRONMENT 
PATH=$ENV{PATH};${QT_LIBRARY_DIR})
How can i avoid this?

Any help welcome :-)

-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Test Shared Library Dependencies and set_tests_properties()

2014-05-12 Thread Jörg Kreuzberger
-Ursprüngliche Nachricht-
Von:Nils Gladitz nilsglad...@gmail.com
Gesendet:   Mo 12.05.2014 12:14
Betreff:Re: AW: [CMake] Test Shared Library Dependencies and 
set_tests_properties()
An: Jörg Kreuzberger j.kreuzber...@procitec.de; 
 On 05/12/2014 11:59 AM, Jörg Kreuzberger wrote:
  Hi!
 
  i tested it with 3.0.0-rc4 on linux, same issue here as with 2.8.12.2
 
 
 It seems to be working with 3.0.0-rc4 on Linux for me.
 
 What seems to be required though is that you use the newer NAME/COMMAND 
 add_test() signature rather than the old plain signature.
 
 e.g. add_test(NAME foo COMMAND bar) rather than add_test(foo bar)
 
 Nils
 
 


-- 

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://www.cmake.org/mailman/listinfo/cmake

[CMake] Custom Commands and Environmnt Settings for PATH and LD_LIBRARY_PATH

2014-04-11 Thread Jörg Kreuzberger
Hi!

Had an issue with cmake custom commands - was able to solve it after serveral 
hours. But i think this is realy an issue for an improvement

I. What i wanted to do:

I wanted to add a simple custom command

add_custom_command( OUTPUT out
COMMAND mycommand ... )

mycommand is a target, the path to the target is resolved perfectly by cmake 
for all configurations required (linux, win/jom, win/mingw, win/vs2012 )

BUT

the command requires additional dlls (QT + INTELIPP). so i have to add 
something like

add_custom_command( OUTPUT out
COMMAND set 
PATH=%PATH%;${QT_BINARY_DIR};${INTELIPP_LIBRARY_DIR}
COMMAND mycommand ... )

and then the mess began.

My issues:

- For windows path handling (paths seperated by semicolon) it is a mess to set 
the path this way, you have to quote, escape semicolons etc
- You get errors that the PATH is to long .. 
- The path is then set for the complete compilation process, not just for the 
command / dependent for the generator
- handling is os specific, so you have several nearly same implementations

After reading serveral threads i ended in this solution

- create a batch/shell script for the command i want to start. This ensures 
path modifications are local. Creation is done via a configure_file step

- Append the %PATH% in the batch/shell script. This avoids the mess with cmake 
string list coversions (splitting path into space sepearated lists)

- But i now get issues with:
  - i must provide full path to mycommand, this is not resolved by cmake any 
more
  - full puth for vs is dependend on $(Outdir) or $(Configuration) that is for 
sure not available in the scripts
  - so search/replace the variables int the commands

So i solved, it, but the workload to get into a solution here is to much, 
especially if you want to support the multiconfiguration environment for visual 
studio. Here the issue is that the configure_file is done on configuration, but 
the Build_type can only be determined on build and therefore the path in the 
script to mycommand must be set via arguments to the script.

So it would help to have a possiblity to have a custom command like this:

add_custom_command( OUTPUT out
COMMAND ..
COMMAND ..
ENVIRONMENT PATH=$ENV{PATH}
ENVIRONMENT LD_LIBRARY=

So my questions:

if i would provide such a macro how can i:
- DISABLE cmake string handling in arguments to ENVIRONMENT, not just by 
quoting adding  
- ENSURE that the environment settings are LOCAL to the custom command


Thanks for support
-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Custom Commands and Environmnt Settings for PATH and LD_LIBRARY_PATH

2014-04-11 Thread Jörg Kreuzberger
ok, biggest hint here was the tip for $TARGET_FILE:... This was new to me (am 
new to cmake at all).
Thanks.

My major problem is still passing the additonal PATH elements to the cmake 
script, cause they will always expanded in an space seperated list.

So if i add -DENV_PATH=${QT_LIBRARY_DIR};${INTELIPP_LIBRARY_DIR}
and assign it to $ENV{PATH} in my cmake script, is will always remove the 
semikolons

i have tried 

set( $ENV{PATH} $ENV{PATH};${ENV_PATH} )

and 

set( $ENV{PATH} $ENV{PATH}\\;${ENV_PATH} )

i have tried to REPLACE every occureny of ; in ${ENV_PATH} with \\; for 
escaping, but this will also not work.



-Ursprüngliche Nachricht-
Von:Nils Gladitz nilsglad...@gmail.com
Gesendet:   Fr 11.04.2014 12:05
Betreff:Re: [CMake] Custom Commands and Environmnt Settings for PATH 
and LD_LIBRARY_PATH
An: Jörg Kreuzberger j.kreuzber...@procitec.de; cmake@cmake.org; 
 On 04/11/2014 11:32 AM, Jörg Kreuzberger wrote:
  After reading serveral threads i ended in this solution
 
  - create a batch/shell script for the command i want to start. This ensures 
 path modifications are local. Creation is done via a configure_file step
 
 
 I would run a cmake script with ${CMAKE_COMMAND} -P.
 The script can use set(ENV{VAR}) and execute_process().
 This has the advantage of being more portable than bash or batch scripts.
 
 You can pass parameters to the script with -D (have to be listed before -P).
 
 One of those parameters can be a generator expression that will expand 
 to the location of the actual target to be executed. e.g. 
 $TARGET_FILE:tgt [1] will be replaced with the full path of the target.
 
 Nils
 
 [1] 
 http://www.cmake.org/cmake/help/git-master/manual/cmake-generator-expressions.7.
 html#informational-expressions
 

-- 

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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Custom Commands and Environmnt Settings for PATH and LD_LIBRARY_PATH

2014-04-11 Thread Jörg Kreuzberger
ok, finaly got it working.
Thanks for your great support.

-Ursprüngliche Nachricht-
Von:Nils Gladitz nilsglad...@gmail.com
Gesendet:   Fr 11.04.2014 13:12
Betreff:Re: AW: [CMake] Custom Commands and Environmnt Settings for 
PATH and LD_LIBRARY_PATH
An: Jörg Kreuzberger j.kreuzber...@procitec.de; cmake@cmake.org; 
 On 04/11/2014 12:56 PM, Jörg Kreuzberger wrote:
  ok, biggest hint here was the tip for $TARGET_FILE:... This was new to me 
 (am new to cmake at all).
  Thanks.
 
  My major problem is still passing the additonal PATH elements to the cmake 
 script, cause they will always expanded in an space seperated list.
 
  So if i add -DENV_PATH=${QT_LIBRARY_DIR};${INTELIPP_LIBRARY_DIR}
  and assign it to $ENV{PATH} in my cmake script, is will always remove the 
 semikolons
 
 Try -DENV_PATH=${QT_LIBRARY_DIR};${INTELIPP_LIBRARY_DIR} (with the 
 quotes as-is) and the VERBATIM flag to add_custom_command().
 
 Nils
 
 

-- 

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://www.cmake.org/mailman/listinfo/cmake