[CMake] Specifying an alternate location for cmake Modules directory

2013-11-13 Thread Paul Smith
I need to maintain my own copy of the latest cmake, and for multiple different target systems (GNU/Linux, MacOS, Windows, Solaris...) I have a shared location where all tools like this go, so that regardless of the system architecture you can access this one location. Obviously inside that locatio

[CMake] CTest working directory and CMAKE_CFD_INTDIR

2013-11-13 Thread Kurt Ehlert
I am trying to run a test in a specific working directory. The command I used was: add_test(NAME MyTest WORKING_DIRECTORY ${MyDir}/Test/${CMAKE_CFG_INTDIR} COMMAND MyTest ) When I tried running CTest within Xcode, the test did not pass, and instead CTest gave me an error (BAD_COMMAND). I th

Re: [CMake] INSTALL CODE Error Results and Termination

2013-11-13 Thread David Hauck
Hi Jean-christophe, On chris.filli...@kitware.com], Jean-Christophe Fillion-Robin wrote: > Hi, > > You also need to add the "if" statement into the "CODE" parameter, for > example something like this ... > > install(CODE "If (NOT \${_res} EQUAL "0") > message( FATAL_ERROR \"out: \${_out}, err

Re: [CMake] INSTALL CODE Error Results and Termination

2013-11-13 Thread Jean-Christophe Fillion-Robin
Hi, You also need to add the "if" statement into the "CODE" parameter, for example something like this ... install(CODE "If (NOT \${_res} EQUAL "0") message( FATAL_ERROR \"out: \${_out}, err: \${_err}, res: \${_res}\") endif() ") To keep things simpler, you could also look at "INSTALL(SCRIPT

Re: [CMake] INSTALL CODE Error Results and Termination

2013-11-13 Thread David Hauck
On Wednesday, November 13, 2013 11:42 AM, David Hauck wrote: > Hi Jean-christophe, > > On chris.filli...@kitware.com], Jean-Christophe Fillion-Robin wrote: >> Hi David, >> >> You need to escape the "$" sign otherwise the "_err", "_out" and "_res" >> variables are resolved to an empty string. >>

Re: [CMake] INSTALL CODE Error Results and Termination

2013-11-13 Thread David Hauck
Hi Jean-christophe, On chris.filli...@kitware.com], Jean-Christophe Fillion-Robin wrote: > Hi David, > > You need to escape the "$" sign otherwise the "_err", "_out" and "_res" > variables are resolved to an empty string. > > Here is an example of what you could do: > -8<---

Re: [CMake] INSTALL CODE Error Results and Termination

2013-11-13 Thread Jean-Christophe Fillion-Robin
Hi David, You need to escape the "$" sign otherwise the "_err", "_out" and "_res" variables are resolved to an empty string. Here is an example of what you could do: -8<---8<-- cmake_minimum_required(VERSION 2.8.9) install(CODE "execute_process ( COMMAND ${CMAK

Re: [CMake] INSTALL CODE Error Results and Termination

2013-11-13 Thread David Hauck
Hi Kornel, On Wednesday, November 13, 2013 11:08 AM, cmake-boun...@cmake.org wrote: > Am Mittwoch, 13. November 2013 um 18:41:03, schrieb David Hauck > >> Hi Kornel, >> >> On Wednesday, November 13, 2013 10:26 AM, cmake- > boun...@cmake.org wrote: >>> Am Mittwoch, 13. November 2013 um 18:12:26,

Re: [CMake] INSTALL CODE Error Results and Termination

2013-11-13 Thread David Hauck
Hi Jean-christophe, On chris.filli...@kitware.com], Jean-Christophe Fillion-Robin wrote: > Hi David, > > You could look at the generated file named "cmake_install.cmake" to > have a better idea of what could be wrong ... Well, this just has the following: IF(NOT CMAKE_INSTALL_COMPONENT OR "${C

Re: [CMake] INSTALL CODE Error Results and Termination

2013-11-13 Thread Kornel Benko
Am Mittwoch, 13. November 2013 um 18:41:03, schrieb David Hauck > Hi Kornel, > > On Wednesday, November 13, 2013 10:26 AM, cmake-boun...@cmake.org wrote: > > Am Mittwoch, 13. November 2013 um 18:12:26, schrieb David Hauck > > > >> Hello, > >> > >> I've been using several "install (CODE "EXEC

Re: [CMake] INSTALL CODE Error Results and Termination

2013-11-13 Thread Jean-Christophe Fillion-Robin
Hi David, You could look at the generated file named "cmake_install.cmake" to have a better idea of what could be wrong ... As a side note, there is also an issue with command like "install(CODE|SCRIPT ..." there are always executed first in a given directory. See [1] (Note that I couldn't find

Re: [CMake] INSTALL CODE Error Results and Termination

2013-11-13 Thread David Hauck
Hi Kornel, On Wednesday, November 13, 2013 10:26 AM, cmake-boun...@cmake.org wrote: > Am Mittwoch, 13. November 2013 um 18:12:26, schrieb David Hauck > >> Hello, >> >> I've been using several "install (CODE "EXECUTE_PROCESS ...")" >> constructs > in my top-level CMakeLists.txt file. However, I

Re: [CMake] INSTALL CODE Error Results and Termination

2013-11-13 Thread Kornel Benko
Am Mittwoch, 13. November 2013 um 18:12:26, schrieb David Hauck > Hello, > > I've been using several "install (CODE "EXECUTE_PROCESS ...")" constructs in > my top-level CMakeLists.txt file. However, I've been unable to > capture/operate on any exit status of the embedded command. Unfortunately

[CMake] INSTALL CODE Error Results and Termination

2013-11-13 Thread David Hauck
Hello, I've been using several "install (CODE "EXECUTE_PROCESS ...")" constructs in my top-level CMakeLists.txt file. However, I've been unable to capture/operate on any exit status of the embedded command. Unfortunately, documentation/searches haven't turned up any useful pointers. The closest

Re: [CMake] Specifying whether a library is C or C++

2013-11-13 Thread Nils Gladitz
On 13.11.2013 18:15, Aggelos Kolaitis wrote: # I don't add 'C' as the language, because I get build errors with g++ project(PROJECT_NAME) Maybe project(PROJECT_NAME C) and a conditional enable_language(CXX) would work? Nils -- Powered by www.kitware.com Please keep messages on-topic

[CMake] Specifying whether a library is C or C++

2013-11-13 Thread Aggelos Kolaitis
Hey CMake list, I have kind of a problem with CMake (but I guess it's the strange way I'm using it :p). I use CMake to have a simple and consistent build system for my cross-platform library. My library is written in C, but it also has an optional wrapper C++ interface. During the generation of

Re: [CMake] Unicode path wrecks havoc with VS2013 generator

2013-11-13 Thread Clinton Stimpson
On Wednesday, November 13, 2013 03:12:13 PM Nagy-Egri Máté Ferenc wrote: > I have changed the encoding as you suggested and the project compiled fine: > > > 1>-- Build started: Project: cmTryCompileExec747919577, Configuration: > Debug Win32 -- 1> Microsoft (R) C/C++ Optimizing Compiler

Re: [CMake] Unicode path wrecks havoc with VS2013 generator

2013-11-13 Thread Clinton Stimpson
On Wednesday, November 13, 2013 03:12:13 PM Nagy-Egri Máté Ferenc wrote: > I have changed the encoding as you suggested and the project compiled fine: > > > 1>-- Build started: Project: cmTryCompileExec747919577, Configuration: > Debug Win32 -- 1> Microsoft (R) C/C++ Optimizing Compiler

[CMake] Fixup Bundle Problem when using multiple executables

2013-11-13 Thread Fabian Saccilotto
Dear CMake Users, we are using CMake as build system for an application which is made from several subapplications for ease of development (Windows 7 + Visual Studio 2010). In order to make the setup of a project for the developer easier, we use the fixup_bundle macro from BundleUtilities vi

Re: [CMake] ExternalData on unmounted Windows shares?

2013-11-13 Thread Brad King
On 11/13/2013 03:59 AM, Magnus Therning wrote: > On Tue, Nov 12, 2013 at 5:09 PM, Brad King wrote: >> Add to ExternalData_URL_TEMPLATES the entry >> >> file:share.host/foo/bar/%(algo)/%(hash) > > That still fails on the real path I have to use in the project. Are > there any known issues wi

Re: [CMake] Unicode path wrecks havoc with VS2013 generator

2013-11-13 Thread Nagy-Egri Máté Ferenc
I have changed the encoding as you suggested and the project compiled fine: 1>-- Build started: Project: cmTryCompileExec747919577, Configuration: Debug Win32 -- 1> Microsoft (R) C/C++ Optimizing Compiler Version 18.00.21005.1 for x86 1> Copyright (C) Microsoft Corporation. All rights

[CMake] Modern CMake with Qt and Boost

2013-11-13 Thread Stephen Kelly
Hello, Last week I gave a talk at a C++ conference in Germany about 'modern CMake', which is approximately 'CMake with usage requirements'. I wrote a blog post with the slides and explanation here: http://www.kdab.com/modern-cmake-with-qt-and-boost/ Thanks, Steve. -- Powered by www.kitwa

Re: [CMake] Unicode path wrecks havoc with VS2013 generator

2013-11-13 Thread clinton
- Original Message - > I have tried to open the solution by the IDE itself, but that fails to load > the solution also. It report the same error while trying to load the > projects inside. > Shall I rebuild CMake with the mentioned patch to make it work, or can I hope > of a patch that so

Re: [CMake] Unicode path wrecks havoc with VS2013 generator

2013-11-13 Thread Nagy-Egri Máté Ferenc
I have tried to open the solution by the IDE itself, but that fails to load the solution also. It report the same error while trying to load the projects inside. Shall I rebuild CMake with the mentioned patch to make it work, or can I hope of a patch that solves this problem? Feladó: cli

[CMake] Wiki update needed: "CMake/Tutorials/How to create a ProjectConfig.cmake file"

2013-11-13 Thread Johannes Zarl
Hi, I noticed that the tutorial for creating ProjectConfig files[1] in the wiki is not really up to date anymore. To be precise, the CMakePackageConfigHelpers cmake module is not mentioned on the page. The main author of the tutorial goes by the username "Themiwi". @Themiwi: if you are reading

Re: [CMake] Git Doesn't to Pull with ExternalProject_Add

2013-11-13 Thread Daniele E. Domenichelli
Hello Constantine, I'm investigating the same issue right in this moment... On 13/11/13 10:19, Constantine Zakkaroff wrote: > I have a SuperBuild project (using CMake 2.8.12 on Windows Vista x64) > depending on some other project cloned from a git repository. However > I've noticed the cloner r

[CMake] Git Doesn't to Pull with ExternalProject_Add

2013-11-13 Thread Constantine Zakkaroff
Hello ALL, I have a SuperBuild project (using CMake 2.8.12 on Windows Vista x64) depending on some other project cloned from a git repository. However I've noticed the cloner repository doesn't get updated when I rebuild the project. Is it right to expect the repository to be updated automat

Re: [CMake] ExternalData on unmounted Windows shares?

2013-11-13 Thread Magnus Therning
On Tue, Nov 12, 2013 at 5:09 PM, Brad King wrote: > On 11/12/2013 08:43 AM, Magnus Therning wrote: >> Is there some way to point to an unmounted Windows share? > > Add to ExternalData_URL_TEMPLATES the entry > > file:share.host/foo/bar/%(algo)/%(hash) That still fails on the real path I have

Re: [CMake] Install multiple components using CPack

2013-11-13 Thread Alexander Broekhuis
Hi, 2013/11/11 Mark Stijnman > On Tue, Nov 5, 2013 at 12:11 PM, Alexander Broekhuis > > > The easiest way I know is to use CPACK_COMPONENTS_ALL, which is what I > use to package subsets of my components. > I now solved it using CPACK_INSTALL_CMAKE_PROJECTS and populating it with all components