Re: [CMake] compiler defines for sub projects

2013-04-06 Thread Keith Gardner
You can make a variable contain the defines you want and the use that variable in the set_target_properties command. The value of the variable will be inherited by all of the sup directories. option(FOO_OPTION enable foo OFF) option(BAR_OPTION enable bar OFF) if(FOO_OPTION)

Re: [CMake] compiler defines for sub projects

2013-04-05 Thread Keith Gardner
If you want to have all of the sub directories to have the defines present, you could use ADD_DEFINITIONS(). option(FOO_OPTION enable foo OFF) option(BAR_OPTION enable bar OFF) if(FOO_OPTION) add_definitions(-DFOO_X ) elseif(BAR_OPTION) add_definitions(-DFOO_Y) else()

Re: [CMake] how to compile as 32bit on a 64bit Linux host ?

2013-02-15 Thread Keith Gardner
What I have done in the past is the -m32 flag to the CMAKE_CXX_FLAGS and all of the search paths were updated automatically. You just need to add the flag when you CMake for the first time. I did this on CentOS 5.8 x64 without any problems. Keith -Original Message- From:

Re: [CMake] Find a library that matches a specific pattern

2012-11-28 Thread Keith Gardner
You can use file(GLOB variable [RELATIVE path] [globbing expression] ...) file( GLOB result ${first_build_dir} filea*.lib) Result will contain a list of files that match the globbing expression. Enjoy! Keith From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of katie

Re: [CMake] cmake-gui's separation between configuration generation

2012-08-23 Thread Keith Gardner
Hi, Even if the Linux environment does not have a GUI, you can use ccmake. It is like the cmake-gui but runs inside a terminal window. I use this all the time on Windows through putty. As for clicking generate, with the latest version of CMake, you can click generate without clicking

Re: [CMake] Clang + MinGW Linking Issue

2012-05-25 Thread Keith Gardner
Holewinski [mailto:justin.holewin...@gmail.com] Sent: Thursday, May 24, 2012 5:28 PM To: Keith Gardner Cc: Brad King; cmake@cmake.org Subject: Re: [CMake] Clang + MinGW Linking Issue Were you passing custom command-line arguments in the project? Clang only accepts a very limited set of CL-style

Re: [CMake] Clang + MinGW Linking Issue

2012-05-24 Thread Keith Gardner
I have built clang (llvm) on windows with Visual Studio 2010 and used the built binaries as the compiler inside of a Visual Studio project. This was with clang 3.0 and llvm 2.9.1. From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Justin Holewinski Sent: Thursday, May

Re: [CMake] Android In-Depth CMake Questions

2012-03-16 Thread Keith Gardner
You could also look at the OpenCV project. They already support building for Android and are completely CMake based. -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Gregory Peele ARA/CFD Sent: Friday, March 16, 2012 2:03 PM To:

Re: [CMake] Updated: CMake 2.8.7-1

2012-03-06 Thread Keith Gardner
Never mind, I manually installed 2.8.6. I uninstalled 2.8.6 and all is well. -Original Message- From: Keith Gardner Sent: Tuesday, March 06, 2012 11:43 AM To: 'Bill Hoffman'; cygwin-annou...@cygwin.com; cm...@public.kitware.com Subject: RE: [CMake] Updated: CMake 2.8.7-1 I just did

Re: [CMake] Updated: CMake 2.8.7-1

2012-03-06 Thread Keith Gardner
I just did an update of CMake on Cygwin and found a weird inconstancy. the Cygwin installer calls the version 2.8.7-1 but if you run cmake -version you get 2.8.6. Which is correct? -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Bill

Re: [CMake] Eliminate Debug/Release directories and name executables based on configuration

2010-08-09 Thread Keith Gardner
What you need to do to get rid of the Debug/Release directories is set the prefix property for your target with ../. Eg. set_target_properties( target_name PROPERTIES PREFIX ../ ) To get a postfix for different configuration types you need to set the postfix property for the build

Re: [CMake] Auto detect IDL changes

2009-08-03 Thread Keith Gardner
I ran into this problem using Visual Studio 2008 and wrote up a macro to generate the add_custom_command for each idl file. The function will rerun the build command whenever the idl file is modified. There is very little documentation for working with idl files online, so I hope this helps

[CMake] How do you make a 64-bit NSIS installer for Windows?

2009-06-02 Thread Keith Gardner
My company is trying to package our software on Windows using NSIS in 32-bit and 64-bit but the install path always assumes that the package is 32-bit. If you are on a 64-bit machine, 32-bit and 64-bit NSIS installers use C:\Program Files (x86) as the install path. The proper way for a 64-bit

Re: [CMake] How do you make a 64-bit NSIS installer for Windows?

2009-06-02 Thread Keith Gardner
Thanks for the quick reply. I created a feature request in mantis. http://public.kitware.com/Bug/view.php?id=9094 Keith -Original Message- From: David Cole [mailto:david.c...@kitware.com] Sent: Tuesday, June 02, 2009 8:37 AM To: Keith Gardner Cc: cmake@cmake.org Subject: Re: [CMake

Re: [CMake] Set output path without additional Debug/Release at the end

2009-04-24 Thread Keith Gardner
Andreas, What you will have to do is for every target, set the property prefix to ../. There is no other way I have found to do this. Example: ADD_EXECUTABLE( ${PROJECT_NAME} ${SRCS} ) SET_TARGET_PROPERTIES( ${PROJECT_NAME} PROPERTIES PREFIX ../ ) Keith From: