[CMake] Tests with custom launchers and "Not Run"

2012-09-11 Thread Mathias Gaunard
Hi, When not using a custom launcher for a test, if the executable doesn't exist then ctest will report "Not Run". Is there a way to do this with a custom launcher as well? When the file doesn't exist it always gives me "Failed" instead. I need to run my tests in qemu because of cross-compi

Re: [CMake] Add sources to a target library after add_library()?

2012-09-05 Thread Mathias Gaunard
On 06/09/2012 00:30, Loaden wrote: Hi, I look this ML: http://www.cmake.org/pipermail/cmake/2010-January/034437.html Does CMake still can't support how to add sources to a target library after add_library()? I wan't support Precompiled Header for both MSVC / GCC(MinGW). In MSVC case, it need a so

Re: [CMake] Check if a command exists?

2012-09-04 Thread Mathias Gaunard
On 03/09/2012 21:59, Rui Maciel wrote: I have a small project which includes a couple of parsers whose lexers are generated by re2c. I intended to set cmake so that it could check if re2c is present in the system, but after browsing through the docs I've ended up empty-handed. So, is there a wa

Re: [CMake] Dependences to parallel project directories

2012-08-09 Thread Mathias Gaunard
On 08/08/2012 19:00, Tero Mäntyvaara wrote: Hi. I have got four CMake-projects: project1, project2, project3 and project4. Each project is in its own directory and these directories are parallel. Project2 is dependent on project1, project3 is dependent on project1 and project2. Project4 is depe

Re: [CMake] Scope of imported targets

2012-07-27 Thread Mathias Gaunard
On 28/07/2012 01:43, James Bigler wrote: Is there are particular reason why imported targets don't have global scope (doc says current directory and below), but regular targets do (seen everywhere)? This seems really inconsistent to me. I'm trying to build a custom library from other pieces usi

Re: [CMake] How to get started with the CMake Ninja backend on Linux and Windows?

2012-07-19 Thread Mathias Gaunard
On 19/07/2012 11:00, Nicolas Desprès wrote: As far as I know the last official release of CMake supports Ninja backend for both Linux and Windows. I believe CMake 2.8.9 is required for Ninja on Windows. It hasn't been released yet. Martine's Ninja is the official repository. Although I am

Re: [CMake] Accepted way to add "-fPIC" onto CMAKE_CXX_FLAGS?

2012-06-18 Thread Mathias Gaunard
On 18/06/2012 23:09, Michael Jackson wrote: Linux really wants to have -fPIC for some of my code and I am trying to detect linux and then add this flag for my project but I am having no luck. if (LINUX) set(CMAKE_CXX_FLAGS ${CMAKE_CSS_FLAGS} "-fPIC") endif() Is this NOT the way I shoul

Re: [CMake] ExternalProject_Add and Boost

2012-06-18 Thread Mathias Gaunard
On 18/06/2012 08:42, Knox, Kent wrote: BUILD_COMMAND bjam --with-program_options address-model=64 toolset=msvc-11.0 link=static stage Two comments here: - bjam has been renamed to b2 since Boost 1.47 - this probably uses the bjam/b2 in the path, rather than the one that you just built with

Re: [CMake] find_package: how to require same directory prefix for both lib and header files?

2012-06-07 Thread Mathias Gaunard
On 07/06/2012 01:20, Natalie Tasman wrote: Using cmake 2.8.8, I know that I can add "backup" or "fallback" search directories for find_package, using INCLUDE_DIRECTORIES(/opt/local/include) LINK_DIRECTORIES(/opt/local/lib) In this case, cmake first searches its default paths and THEN the sp

Re: [CMake] selective compilation according to suffix

2012-05-31 Thread Mathias Gaunard
On 29/05/2012 10:48, Ilias Miroslav wrote: Dear CMake experts, in our project we have some categories of compiler flags, like 'safe flags'-no optimization, 'runtime checking flags', 'profiling flags' and so on. I would like to have defined own filename extensions according to specific compil

[CMake] Ninja and IMPLICIT_DEPENDS

2012-04-18 Thread Mathias Gaunard
I have recently tried Ninja with CMake 2.8.8 RC2. Are there known serious problems? It seems things are not always rebuilt when I touch indirectly included headers. Also, is IMPLICIT_DEPENDS on custom commands supposed to be supported? It doesn't seem to work. -- Powered by www.kitware.com

[CMake] Reading flags that have been added with add_definitions

2012-04-18 Thread Mathias Gaunard
Is there a way to read back what flags were added with add_definitions? If I do add_definitions(DFOO=bar -pedantic) when I read the COMPILE_DEFINITIONS property of the directory all I have is FOO=bar How can I know the -pedantic option is being used for all targets in the directory? -- Powe

Re: [CMake] How to build for 32bit using multiarch?

2011-11-29 Thread Mathias Gaunard
On 11/28/2011 05:58 PM, Kishore Jonnalagadda wrote: I have recently moved to using 64bit Kubuntu Oneiric when supports multiarch. I understand that building 32 bit from my 64 install is as simple as adding the "-m32" option to gcc. Asking cmake to add that flag is easy but i don't know how to ask

Re: [CMake] Why does CMake use relative linking when I replace a shared object?

2011-11-25 Thread Mathias Gaunard
On 11/25/2011 07:19 PM, Michael Hertling wrote: That's caused by the absence of an SONAME in your baz/libtest.so. If there's no DT_SONAME tag in a shared library you are linking against, the linker will write a DT_NEEDED tag to the resulting binary which points to the library as it has been spec

[CMake] Why does CMake use relative linking when I replace a shared object?

2011-11-25 Thread Mathias Gaunard
There is some strange CMake behaviour I don't quite understand. In the project attached, I build a shared library for which I want to specify a custom build command; to do this I generate a dummy library which I then replace by another file in a POST_BUILD command (alternatives involving impor

Re: [CMake] Do not build/install import library

2011-11-24 Thread Mathias Gaunard
On 11/23/2011 10:14 PM, Matthias Gehre wrote: Hi, thanks for this very nice cmake. I switched just recently to get lightspark (lightspark.github.com) crossplatform, and it worked really smooth. One question, though: I cannot seem to find a way to _not_ build/install the import libraries (foobar

[CMake] Libraries with custom build command

2011-11-14 Thread Mathias Gaunard
What is the recommended way to define libraries with custom build commands? This trick seems to be the only way: if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp) file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp) endif() add_library(foo dummy.cpp) add_custom_command(TARGET foo POST_BUILD

[CMake] Setting the directory associated with a target

2011-08-22 Thread Mathias Gaunard
Hi, I've recently moved from using the simple Makefile generator to the Eclipse CDT one, and I have noticed that targets only appear in the directory in which they were created. Is there a way to specify which directory a target should appear in? I tend to define "parent" targets when the fi

Re: [CMake] Unable to locate boost_unit_test_framework-vc90-mt-gd-1_45.lib

2011-08-14 Thread Mathias Gaunard
On 08/12/2011 03:48 PM, Stephen Torri wrote: Using Mathias and Fraser's guidance I made the changes to the CMakeLists.txt file for the test directory. -DBOOST_ALL_NO_LIB is how I would have fixed it, but I guess that should work. That removed the error that but now I have 9 unresolved exte

Re: [CMake] Unable to locate boost_unit_test_framework-vc90-mt-gd-1_45.lib

2011-08-11 Thread Mathias Gaunard
On 08/10/2011 04:27 PM, Stephen Torri wrote: LNK1104: cannot open file 'boost_unit_test_framework-vc90-mt-gd-1_45.lib' I have boost installed in C:\boost. The FIND_BOOST macro able to find the installation headers and libraries I require. The only thing that is different is that the directory ha

[CMake] Weird behaviour with CPackComponent and NSIS

2011-08-09 Thread Mathias Gaunard
I've recently upgraded to CMake 2.8.5 to try out the new CPack/CPackComponent separation, which allows me to include CPackComponent to get the various cpack component macros, but only include CPack later. I end up with very strange things happening, which I haven't been able to debug. What

Re: [CMake] Launching a script after user picks components in component-based installers

2011-07-03 Thread Mathias Gaunard
On 07/03/2011 06:13 PM, Eric Noulard wrote: The post-install step currently depends on the CPack generator you use. Doing such thing in a portable/cross-platform way would need to suppose you have a portable tool at hand **AT INSTALL TIME**. It would be logical to require CMake and may be embb

[CMake] Launching a script after user picks components in component-based installers

2011-07-02 Thread Mathias Gaunard
With a component-based installer such as NSIS, the user can choose the components that he wants to install. I would need to launch a script (just launching an external program would do) after this, telling me where the application was installed, so that I can perform additional actions dependi

Re: [CMake] Dependencies and libraries..How does it work?

2011-06-17 Thread Mathias Gaunard
On 16/06/2011 23:54, David Springate wrote: I have the following: A library called MY_LIB that builds with a cmake command (I have created a nice CMakeLists.txt file) What do you mean a cmake command? add_custom_target? If that's how you generate your library then you need CMake 2.8.4 or lat

Re: [CMake] Cmake Dependency Generation with Compiler Specific Plugins

2011-03-17 Thread Mathias Gaunard
On 28/07/2010 15:34, Brad King wrote: On 07/27/2010 06:48 PM, Russell Harmon wrote: We're looking to use cmake on a project which has some dependencies which are not properly picked up by cmake's dependency scanner. I'm not looking to fix the scanner, because I feel the scanner is fundamentally