Re: [CMake] ExternalProject + Patch command

2011-03-22 Thread Johan Björk
Thanks guys. I ended up with a different (hack) way: To recap, my issue was that my patch would be applied twice when building with multi-configuration generators. Since I am always building the external project with a release configuration, the following worked fine to disable the multi-configu

Re: [CMake] Platform tests counts as errors.

2011-03-22 Thread Vladislav Vaintroub
> -Original Message- > From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On > Behalf Of David Cole > Sent: Dienstag, 22. März 2011 21:09 > To: Óscar Fuentes > Cc: cmake@cmake.org > Subject: Re: [CMake] Platform tests counts as errors. > > We theorize that: > Visual Studio to

[CMake] Adding directories to XCode Resources

2011-03-22 Thread Darrell Blake
Currently, I'm adding files to my XCode resources similar to this: file(GLOB_RECURSE resFiles ${CMAKE_SOURCE_DIR}/Res/Images/* ${CMAKE_SOURCE_DIR}/Res/Music/* ) set_source_files_properties( ${resFiles}   PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) add_executable(Project, MACOSX_BUNDLE

Re: [CMake] Building a DLL and test driver EXE using CMake -- error by design?

2011-03-22 Thread Michael Hertling
On 03/22/2011 03:16 PM, Chris Volpe ARA/SED wrote: > I posted this question in the VTK Users mailing list originally, but have > since determined that it is more of a CMake issue than a VTK issue, and the > involvement of VTK is only tangential. > > I am trying to set up a source tree which will

Re: [CMake] Building a DLL and test driver EXE using CMake -- error by design?

2011-03-22 Thread Jean-Christophe Fillion-Robin
Hi, Instead of using the following structure: | FeatureViewer | TestDriver You should use the following one: | FeatureViewer | TestDriver The naming convention we use in our different porject is the following: | FeatureViewer | Tes

Re: [CMake] how to place all executables in /build/bin directory

2011-03-22 Thread Michael Hertling
On 03/22/2011 11:33 PM, Jean-Christophe Fillion-Robin wrote: > Hi Arvind, > > As documented > here, > set the variable CMAKE_RUNTIME_OUTPUT_DIRECTORY instead. > > Usually I set this one just after I invoke

[CMake] New book shipment / bug tracker

2011-03-22 Thread Lisa Avila
Kitware is pleased to announce that the VTK Textbook is once again in stock! You may order it directly through our online store or through amazon.com(and soon through amazon.co.uk.) Full details on all our titles can be found here: http://www.kitware.com/products/books.html. We are also happy to a

Re: [CMake] Building a DLL and test driver EXE using CMake -- error by design?

2011-03-22 Thread Chris Volpe ARA/SED
Jc- I already tried that, which is why I ended up with the ordering I did. Originally, with FeatureViewer first, I figured CMake would "know about" the dependent VTK libraries by the time it got to TestDriver, thereby enabling the undesired behavior. I then put TestDriver first, hoping that it

Re: [CMake] how to place all executables in /build/bin directory

2011-03-22 Thread Jean-Christophe Fillion-Robin
Hi Arvind, As documented here, set the variable CMAKE_RUNTIME_OUTPUT_DIRECTORY instead. Usually I set this one just after I invoke PROJECT() command. Indeed, as specified here

[CMake] how to place all executables in /build/bin directory

2011-03-22 Thread Arvind Rao
Hi All, I have what should be a simple issue. I have successfully built a project using CMAKE(out of source build). The executables are all placed in the Project/build/Exec. But I want them placed in Project/build/bin/ instead. Toward this end, I set the EXECUTABLE_OUTPUT_PATH, in the top-level CM

[CMake] cmake cannot find headers and libraries

2011-03-22 Thread bob
I am using cmake to build stage. But cmake is not able to find some dependencies. I have compile *libpng* myself, so I dont have the pkg-config files. The *pkg_search_module* function is being used to search that library. Isnt there any option to explicitly defi

[CMake] cannot find libraries and headers

2011-03-22 Thread bob
I have compiled libpng and have the headers and the libraries (both static and dynamic) in some location. I dont know how to exactly specify the path where cmake would be able to find them. It uses the pkg_search_module() function to find libpng. As I have compiled libpng myself, I dont have the pk

Re: [CMake] Platform tests counts as errors.

2011-03-22 Thread David Cole
We theorize that: Visual Studio tools detect that they are running as a sub-process in a Visual Studio environment and send their output to a named pipe instead of stdout. If anybody has a pointer to some conclusive proof regarding this theory, feel free to send it along. On Tue, Mar 22, 2011 at

Re: [CMake] Building a DLL and test driver EXE using CMake -- error by design?

2011-03-22 Thread Jean-Christophe Fillion-Robin
Hi Chris, Try to change the order of the ADD_DUBDIRECTORY. add_subdirectory(FeatureViewer) add_subdirectory(TestDriver) instead of add_subdirectory(TestDriver) add_subdirectory(FeatureViewer) As mentioned in the doc

Re: [CMake] Platform tests counts as errors.

2011-03-22 Thread David Cole
Oh, one more thing... in order to activate that suppress output in VS chunk of code, you have to turn on the logging feature of ExternalProject. include(ExternalProject) ExternalProject_Add(CxNativeTg SOURCE_DIR "${FOO_SOURCE_DIR}" CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release LOG_CONFIGURE 1 )

Re: [CMake] Platform tests counts as errors.

2011-03-22 Thread David Cole
Have you considered using the ExternalProject module for custom commands like this? It already takes care of some tricky things like this. In CMake 2.8.4, you'll see occurrences of this in ExternalProject.cmake: set(ENV{VS_UNICODE_OUTPUT} \"\") (which gets generated inside of scripts run at build

[CMake] Building a DLL and test driver EXE using CMake -- error by design?

2011-03-22 Thread Chris Volpe ARA/SED
I posted this question in the VTK Users mailing list originally, but have since determined that it is more of a CMake issue than a VTK issue, and the involvement of VTK is only tangential. I am trying to set up a source tree which will allow CMake to create a MSVC++ .sln file that contains the

Re: [CMake] To avoid target_link_libraries magic

2011-03-22 Thread Brad King
On 03/22/2011 05:27 AM, Valeriy Bykov wrote: > I want to build all the project statically using certain version of glibc, > gcc and all other libs I need. They are situated in the folder "builddeps" > which I can simply checkout on any host and pass it's path to CMake. The easiest way to ensure a

Re: [CMake] To avoid target_link_libraries magic

2011-03-22 Thread Hendrik Sattler
Zitat von Valeriy Bykov : So I'll try to describe all my problems: I want to build all the project statically using certain version of glibc, gcc and all other libs I need. They are situated in the folder "builddeps" which I can simply checkout on any host and pass it's path to CMake. I set comp

Re: [CMake] To avoid target_link_libraries magic

2011-03-22 Thread Valeriy Bykov
For now I have fixed build on different hosts by forcing ithe compiler. But I don't understand why does it work and why lib is passed by full path now. On Tue, Mar 22, 2011 at 12:27:10PM +0300, Valeriy Bykov wrote: > Thanks for explanations. > > It is possible to use imported targets for all libra

Re: [CMake] To avoid target_link_libraries magic

2011-03-22 Thread Valeriy Bykov
Thanks for explanations. It is possible to use imported targets for all libraries or target properties but it is not convinient because I have a lot of targets in my project. So I'll try to describe all my problems: I want to build all the project statically using certain version of glibc, gcc an

Re: [CMake] set_target_properties to target openmp flag on an executable

2011-03-22 Thread Caner Candan
Perfect as ever. I just replaced the code by: -- PROJECT(test CXX) ADD_EXECUTABLE(test test.cpp) SET_TARGET_PROPERTIES(test PROPERTIES COMPILE_FLAGS "-fopenmp" LINK_FLAGS "-fopenmp") ---