Re: [CMake] How the heck does one set options?

2011-11-02 Thread Tim Gallagher
You're right, I left out the doc string part by mistake. You can see the correct usage in your trace. For instance: option(gtest_force_shared_crt "Use shared (DLL) run-time lib even when Google Test is built as static lib." ON) Tim - Original Message - From: "Steven Velez" To: "Dan Ke

Re: [CMake] How the heck does one set options?

2011-11-02 Thread Steven Velez
Just a guess, but the docs for option state: option( "help string describing option" [initial value]) Provide an option for the user to select as ON or OFF. If no initial value is provided, OFF is used. In this description is not optional, but the initial value is. In the usage pre

Re: [CMake] How the heck does one set options?

2011-11-02 Thread Dan Kegel
On Wed, Nov 2, 2011 at 6:36 PM, Dan Kegel wrote: > So, now what?  How does one set an option declared by a subdirectory > before entering that subdirectory?  Lots of people use gtest, surely > someone has run into this before. I'm starting to suspect that everyone who needs this to work unattende

Re: [CMake] How the heck does one set options?

2011-11-02 Thread Dan Kegel
On Wed, Nov 2, 2011 at 6:21 PM, Tim Gallagher wrote: > Using set() as you have done only sets the value in the current scoping unit. > If you did: > > set(gtest_force_shared_crt ON CACHE INTERNAL "") > > then it will be set to ON and hidden from the GUI display. > > If it will always be a bool an

Re: [CMake] How the heck does one set options?

2011-11-02 Thread Tim Gallagher
Using set() as you have done only sets the value in the current scoping unit. If you did: set(gtest_force_shared_crt ON CACHE INTERNAL "") then it will be set to ON and hidden from the GUI display. If it will always be a bool and you want it displayed on the GUI, you can also do: option(gtest

[CMake] How the heck does one set options?

2011-11-02 Thread Dan Kegel
Right, so, I have this fragment: set(gtest_force_shared_crt ON) add_subdirectory(gtest) Oddly, when I run cmake, that variable is off. WTF? Looking at the cache, I see build/CMakeCache.txt:gtest_force_shared_crt:BOOL=OFF It looks like someone else ran into this before, http://www.mail-archive

Re: [CMake] debug/optimized include directories

2011-11-02 Thread Stephen Kelly
David Cole wrote: > On Tue, Nov 1, 2011 at 4:33 PM, Robert Dailey > wrote: >> On Tue, Nov 1, 2011 at 3:32 PM, David Cole >> wrote: >>> >>> Not yet >> >> Meaning there are plans in the works to add such functionality in the >> near future? >> For now I guess I could actually hard code VS environm

Re: [CMake] Setting a cmake option via make targets?

2011-11-02 Thread Michael Hertling
On 11/02/2011 07:32 PM, Yngve Inntjore Levinsen wrote: > Onsdag 02 november 2011 skrev szalai endre: >> Hi guys, >> >> I am using Rational Purify for runtime error checks in C++. To use it, you >> have to call purify instead of the C++ linker at link phase. To do so, I >> have the following cmake f

Re: [CMake] CMake Using a C Preprocessor for Fortran Source Files

2011-11-02 Thread Alan W. Irwin
On 2011-11-02 19:27- Schuchard, Matthew wrote: If it matters, these source files will always be built on Linux, so that allows for some flexibility in solutions. For that case, I find fortran preprocessing for gfortran works correctly if I do the following: set_source_files_properties(fo

Re: [CMake] include_directories() and duplicates

2011-11-02 Thread Michael Hertling
On 11/02/2011 06:54 PM, Robert Dailey wrote: > Does the include_directories() command strip out duplicate paths added? Yes, it does; see the following exemplary project: CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) PROJECT(INCLUDE C) SET(CMAKE_VERBOSE_MAKEFILE ON) FILE(WRITE ${CMAKE_BINARY_DIR

[CMake] CMake Using a C Preprocessor for Fortran Source Files

2011-11-02 Thread Schuchard, Matthew
Hi, I have three questions about CMake's use of a C Preprocessor for Fortran Source Files. I have scoured the CMake help documentation and googled extensively but have not found any solutions that worked for my specific situations. 1. What is the default C Preprocessor CMake uses for Fortran f

Re: [CMake] Setting a cmake option via make targets?

2011-11-02 Thread Yngve Inntjore Levinsen
Onsdag 02 november 2011 skrev szalai endre: > Hi guys, > > I am using Rational Purify for runtime error checks in C++. To use it, you > have to call purify instead of the C++ linker at link phase. To do so, I > have the following cmake file: > > // > project(myproject ) > option (USE_

[CMake] include_directories() and duplicates

2011-11-02 Thread Robert Dailey
Does the include_directories() command strip out duplicate paths added? - Robert Dailey -- 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.cmak

Re: [CMake] debug/optimized include directories

2011-11-02 Thread Michael Wild
Thanks ;-) Michael On 11/02/2011 05:33 PM, Robert Dailey wrote: > Awesome idea, +1 > > This is probably the best work-around until includes get a target property. > > - > Robert Dailey > > > On Wed, Nov 2, 2011 at 2:43 AM, Michael Wild > wrote: > > On 1

Re: [CMake] debug/optimized include directories

2011-11-02 Thread Robert Dailey
Awesome idea, +1 This is probably the best work-around until includes get a target property. - Robert Dailey On Wed, Nov 2, 2011 at 2:43 AM, Michael Wild wrote: > On 11/01/2011 09:49 PM, Robert Dailey wrote: > > Well if you need any help coding the feature let me know. I'm already > >

[CMake] install export : ignore imported_link_interface_libraries and imported_link_dependents_libraries

2011-11-02 Thread Jaonary Rabarisoa
Hi all, I'm using the command install(EXPORT ) to create a configuration file for my project. This works great but by default cmake fills the IMPORTED_LINK_INTERFACE_LIBRARIES and IMPORTED_LINK_DEPENDENTS_LIBRARIES. I'd like cmake to ignore these properties because it introduces a hard link to my

[CMake] Properties on Projects ( was: Enhancing the Visual Studio Generators' Source Control integration )

2011-11-02 Thread Steven Velez
Trying again more directly. Sorry for the chattiness. Is there a good way to allow users to set properties on projects that generators can read. I was thinking to use standardized global properties e.g.) _VS_SCC_LOCALPATH, however the existing properties like this ( _SOURCE_DIR and _BINARY_DIR )

Re: [CMake] OS X Frameworks with spaces in filename

2011-11-02 Thread Brad King
On 10/21/2011 7:32 PM, Adam Somers wrote: Sorry if this is not the correct list to post questions. > Please direct me to the proper place if so. This is the correct place. The resulting linker flag is: -Framework My Framework This of course is incorrect and will cause gcc to try to link >

Re: [CMake] CPACK_PACKAGE_DESCRIPTION_FILE for debian

2011-11-02 Thread Erik Hofman
On Wed, 2011-11-02 at 10:59 +0100, Eric Noulard wrote: > I think this one is acceptable since it may be considered a bug > (you may open one exactly for that purpose) > to use summary when you expect full 'description'. > > The then almost backward compatible algorithm would be: > > 1) use CPA

Re: [CMake] CPACK_PACKAGE_DESCRIPTION_FILE for debian

2011-11-02 Thread Eric Noulard
2011/11/2 Erik Hofman : > On Tue, 2011-11-01 at 11:47 +0100, Eric Noulard wrote: >> I'll review it and probably merge it soon, since this looks reasonable. >> Note however that with CPackRPM you have both >> >> CPACK_RPM_PACKAGE_SUMMARY >> and >> CPACK_RPM_PACKAGE_DESCRIPTION >> >> whereas for DEB

[CMake] Setting a cmake option via make targets?

2011-11-02 Thread szalai endre
Hi guys, I am using Rational Purify for runtime error checks in C++. To use it, you have to call purify instead of the C++ linker at link phase. To do so, I have the following cmake file: // project(myproject ) option (USE_PURIFY "Use Rational Purify for runtime error checks" OFF) I

Re: [CMake] CPACK_PACKAGE_DESCRIPTION_FILE for debian

2011-11-02 Thread Erik Hofman
On Tue, 2011-11-01 at 11:47 +0100, Eric Noulard wrote: > I'll review it and probably merge it soon, since this looks reasonable. > Note however that with CPackRPM you have both > > CPACK_RPM_PACKAGE_SUMMARY > and > CPACK_RPM_PACKAGE_DESCRIPTION > > whereas for DEB you don't have summary, just: >

[CMake] Compile my application window on linux with mingw

2011-11-02 Thread Julien Dardenne
Hi, Management byCMakeworks well underWindows with Visual Studioand Linuxwith GCC. The paths of the several libraries are found. Now, I want tocompile an applicationwindowon linuxwithmingw. My cross compilation file is as follows : # this one is important SET(CMAKE_SYSTEM_NAME Windows) #th

Re: [CMake] debug/optimized include directories

2011-11-02 Thread Michael Wild
On 11/01/2011 09:49 PM, Robert Dailey wrote: > Well if you need any help coding the feature let me know. I'm already > liking the idea of adding features I want myself into CMake :) > > Thanks! > > - > Robert Dailey > > > On Tue, Nov 1, 2011 at 3:47 PM, David Cole