Re: [CMake] Possible to modify COMPILE_FLAGS?

2011-10-25 Thread Campbell Barton
ue, Oct 25, 2011 at 7:16 PM, Michael Wild wrote: > On 10/25/2011 09:51 AM, Campbell Barton wrote: >> The problem I'm trying to solve is to have "-Werror" for the whole >> project except a few files which include system headers that give >> warnings we can&#

[CMake] Possible to modify COMPILE_FLAGS?

2011-10-25 Thread Campbell Barton
The problem I'm trying to solve is to have "-Werror" for the whole project except a few files which include system headers that give warnings we can't workaround (even with -isystem). So I'm trying to get cmake to replace some flags for a specific file, and I ran into the problem that the variable

Re: [CMake] Problems with FindPythonInterp

2011-10-11 Thread Campbell Barton
On Tue, Oct 11, 2011 at 10:50 PM, Yngve Inntjore Levinsen wrote: > Fredag 07 oktober 2011 skrev Yngve Inntjore Levinsen: >> Dear all, >> >> I have some configuration scripts in python that needs to be run for my >> project, so I use the FindPythonInterp package. This has nicely found the >> versio

Re: [CMake] Getting the source file list for an executable fails

2011-09-17 Thread Campbell Barton
On Sat, Sep 17, 2011 at 10:36 AM, Michael Hertling wrote: > On 09/16/2011 03:24 AM, Campbell Barton wrote: >> On Fri, Sep 16, 2011 at 11:11 AM, Michael Hertling >> wrote: >>> On 09/16/2011 02:59 AM, Campbell Barton wrote: >>>> Hi, I would expect this wou

Re: [CMake] Getting the source file list for an executable fails

2011-09-15 Thread Campbell Barton
On Fri, Sep 16, 2011 at 11:11 AM, Michael Hertling wrote: > On 09/16/2011 02:59 AM, Campbell Barton wrote: >> Hi, I would expect this would work from reading the docs but it gives >> >>       add_executable(mytarget ${SRC}) >>       get_property(TESTPROP_A TARG

[CMake] Getting the source file list for an executable fails

2011-09-15 Thread Campbell Barton
Hi, I would expect this would work from reading the docs but it gives add_executable(mytarget ${SRC}) get_property(TESTPROP_A TARGET mytarget PROPERTY SOURCE) get_target_property(TESTPROP_B mytarget SOURCE) message(FATAL_ERROR "Testing ${TESTPROP_A}, ${TESTPROP_B}")

Re: [CMake] FYI - From Ninja-build mailing list - Fwd: Proposal: restat rules

2011-09-08 Thread Campbell Barton
Tested cmake/ninja with Blender's cmake files, works well, and fast! Single file rebuild is 0.97 sec, same on makefiles was 3.7sec. btw, we do something similar to LLVM with generating source, only updating if it changes, however only for C files not headers, ninja handles this ok for my quick tes

[CMake] GTK2's include broken with recent cairomm (patch)

2011-06-24 Thread Campbell Barton
Hi, I found that building inkscape with cairomm would fail because cairommconfig.h could not be found (which cairomm.h includes), Heres a 1 line patch to fix the problem. Also reported bug, but not sure if its necessary. http://cmake.org/Bug/view.php?id=12306 -- - Campbell diff --git a/Modules/

Re: [CMake] determine 32 vs 64 bit linux

2011-06-22 Thread Campbell Barton
On Wed, Jun 22, 2011 at 11:33 PM, Karl Merkley wrote: > > I need to install a library into a directory whose name depends on the > machine type.   For example > > if (WIN32) >  if (CMAKE_CL_64) >      set(ARCH_DIR "win32") >  else() >      set(ARCH_DIR "win64") >  endif() > > elseif (UNIX) >  if

[CMake] CMake consistency checker utility

2011-06-21 Thread Campbell Barton
Writing to the list since some of you may find a script useful that I have been developing for a while now. I'm using this script to help maintain source files for inkscape ~2000 files, and blender3d ~4000 files. With large, portable projects is its hard to keep track of all files on an active cod

Re: [CMake] FindOpenEXR.cmake inclusion in cmake modules?

2011-06-16 Thread Campbell Barton
>> >> If anything is unclear, ask here for clarification. >> >> >> Thanks, >> David Is writing a ***Config.cmake file documented?, does this rely on OpenEXR using cmake for their builds? I wasn't aware of this. >> On Wed, Jun 15, 2011 at 11:25 PM, Campbe

[CMake] FindOpenEXR.cmake inclusion in cmake modules?

2011-06-15 Thread Campbell Barton
Recently I decided to start moving some of our projects hard coded paths into Find***.cmake modules. Incidentally the libs are libsamplerate, libFFTW3, libsndfile, libjemalloc, OpenEXR, OpenJPEG, libpcre. I started out with OpenEXR, and tried to comply with the module readme.txt, and used FindTIF

Re: [CMake] include_directories(SYSTEM, GNU.cmake and -isystem for C (not CXX)

2011-06-10 Thread Campbell Barton
011 at 10:59 PM, Michael Hertling wrote: > On 06/08/2011 07:26 AM, Campbell Barton wrote: >> There were some system headers giving warnings compiling on linux, >> since I like to have warnings as errors, and not edit system headers, >> I used: >>  include_directori

[CMake] include_directories(SYSTEM, GNU.cmake and -isystem for C (not CXX)

2011-06-07 Thread Campbell Barton
There were some system headers giving warnings compiling on linux, since I like to have warnings as errors, and not edit system headers, I used: include_directories(SYSTEM dir1 dir2 ...) ... for system directories only. However this does not result in -isystem being used in C because GNU.cmake do

[CMake] Invoking CMakle outside of the build/source dir.

2011-06-06 Thread Campbell Barton
Hi, A handful of times I would have found it useful to run cmake without having to be in the build dir, mostly there is some way to change the CWD or write a shell wrapper, nevertheless it could still be useful when launching builds from scripts or more limited environments. Is there some way to d

Re: [CMake] using "INSTALL(CODE ..." for multiple configurations.

2011-05-30 Thread Campbell Barton
On Mon, May 30, 2011 at 1:55 AM, Michael Hertling wrote: > On 05/30/2011 02:58 AM, Campbell Barton wrote: >> Checking if this is possible since its quite verbose to have the same >> command 4 times, one for each configuration. >> >> For blender3d on windows we need

[CMake] using "INSTALL(CODE ..." for multiple configurations.

2011-05-29 Thread Campbell Barton
Checking if this is possible since its quite verbose to have the same command 4 times, one for each configuration. For blender3d on windows we need to extract python into the install dir since we bundle it. This command looks like this: --- snip install( CODE " execute_pr

Re: [CMake] How to define datafiles?

2011-04-24 Thread Campbell Barton
2011/4/23 YangXi : > In my program, I have several pictures and plain-text data files. Usually in > a unix system, they should be placed on /usr/share/my_program/some_place. > How could I define those files in CMakeLists, and make their location known > by the program? > Thanks! first define the p

[CMake] Alternative default CMAKE_C_STANDARD_LIBRARIES_INIT

2011-04-10 Thread Campbell Barton
Yesterday I found there was a bug caused by the default linking flags (-ladvapi32 with mingw incidentally was crashing with "%.*f" printf() formatting). So I tried to override CMAKE_C_STANDARD_LIBRARIES & CMAKE_C_STANDARD_LIBRARIES_INIT but wasn't able to find any nice way of doing it. the problem

Re: [CMake] QtCreator project generator

2011-03-09 Thread Campbell Barton
On Mon, Mar 7, 2011 at 8:46 PM, Alexander Neundorf wrote: > On Friday 04 March 2011, Campbell Barton wrote: >> On Thu, Mar 3, 2011 at 5:10 PM, Alexander Neundorf >> >> wrote: >> > On Tuesday 01 March 2011, Campbell Barton wrote: >> >> On Tue,

Re: [CMake] QtCreator project generator

2011-03-03 Thread Campbell Barton
On Thu, Mar 3, 2011 at 5:10 PM, Alexander Neundorf wrote: > On Tuesday 01 March 2011, Campbell Barton wrote: >> On Tue, Mar 1, 2011 at 2:47 PM, Marcus D. Hanwell >> >> wrote: >> > On Tue, Mar 1, 2011 at 9:15 AM, John Drescher > wrote: >> >> On

Re: [CMake] QtCreator project generator

2011-03-03 Thread Campbell Barton
On Tue, Mar 1, 2011 at 3:45 PM, Campbell Barton wrote: > On Tue, Mar 1, 2011 at 2:47 PM, Marcus D. Hanwell > wrote: >> On Tue, Mar 1, 2011 at 9:15 AM, John Drescher wrote: >>> On Tue, Mar 1, 2011 at 6:45 AM, Campbell Barton >>> wrote: >>>> QT-Creator

Re: [CMake] QtCreator project generator

2011-03-01 Thread Campbell Barton
On Tue, Mar 1, 2011 at 2:47 PM, Marcus D. Hanwell wrote: > On Tue, Mar 1, 2011 at 9:15 AM, John Drescher wrote: >> On Tue, Mar 1, 2011 at 6:45 AM, Campbell Barton wrote: >>> QT-Creator which currently supports CMake by reading code::blocks project >>> files. >&

[CMake] QtCreator project generator

2011-03-01 Thread Campbell Barton
QT-Creator which currently supports CMake by reading code::blocks project files. The problem with this is code::blocks project files don't write in #defines, so the IDE shows #ifdef's incorrecyly. For the short term I wrote a eclipse -> qtcreator project converter in python, which has a few hard

[CMake] Automatic out of source build's possible?

2011-02-07 Thread Campbell Barton
For blender we currently support 2 build systems - SCons and CMake, Quite a few technical users build from source on *nix just to get the latest version and use scons, I suspect this is because scons configures every time and its simple just to type "scons" in the source dir and end up with a build

Re: [CMake] Possible 'brief' output options for UnixMakefileGenerator

2010-12-21 Thread Campbell Barton
d to it (all of which are closed at this point): > http://public.kitware.com/Bug/view.php?id=5323 > http://public.kitware.com/Bug/view.php?id=7062 > http://public.kitware.com/Bug/view.php?id=8726 > http://public.kitware.com/Bug/view.php?id=11304 > > > HTH, > David > > > On

Re: [CMake] Possible 'brief' output options for UnixMakefileGenerator

2010-12-20 Thread Campbell Barton
t.  I've tended toward egrep which is more perl like when doing more > complicated expressions.  Color is probably lost since it is no longer a > tty. > > Juan > > On Mon, Dec 20, 2010 at 3:56 PM, Campbell Barton > wrote: >> >> @Michael Wild. good point about threade

Re: [CMake] Possible 'brief' output options for UnixMakefileGenerator

2010-12-20 Thread Campbell Barton
ke -s would be good to have. On Mon, Dec 20, 2010 at 10:05 AM, Jesper Eskilson wrote: > On 12/20/2010 01:01 AM, Campbell Barton wrote: >> >> Hi, I'm STILL trying to have CMake makefiles replace Blender's hand >> crafted makefiles. >> >> Now the main stic

[CMake] Possible 'brief' output options for UnixMakefileGenerator

2010-12-19 Thread Campbell Barton
Hi, I'm STILL trying to have CMake makefiles replace Blender's hand crafted makefiles. Now the main sticking point with 2 other developers is they don't like CMakes output, as its overly verbose. I realize CMake doesn't need to bend to the whim of all users but wondering if we could have somethin

[CMake] Macro for adding cflags, odd quirk with CHECK_C_COMPILER_FLAG

2010-12-16 Thread Campbell Barton
Hi, we were having some problems with warnings and gcc versions so I thought to write a macro that adds a flag to any string (typically CMAKE_C_FLAGS) ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS -Wno-unknown-pragmas) ...this is the macro. macro(ADD_CHECK_C_COMPILER_FLAG _CFLAGS _FLAG

Re: [CMake] CMake 2.8.3-rc4 ready for testing!

2010-10-31 Thread Campbell Barton
Hi I saw in the log you added a case for Python 2.7, Would you be able to add a check for Python 3.x ? For Blender 3D we use CMake and only support python 3.x series. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www

Re: [CMake] Status of clang support?

2010-10-27 Thread Campbell Barton
On Tue, Oct 26, 2010 at 1:02 AM, Mateusz Loskot wrote: > On 25/10/10 01:38, Mateusz Loskot wrote: >> On 24/10/10 23:00, Ryan Pavlik wrote: >>> My best guess would be to check for some Clang-specific defines, >>> similar to the platform checks.  Actually, it looks like in the Git >>> repository of

Re: [CMake] Less Noisy Makefiles?

2010-10-09 Thread Campbell Barton
On Fri, Oct 8, 2010 at 5:16 AM, Campbell Barton wrote: > On Thu, Oct 7, 2010 at 9:55 PM, David Cole wrote: >> On Thu, Oct 7, 2010 at 5:34 PM, Campbell Barton >> wrote: >>> >>> On Thu, Oct 7, 2010 at 8:48 PM, Campbell Barton >>> wrote: >>> >

Re: [CMake] Less Noisy Makefiles?

2010-10-07 Thread Campbell Barton
On Thu, Oct 7, 2010 at 9:55 PM, David Cole wrote: > On Thu, Oct 7, 2010 at 5:34 PM, Campbell Barton > wrote: >> >> On Thu, Oct 7, 2010 at 8:48 PM, Campbell Barton >> wrote: >> > On Thu, Oct 7, 2010 at 10:44 AM, Michael Wild wrote: >> >> >> &

Re: [CMake] Less Noisy Makefiles?

2010-10-07 Thread Campbell Barton
On Thu, Oct 7, 2010 at 8:48 PM, Campbell Barton wrote: > On Thu, Oct 7, 2010 at 10:44 AM, Michael Wild wrote: >> >> On 7. Oct, 2010, at 11:58 , Campbell Barton wrote: >> >>> Hi, I was wondering if this is possible or if it would be acceptable >>> to di

[CMake] Less Noisy Makefiles?

2010-10-07 Thread Campbell Barton
Hi, I was wondering if this is possible or if it would be acceptable to disable progress printout. At the moment building with only minor changes prints a lot of text with CMake & Makefiles. eg: [ 4%] Built target bf_intern_audaspace [ 4%] Built target bf_intern_string [ 6%] Built target bf_in

Re: [CMake] Visual Studio 2010 generator and custom command

2010-09-29 Thread Campbell Barton
On Wed, Sep 29, 2010 at 10:02 AM, elizabeta petreska wrote: > Hi, > > I asked this question some time ago in the mailing list. Unfortunately, I > did not try to resolve this issue since then, so I am trying again. :) > > I am using Visual Studio 2010 generator and cmake 2.8.2. > > Why the followin