Re: [CMake] Error in Tutorial?

2012-09-11 Thread Stephen Rasku
On Mon, Sep 10, 2012 at 10:50 PM, Eric Noulard wrote > > This "PROJECT_BINARY_DIR" is correct since at > step 1 (Adding a Version Number and Configured Header File), one did: > > configure_file ( > "${PROJECT_SOURCE_DIR}/TutorialConfig.h.in" > "${PROJECT_BINARY_DIR}/TutorialConfig.h" > ) > >

[CMake] CPACK_NSIS_EXTRA_PREINSTALL_COMMAND Not Working as Expected

2012-09-11 Thread Danoush
Hello, I have been trying to use the CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS variable to uninstall a package before a new installation. However I get some unexpected results. The message box and uninstaller in the following command are launched after all of the files in the package have been ins

Re: [CMake] project() command and make targets

2012-09-11 Thread Bill Hoffman
On 9/11/2012 7:17 PM, Robert Dailey wrote: For some reason I was expecting names specified in project() command to become a custom target that I can invoke with nmake on Windows, and it would build any projects under it (this is especially useful for multiple executables, such as maybe a suite of

[CMake] project() command and make targets

2012-09-11 Thread Robert Dailey
For some reason I was expecting names specified in project() command to become a custom target that I can invoke with nmake on Windows, and it would build any projects under it (this is especially useful for multiple executables, such as maybe a suite of tools. The only other alternative I see is t

Re: [CMake] TARGET_SUPPORTS_SHARED_LIBS not set

2012-09-11 Thread Bill Hoffman
On 9/11/2012 1:48 PM, Nico Schlömer wrote: IF(${CMAKE_C_COMPILER} NOT STREQUAL ${Foobar_C_COMPILER}) ? message(FATAL_ERROR "your compilers are incompatible. Re-run cmake on this project and set the environment variables CC and CXX to ... so that they match the ones used by package foobar")

Re: [CMake] TARGET_SUPPORTS_SHARED_LIBS not set

2012-09-11 Thread Nico Schlömer
> Compiler is not supposed to be set y a call to find_package. Hm, I understand. Strictly speaking, FIND_PACKAGE(Foobar) doesn't override CMAKE_C_FLAGS or anything like that, but rather provides a number of extra variables that the user can then exploit. The idea of using the same compiler is to a

Re: [CMake] TARGET_SUPPORTS_SHARED_LIBS not set

2012-09-11 Thread Rolf Eike Beer
Nico Schlömer wrote: > Indeed, that gets set up by the PROJECT() call. > > Now, this creates a little bit of a problem here. > The main CMakeLists.txt looks something like > > === *snip* ==> CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) > > FIND_PACKAGE(Foobar REQUIRED) > > # Set co

Re: [CMake] TARGET_SUPPORTS_SHARED_LIBS not set

2012-09-11 Thread Eric Noulard
2012/9/11 Nico Schlömer : > Indeed, that gets set up by the PROJECT() call. > > Now, this creates a little bit of a problem here. > The main CMakeLists.txt looks something like > > === *snip* === > CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) > > FIND_PACKAGE(Foobar REQUIRED) > > #

Re: [CMake] Problems detecting source-code changes in continuous integration ctest script

2012-09-11 Thread David Cole
We do this in the cmake_common.cmake script to avoid multiple "initial checkouts": # Look for updates. ctest_update(RETURN_VALUE count) set(CTEST_CHECKOUT_COMMAND) # checkout on first iteration only ctest_start does an initial checkout if CTEST_CHECKOUT_COMMAND is set. So in order to have t

Re: [CMake] How to static link with MinGW's libgcc and libstdc++

2012-09-11 Thread Alan W. Irwin
On 2012-09-11 22:21+0800 Loaden wrote: Hi, list! I wan't use cmake + MSVC2010SP1 via wine on Linux (Ubuntu 12.04). In first step, I need compile CMake self on Linux, so the cross compilation is should to go. I edit the CMake 2.8.9's main CMakeLists.txt, added these line: if (MINGW) set(CMA

Re: [CMake] TARGET_SUPPORTS_SHARED_LIBS not set

2012-09-11 Thread Nico Schlömer
Indeed, that gets set up by the PROJECT() call. Now, this creates a little bit of a problem here. The main CMakeLists.txt looks something like === *snip* === CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) FIND_PACKAGE(Foobar REQUIRED) # Set compilers before the PROJECT is declare

[CMake] Detect BLAS library from MKL 11.0.0 on Windows

2012-09-11 Thread Bogdan Cristea
Does anyone succeeded to detect BLAS library provided by MKL on Windows ? -- Bogdan -- 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/Wik

[CMake] Does any one interesting to help writting CMake Scripts for QtCreator?

2012-09-11 Thread Loaden
For now QtCreator support qmake + qbs build system, but I think if there exist CMake build system, that's would be great. After several day work, I can build QtCreator's library using CMake scripts now. It's supported share Precompiled Header for both of MSVC / GCC, and for CLang there does not sup

[CMake] How to static link with MinGW's libgcc and libstdc++

2012-09-11 Thread Loaden
Hi, list! I wan't use cmake + MSVC2010SP1 via wine on Linux (Ubuntu 12.04). In first step, I need compile CMake self on Linux, so the cross compilation is should to go. I edit the CMake 2.8.9's main CMakeLists.txt, added these line: if (MINGW) > set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libg

Re: [CMake] Problem with DESTDIR in with ExternalProject

2012-09-11 Thread David Cole
The most reasonable way to achieve this goal would be to write scripts that replace the configure/build/install steps of the projects that you want to isolate with DESTDIR. Then, inside the script (which will only be executed at build time of the outer project), use set(ENV{DESTDIR} "...") to set

[CMake] InstallRequiredSystemLibraries + openmp probable bug

2012-09-11 Thread Carlo Nicolini
I've found that the include(InstallRequiredSystemLibraries) has a flaw, at least with my CMake 2.8.7, Visual Studio 2008 (msvc9) + Windows 7 box. When I install the CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS with my CMake script, if OpenMP is found, no vcomp90.dll is added to the needed runtime librarie

Re: [CMake] TARGET_SUPPORTS_SHARED_LIBS not set

2012-09-11 Thread Petr Kmoch
Hi Nico. I don't know, but I would assume this (just like a plethora of other internals) is set up by a project() call. The rule of thumb is to call project() a soon as you can. Petr On Tue, Sep 11, 2012 at 11:26 AM, Nico Schlömer wrote: > Hi all, > > I'm having problems linking shared librarie

[CMake] TARGET_SUPPORTS_SHARED_LIBS not set

2012-09-11 Thread Nico Schlömer
Hi all, I'm having problems linking shared libraries on Ubuntu 12.10 beta1 here (shipping with CMake 2.8.9), and found that this is related to TARGET_SUPPORTS_SHARED_LIBS not being set. This CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) GET_PROPERTY(test GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS) MESSA

[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] CMake with IDL file generation

2012-09-11 Thread Petr Kmoch
Sorry, typo. In the case of add_custom_target(), the files would be listed as DEPENDS. Petr On Tue, Sep 11, 2012 at 9:13 AM, Petr Kmoch wrote: > Hi Robert. > > What you're after is pretty standard cmake. You'll need > > add_custom_command( > OUTPUT path_to/generated_header.h path_to/generated_

Re: [CMake] CMake with IDL file generation

2012-09-11 Thread Petr Kmoch
Hi Robert. What you're after is pretty standard cmake. You'll need add_custom_command( OUTPUT path_to/generated_header.h path_to/generated_source.cpp COMMAND midl.exe arguments to midl other options of add_custom_command as necessary ) # as many times as necessary (probably once per IDL sou