Re: [cmake-developers] Proposal: An IRC dev meeting to chat about CMake stuff

2012-08-17 Thread Johan Björk
Sounds wonderful, I'd love some more dev activity in #cmake. Announce it in
good time and I'll try my best to be there.

-Johan (GMT+1)


On Wed, Aug 15, 2012 at 7:58 PM, Alexander Neundorf neund...@kde.orgwrote:

 **

 On Wednesday 15 August 2012, David Cole wrote:

  This is a good idea.

 

  How many people would join in if we had a CMake meeting in #cmake IRC?

 

  What would be the best day of week and time of day to have one?

 Usually on workdays after 6 PM, better after 8 PM, Berlin time.

 Alex


 --

 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

--

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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [CMake] different compiler for xcode

2012-02-04 Thread Johan Björk
Hi,

You can change it using a toolchain file.
We use something like this:

SET(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION com.foo.compilers.llvmgcc42
CACHE STRING  FORCE)

On Fri, Feb 3, 2012 at 11:49 AM, MM finjulh...@gmail.com wrote:
 Hi,

 Does the xcode generator on cmake 2.8.3 allow specifying a different gcc
 from the one installed by default?
 Upgrading to a newer cmake is not a problem.

 Do I set CMAKE_CXX_COMPILER to the gcc46 binary ?

 I also have to add some xcode plugin for gcc46, don't I?

 MM

 --

 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake
--

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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] [New Module] Arduino CMake

2012-01-23 Thread Johan Björk
Hi Alfa,

We are really interested in the teamcity + CTest support. Is that available
somewhere already?

Thanks
/Johan


On Sun, Jan 22, 2012 at 7:51 PM, Alfa Omega queezythegr...@gmail.comwrote:

 Hi everyone,

 I'm not quite sure what the correct procedure is for becoming a CMake
 contributor, but from what I've read I should send a email here if I want
 to add a new module to cmake.

 For the past year I've been hosting my CMake modules on GitHub (
 https://github.com/queezythegreat/arduino-cmake) and the project is
 mature enough that it could be included into CMake. The project is called
 Arduino CMake and it adds support for building Arduino projects. It is a
 alternative to the Arduino IDE, and works on Windows, Linux and Mac.

 The project is growing and getting more and more users, and I think it's
 would be a god fit to start bundling it with CMake. The project is well
 documented both from a developer standpoint as well as the user side.

 So what are the steps I should take in order to integrate my project into
 CMake?

 I also would like to contribute back some extensions to the CMake, such as
 Teamcity support for CTest. Any information would be greatly appreciated.

 Tomasz Bogdal

 --

 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

--

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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Xcode resources for different projects in different directories.

2011-10-08 Thread Johan Björk
Sounds like a bug/missing feature. File a bug with a example project that
demonstrates the issue on the bugtracker, and hopefully someone will have
time to take a look at it ;)

/Johan


On Sat, Oct 8, 2011 at 4:00 PM, Daniel Dekkers d.dekk...@cthrough.nlwrote:

 Hi,

 I think I've asked this earlier, but still no solution, so i'll try again.

 I'm targeting Xcode (iOS) and would like to have multiple projects (and one
 library) in a single workspace. In the individual projects, I set...

 SET_TARGET_PROPERTIES( ${APP_NAME} PROPERTIES RESOURCE ${RSRC_FILES} )

 ...to make Xcode aware of the resources (so Xcode will copy them to the
 bundle before building).

 But.. all the resources of all the projects end up in /Resources, a top
 level Xcode folder, except for the Info.plist, that goes in a /Resources
 folder in the project itself. This (of course) gives problems because there
 are different files with the same names (icons) and I don't want all the
 resources of all the projects in all the bundles.

 So, it would be nice of I could let CMake put the resources of an
 individual project in the /Resources directory of that individual project.
 But no idea how to do that.

 Kind Regards,

 Daniel Dekkers




 --
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

--
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] dmg CPack Options

2011-09-22 Thread Johan Björk
You might want to try the latest cmake 2.8.6RC, it should have fixed the
symlink issues with .tar.gz packaging.

-Johan


On Thu, Sep 22, 2011 at 5:35 PM, Michael Jackson 
mike.jack...@bluequartz.net wrote:

 I just found that and have been playing with it but if I set it to 1 then I
 get the following error:

 CPack: Create package using DragNDrop
 CPack: Install projects
 CPack: - Run preinstall target for: DREAM3D
 CPack: - Install project: DREAM3D
 CPack: -   Install component: Applications
 CPack: -   Install component: Unspecified
 CPack: Create package
 CPack Error: Error executing: /usr/bin/hdiutil create -ov -srcfolder
 /Users/mjackson/Workspace/DREAM3D/Build/_CPack_Packages/Darwin/DragNDrop/ALL_IN_ONE
 -volname DREAM3D-v2.1488.gfb63bc8-OSX -format UDRW
 /Users/mjackson/Workspace/DREAM3D/Build/_CPack_Packages/Darwin/DragNDrop/temp.dmg
 CPack Error: Error generating temporary disk image.
 CPack Error: Problem compressing the directory
 CPack Error: Error when generating package: DREAM3D
 make: *** [package] Error 1

 This is reproducible toggling the value between 1 and 0.
 ___
 Mike Jackson  www.bluequartz.net
 Principal Software Engineer   mike.jack...@bluequartz.net
 BlueQuartz Software   Dayton, Ohio

 On Sep 22, 2011, at 11:17 AM, Clinton Stimpson wrote:

 
 
  On Thursday, September 22, 2011 09:07:49 am Michael Jackson wrote:
  Is there an option to pack the entire installation folder _including_
 the
  folder itself into the dmg disk image during CPack?
 
  I have several applications, tools, documents and such and they are all
  currently put loose in the dmg file, I would rather have and enclosing
  folder.
 
  I am using unix symlinks to cut down on repeated frameworks and
 libraries
  so Zip and tgz don't support symlinks correctly which is forcing me to
 try
  the DragAndDrop option.
 
 
  You're probably looking for this:
  set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 1)
 
  --
  Clinton Stimpson
  Elemental Technologies, Inc
  Computational Simulation Software, LLC
  www.csimsoft.com
  --
 
  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/Wiki/CMake_FAQ
 
  Follow this link to subscribe/unsubscribe:
  http://www.cmake.org/mailman/listinfo/cmake

 --

 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

--

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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Xcode deployment postprocessing

2011-09-05 Thread Johan Björk
I don't remember when the deployment stuff is executed in xcode. How do you
package your product? If you are using cpack ,you can tell it to strip the
binary before packaging it.

/Johan


On Mon, Sep 5, 2011 at 6:47 AM, Robert Bielik robert.bie...@xponaut.sewrote:

 Tack Johan,

 Johan Björk skrev 2011-09-04 09:12:

  You can set it using
 SET(CMAKE_XCODE_ATTRIBUTE_**DEPLOYMENT_POSTPROCESSING YES)
 You might also want to enable the strip-attribute if that's what you are
 aiming for (STRIP_INSTALLED_PRODUCT?)


 Yup that's what I'm aiming for. However, having set that attribute (and
 STRIP_INSTALLED_PRODUCT and STRIP_STYLE which I think are set
 automagically by cmake), my binary is still PEPPERED with symbols.

 I guess that Spotify uses cmake too ? ;) And having checked Spotify's
 binary I can see there's virtually no exported symbol in it. So what
 else do I need to setup in order to achieve the same thing ? I've tried
 adding -fvisibility=hidden (is that only for dylibs ?) to no effect...

 TIA
 /Robert
 Ps. Hälsa Micke Eriksson :)



  For other settings, refer to:
 http://developer.apple.com/**library/mac/#documentation/**
 DeveloperTools/Reference/**XcodeBuildSettingRef/1-Build_**
 Setting_Reference/build_**setting_ref.html#//apple_ref/**
 doc/uid/TP40003931-CH3-SW53http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html%23//apple_ref/doc/uid/TP40003931-CH3-SW53

 /Johan


___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Xcode deployment postprocessing

2011-09-04 Thread Johan Björk
You can set it using
SET(CMAKE_XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING YES)
You might also want to enable the strip-attribute if that's what you are
aiming for (STRIP_INSTALLED_PRODUCT?)
For other settings, refer to:
http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW53

/Johan

On Sun, Sep 4, 2011 at 7:48 AM, Robert Bielik robert.bie...@xponaut.sewrote:

 Hi,

 I need Deployment Postprocessing checked in Release build of Xcode, to
 make it strip symbols from my binary (without which it doesn't).

 How do I set this to checked via CMake ? (using 2.8.4)

 TIA
 /Rob
 __**_
 Powered by www.kitware.com

 Visit other Kitware open-source projects at http://www.kitware.com/**
 opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/**listinfo/cmakehttp://www.cmake.org/mailman/listinfo/cmake

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] add_custom_command(TARGET ..) does nothing if target don't exist?

2011-08-30 Thread Johan Björk
Hi guys,

I just ran into the following issue, and I'm quite baffled? Is this really
expected behaviour?

cherimoya:cmake-postbuildearly phb$ cat CMakeLists
ADD_CUSTOM_COMMAND(TARGET foo POST_BUILD COMMAND ${CMAKE_COMMAND} -E echo
'hello')
TARGET_LINK_LIBRARIES(foo -lbar)
cherimoya:cmake-postbuildearly phb$ cat CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
ADD_CUSTOM_COMMAND(TARGET foo POST_BUILD COMMAND ${CMAKE_COMMAND} -E echo
'hello')
FILE(WRITE foo.c )
ADD_LIBRARY(foo foo.c)

FILE(WRITE bar.c )
ADD_LIBRARY(bar bar.c)
ADD_CUSTOM_COMMAND(TARGET bar POST_BUILD COMMAND ${CMAKE_COMMAND} -E echo
'hello')


after generation, makefile or xcode generator doesn't matter
cherimoya:cmake-postbuildearly phb$ grep -R hello *
CMakeFiles/bar.dir/build.make: /usr/local/Cellar/cmake/2.8.5/bin/cmake -E
echo 'hello'
CMakeLists:ADD_CUSTOM_COMMAND(TARGET foo POST_BUILD COMMAND ${CMAKE_COMMAND}
-E echo 'hello')
CMakeLists.txt:ADD_CUSTOM_COMMAND(TARGET foo POST_BUILD COMMAND
${CMAKE_COMMAND} -E echo 'hello')
CMakeLists.txt:ADD_CUSTOM_COMMAND(TARGET bar POST_BUILD COMMAND
${CMAKE_COMMAND} -E echo 'hello')
ie, it simply ignores the custom command for when the target does not yet
exist!


/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[cmake-developers] xcode, ZERO_CHECK regression

2011-08-28 Thread Johan Björk
Hey,

Attached patch fixes a regression where the new ZERO_CHECK target could get
emitted twice in xcode.

/Johan


0001-xcode-Don-t-emit-ZERO_CHECK-twice.patch
Description: Binary data
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] TGZ installer following links

2011-08-27 Thread Johan Björk
Attached patches to the bug and on this email. (
http://public.kitware.com/Bug/**view.php?id=12284http://public.kitware.com/Bug/view.php?id=12284
.)

I did not make it an option yet, as I'm not sure exactly how it should be
done.

However
0002-kwsys: This is just broken and should be fixed.
Setting RecurseThroughSymlinks(false) would not even list the symlinks.

Regarding (0001): I guess this is the one that should be optional? It is
funny how directory symlinks are treated differently then normal symlinks. I
would consider it simply a bug and fix it.
0003: Possibly make it an option?
Again, I really can't think of a case when you would want the follow through
symlink behaviour, but I might just be naive.



On Thu, Jun 23, 2011 at 5:31 AM, Alan W. Irwin ir...@beluga.phys.uvic.cawrote:

 On 2011-06-22 12:04-0400 Bill Hoffman wrote:

  On 6/21/2011 4:43 PM, Alan W. Irwin wrote:

  So it is not a regression, but in my opinion it is still a bug.

 More comments at 
 http://public.kitware.com/Bug/**view.php?id=12284http://public.kitware.com/Bug/view.php?id=12284
 .

 Please fix.


 Patches are welcome, please send one...   It would have to be an option
 somehow at this point so as not to break existing code.


 I am fine with such an option.  GNU tar (at least) also has an option
 to follow symlinks or not.  Of course, the CPack option will have
 a different default than the GNU tar one, but that is required for
 CPack backwards compatibility.

 I don't understand C++ or the C++ internals of CMake well enough to
 put together a patch to solve this issue.  So I am limited to helping
 you guys out by doing testing to help clarify CMake bug issues and
 commenting on the practical implications of certain CMake bug reports
 like this one for the build systems of software projects like PLplot
 and FreeEOS to give you a better idea of what is at stake.


 Alan
 __
 Alan W. Irwin

 Astronomical research affiliation with Department of Physics and Astronomy,
 University of Victoria (astrowww.phys.uvic.ca).

 Programming affiliations with the FreeEOS equation-of-state implementation
 for stellar interiors (freeeos.sf.net); PLplot scientific plotting
 software
 package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
 Linux Links project (loll.sf.net); and the Linux Brochure Project
 (lbproject.sf.net).
 __

 Linux-powered Science
 __
 __**_
 Powered by www.kitware.com

 Visit other Kitware open-source projects at http://www.kitware.com/**
 opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/**listinfo/cmakehttp://www.cmake.org/mailman/listinfo/cmake



0001-ArchiveWrite-Don-t-recurse-through-directory-symlink.patch
Description: Binary data


0002-kwsys-Glob-Fix-so-directory-symlinks-are-added-as-fi.patch
Description: Binary data


0003-cpack-Fix-12284-don-t-recurse-through-directory-syml.patch
Description: Binary data
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] TGZ installer following links

2011-08-27 Thread Johan Björk
Attached patches to the bug and on this email. (
http://public.kitware.com/Bug/**view.php?id=12284http://public.kitware.com/Bug/view.php?id=12284
.)

I did not make it an option yet, as I'm not sure exactly how it should be
done.

However
0002-kwsys: This is just broken and should be fixed.
Setting RecurseThroughSymlinks(false) would not even list the symlinks.

Regarding (0001): I guess this is the one that should be optional? It is
funny how directory symlinks are treated differently then normal symlinks. I
would consider it simply a bug and fix it.
0003: Possibly make it an option?
Again, I really can't think of a case when you would want the follow through
symlink behaviour, but I might just be naive.



On Thu, Jun 23, 2011 at 5:31 AM, Alan W. Irwin ir...@beluga.phys.uvic.cawrote:

 On 2011-06-22 12:04-0400 Bill Hoffman wrote:

  On 6/21/2011 4:43 PM, Alan W. Irwin wrote:

  So it is not a regression, but in my opinion it is still a bug.

 More comments at 
 http://public.kitware.com/Bug/**view.php?id=12284http://public.kitware.com/Bug/view.php?id=12284
 .

 Please fix.


 Patches are welcome, please send one...   It would have to be an option
 somehow at this point so as not to break existing code.


 I am fine with such an option.  GNU tar (at least) also has an option
 to follow symlinks or not.  Of course, the CPack option will have
 a different default than the GNU tar one, but that is required for
 CPack backwards compatibility.

 I don't understand C++ or the C++ internals of CMake well enough to
 put together a patch to solve this issue.  So I am limited to helping
 you guys out by doing testing to help clarify CMake bug issues and
 commenting on the practical implications of certain CMake bug reports
 like this one for the build systems of software projects like PLplot
 and FreeEOS to give you a better idea of what is at stake.


 Alan
 __
 Alan W. Irwin

 Astronomical research affiliation with Department of Physics and Astronomy,
 University of Victoria (astrowww.phys.uvic.ca).

 Programming affiliations with the FreeEOS equation-of-state implementation
 for stellar interiors (freeeos.sf.net); PLplot scientific plotting
 software
 package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
 Linux Links project (loll.sf.net); and the Linux Brochure Project
 (lbproject.sf.net).
 __

 Linux-powered Science
 __
 __**_
 Powered by www.kitware.com

 Visit other Kitware open-source projects at http://www.kitware.com/**
 opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/**listinfo/cmakehttp://www.cmake.org/mailman/listinfo/cmake



0001-ArchiveWrite-Don-t-recurse-through-directory-symlink.patch
Description: Binary data


0002-kwsys-Glob-Fix-so-directory-symlinks-are-added-as-fi.patch
Description: Binary data


0003-cpack-Fix-12284-don-t-recurse-through-directory-syml.patch
Description: Binary data
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[cmake-developers] Disable prebinding flag on Xcode = 4.0

2011-08-18 Thread Johan Björk
PREBINDING has been obsoleted for a long time, and starting with Xcode 4,
having the setting is treated as a warning.

Attached patch stops writing PREBINDING if xcode version is =4.0

/Johan


0001-xcode-PREBINDING-is-obsoleted-in-XCode-4-and-is-trea.patch
Description: Binary data
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] cmake -E remove xx*, wildcards win32?

2011-08-18 Thread Johan Björk
If you are doing this at cmake time, simply use glob() to find the files,
then remove them using file(REMOVE).
If you are doing it as part of a target, try and create a new .cmake file
(configure_file or file(WRITE) that does glob+remove and execute it using
cmake -P script.cmake

/Johan


On Thu, Aug 18, 2011 at 7:31 AM, Arne Pagel a...@pagelnet.de wrote:

 Hello,
 I am trying to use cmake for a cross platform project.

 I want to delete some files using cmake -E remove file*

 This works on an linux system, but on an windows system wildcards are not
 working,
 I just can delete files using their explicit name. In my case the file
 names are not known, since they have a date coded into it.

 Any Idea?

 regards
   Arne
 __**_
 Powered by www.kitware.com

 Visit other Kitware open-source projects at http://www.kitware.com/**
 opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/**listinfo/cmakehttp://www.cmake.org/mailman/listinfo/cmake

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] ok guys, why is configure_file() so sucky?

2011-08-17 Thread Johan Björk
Agree on all points!

-Johan


On Wed, Aug 17, 2011 at 4:17 PM, Andreas Mohr a...@lisas.de wrote:

 [cue maximally inflammatory subject ;)]

 Hi,

 I keep encountering template file processing where
 @VAR@ replacements end up empty due to the required template
 variable simply not having been set (or empty) [or renamed away].
 Doh.

 I'd strongly vote for configure_file() to fail hard in such cases,
 _by default_.
 Build system life is already hard enough without all those nice
 features of incomplete/insufficient commands (especially in the
 packaging area I seem to keep hitting more holes
 than actual functionality :-P).

 So:
 - change configure_file() behaviour to fail a CMake configure run hard
  in case of unavailable (_not_ empty) @var@ (and perhaps ${var}?),
  and have this be the _default_ setting
 - add configure_file() flag to optionally _disable_ this hard failure
  in case it's actually unwanted
 - add configure_file() flag to optionally enable hard failure for the
  other case of existing yet empty variables, too
 - add policy around this new highly useful feature
 - hmm, but these things {w|sh}ould apply to both ${xx} and @xx@ - do we
 need
  to have some configuration to tell behaviour apart?
 - anything I've missed that should be added/changed for a more suitable
  implementation?
 - add these things to a new bug# for implementation

 Done Deal?

 Thanks,

 Andreas Mohr
 ___
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] append command

2011-08-13 Thread Johan Björk
I just wrote my own macro append_property(type name value) for this.
example:
append_property(SOURCE COMPILE_FLAGS -x objective-c++
translate.cpp stuff.cpp)
or
append_property(TARGET COMPILE_FLAGS foo mytarget)
etc

Would be nice to have that as an included macro, or at least a comment in
the documentation about what happens when you pass in a list.

/Johan

On Sat, Aug 13, 2011 at 8:57 PM, Clifford Yapp cliffy...@gmail.com wrote:

 On Sat, Aug 13, 2011 at 5:14 AM, Glenn Coombs glenn.coo...@gmail.com
 wrote:

  I haven't seen any discussion yet of my 2nd alternative of getting cmake
 to
  automatically convert lists to space separated strings for certain
 variables
  like CMAKE_EXE_LINKER_FLAGS_RELEASE.  If cmake did this then there would
 be
  less need for the concat version of set() as one could just use the
 existing
  list(APPEND) functionality.  Is this a realistic possibility, or are
 there
  implementation issues with this suggestion ?

 This surprised me as well - if you want to assemble a list of flags
 on the fly (I needed to assemble lists of lists of flags - we pass a
 lot of them) you have to take some care to either do the set trick
 correctly or convert the list to a string at the end (if you can be
 sure of where that is).

 Do I understand correctly that the main concern is the ability to pass
 args with ;' characters in these cases?  Then the question becomes
 whether quoting ; characters as needed in user-specified options is
 tricker than navigating the current behavior.  To be honest, I can see
 where trying to specify an argument with a quoted ; character from
 the command line would get a bit messy (in a ok, how do I quote this
 from this enviornment sort of way) - how common are ; characters as
 components of variable values?

 Cheers,
 CY
 ___
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] exclude build project from solution

2011-08-09 Thread Johan Björk
Dave, Bill? Anyone know what the difference is intended to be between
EXLUDE_FROM_ALL vs EXCLUDE_FROM_DEFAULT_BUILD?

/Johan


On Mon, Aug 1, 2011 at 6:57 PM, Johan Björk p...@spotify.com wrote:

 And another update while at it.

 The following cmake file illustrates the issue:

 FILE(WRITE foo.c )
 add_library(foo EXCLUDE_FROM_ALL foo.c)
 set_target_properties(foo PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
 FILE(WRITE foobar.c )
 add_executable(foobar foobar.c)
 target_link_libraries(foobar foo)

 This works fine in the makefile (and xcode) generator, but fails in MSVC
 2008 with
 1-- Skipped Build: Project: foo, Configuration: Debug Win32 --
 1Project not selected to build for this solution configuration
 2-- Build started: Project: foobar, Configuration: Debug Win32 --
 2Compiling...
 2foobar.c
 2Compiling manifest to resources...
 2Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
 2Copyright (C) Microsoft Corporation.  All rights reserved.
 2Linking...
 2LINK : fatal error LNK1104: cannot open file 'Debug\foo.lib'
 2Build log was saved at file://c:\Users\Felix Bruns\Documents\Visual
 Studio 2008\Projects\a'\foobar.dir\Debug\BuildLog.htm
 2foobar - 1 error(s), 0 warning(s)
 3-- Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32
 --
 3Project not selected to build for this solution configuration
 == Build: 0 succeeded, 1 failed, 1 up-to-date, 2 skipped ==

 I'll file a bug.




 On Mon, Aug 1, 2011 at 5:15 PM, Johan Björk p...@spotify.com wrote:

 and I just found

 The EXCLUDE_FROM_DEFAULT_BUILD property is used by the visual studio
 generators. If it is set to 1 the target will not be part of the default
 build when you select Build Solution.

 Anyone know why it is different from EXLUDE_FROM_ALL ?

 -Johan


 On Mon, Aug 1, 2011 at 5:05 PM, Johan Björk p...@spotify.com wrote:

 Hi all,

 Anyone know anything about this? I'm seeing the same issue with MSVC 2008
 + cmake 2.8(.?)

 add_library(foo .. EXCLUDE_FROM_ALL ..)

 -Johan


 On Tue, May 3, 2011 at 4:59 PM, Andrea Galeazzi galea...@korg.itwrote:

 I've a project made up of multiple executable target:
 add_executable(TARGET_NAME1 ${SOURCES1})
 add_executable(TARGET_NAME2 ${SOURCES2})
 add_executable(TARGET_NAME3 ${SOURCES3})

 ...
 Now I'd like to build just only TARGET_NAME1 when I press F7 (build
 solution) in visual studio. I tried to add
 set_target_properties(TARGET_**NAME2 PROPERTIES EXCLUDE_FROM_ALL
 TRUE)
 set_target_properties(TARGET_**NAME3 PROPERTIES EXCLUDE_FROM_ALL
 TRUE)
 ..
 but it only remove the dependency from ALL_BUILD project.
 So, is it possible to generate a such kind of solution?
 __**_
 Powered by www.kitware.com

 Visit other Kitware open-source projects at http://www.kitware.com/**
 opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/**listinfo/cmakehttp://www.cmake.org/mailman/listinfo/cmake





___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[cmake-developers] Setting environment variables for builds

2011-08-08 Thread Johan Björk
Hey guys,

This has been discussed a billion times, so I'll keep it short.

Problem: Some parts of the build requires a environment variable to be set
Solution: Several workarounds, use custom commands, wrapper scripts etc.

While the solution works fine for basic stuff, I have several toolchains etc
that requires environment variables to be installed for them to work.

Since I'm using cmake --build for all my building, I am thinking about
creating a new command in cmake that will store certain environment
variables in the cache, and if building using cmake --build, they will be
set before the build starts.

Any comments before I go and build this?

Cheers
-Johan
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] Bug fix requests for the *next* release of CMake...

2011-08-08 Thread Johan Björk
http://public.kitware.com/Bug/view.php?id=12284 (cpack copies data in
symlinks)


On Mon, Aug 1, 2011 at 9:26 PM, Alexander Neundorf
a.neundorf-w...@gmx.netwrote:

 On Saturday 30 July 2011, Alan W. Irwin wrote:
  Please do a fundamental fix for
  http://public.kitware.com/Bug/view.php?id=9220.

 Since I implemented this, I feel responsible for it.
 But most probably I will not be able to do this for 2.8.6.
 At least I'll try to make it work again for ASM.

 Alex
 ___
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] exclude build project from solution

2011-08-01 Thread Johan Björk
Hi all,

Anyone know anything about this? I'm seeing the same issue with MSVC 2008 +
cmake 2.8(.?)

add_library(foo .. EXCLUDE_FROM_ALL ..)

-Johan


On Tue, May 3, 2011 at 4:59 PM, Andrea Galeazzi galea...@korg.it wrote:

 I've a project made up of multiple executable target:
 add_executable(TARGET_NAME1 ${SOURCES1})
 add_executable(TARGET_NAME2 ${SOURCES2})
 add_executable(TARGET_NAME3 ${SOURCES3})

 ...
 Now I'd like to build just only TARGET_NAME1 when I press F7 (build
 solution) in visual studio. I tried to add
 set_target_properties(TARGET_**NAME2 PROPERTIES EXCLUDE_FROM_ALL TRUE)
 set_target_properties(TARGET_**NAME3 PROPERTIES EXCLUDE_FROM_ALL TRUE)
 ..
 but it only remove the dependency from ALL_BUILD project.
 So, is it possible to generate a such kind of solution?
 __**_
 Powered by www.kitware.com

 Visit other Kitware open-source projects at http://www.kitware.com/**
 opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/**listinfo/cmakehttp://www.cmake.org/mailman/listinfo/cmake

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] exclude build project from solution

2011-08-01 Thread Johan Björk
and I just found

The EXCLUDE_FROM_DEFAULT_BUILD property is used by the visual studio
generators. If it is set to 1 the target will not be part of the default
build when you select Build Solution.

Anyone know why it is different from EXLUDE_FROM_ALL ?

-Johan


On Mon, Aug 1, 2011 at 5:05 PM, Johan Björk p...@spotify.com wrote:

 Hi all,

 Anyone know anything about this? I'm seeing the same issue with MSVC 2008 +
 cmake 2.8(.?)

 add_library(foo .. EXCLUDE_FROM_ALL ..)

 -Johan


 On Tue, May 3, 2011 at 4:59 PM, Andrea Galeazzi galea...@korg.it wrote:

 I've a project made up of multiple executable target:
 add_executable(TARGET_NAME1 ${SOURCES1})
 add_executable(TARGET_NAME2 ${SOURCES2})
 add_executable(TARGET_NAME3 ${SOURCES3})

 ...
 Now I'd like to build just only TARGET_NAME1 when I press F7 (build
 solution) in visual studio. I tried to add
 set_target_properties(TARGET_**NAME2 PROPERTIES EXCLUDE_FROM_ALL TRUE)
 set_target_properties(TARGET_**NAME3 PROPERTIES EXCLUDE_FROM_ALL TRUE)
 ..
 but it only remove the dependency from ALL_BUILD project.
 So, is it possible to generate a such kind of solution?
 __**_
 Powered by www.kitware.com

 Visit other Kitware open-source projects at http://www.kitware.com/**
 opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/**listinfo/cmakehttp://www.cmake.org/mailman/listinfo/cmake



___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] exclude build project from solution

2011-08-01 Thread Johan Björk
And another update while at it.

The following cmake file illustrates the issue:

FILE(WRITE foo.c )
add_library(foo EXCLUDE_FROM_ALL foo.c)
set_target_properties(foo PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
FILE(WRITE foobar.c )
add_executable(foobar foobar.c)
target_link_libraries(foobar foo)

This works fine in the makefile (and xcode) generator, but fails in MSVC
2008 with
1-- Skipped Build: Project: foo, Configuration: Debug Win32 --
1Project not selected to build for this solution configuration
2-- Build started: Project: foobar, Configuration: Debug Win32 --
2Compiling...
2foobar.c
2Compiling manifest to resources...
2Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
2Copyright (C) Microsoft Corporation.  All rights reserved.
2Linking...
2LINK : fatal error LNK1104: cannot open file 'Debug\foo.lib'
2Build log was saved at file://c:\Users\Felix Bruns\Documents\Visual
Studio 2008\Projects\a'\foobar.dir\Debug\BuildLog.htm
2foobar - 1 error(s), 0 warning(s)
3-- Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32
--
3Project not selected to build for this solution configuration
== Build: 0 succeeded, 1 failed, 1 up-to-date, 2 skipped ==

I'll file a bug.




On Mon, Aug 1, 2011 at 5:15 PM, Johan Björk p...@spotify.com wrote:

 and I just found

 The EXCLUDE_FROM_DEFAULT_BUILD property is used by the visual studio
 generators. If it is set to 1 the target will not be part of the default
 build when you select Build Solution.

 Anyone know why it is different from EXLUDE_FROM_ALL ?

 -Johan


 On Mon, Aug 1, 2011 at 5:05 PM, Johan Björk p...@spotify.com wrote:

 Hi all,

 Anyone know anything about this? I'm seeing the same issue with MSVC 2008
 + cmake 2.8(.?)

 add_library(foo .. EXCLUDE_FROM_ALL ..)

 -Johan


 On Tue, May 3, 2011 at 4:59 PM, Andrea Galeazzi galea...@korg.it wrote:

 I've a project made up of multiple executable target:
 add_executable(TARGET_NAME1 ${SOURCES1})
 add_executable(TARGET_NAME2 ${SOURCES2})
 add_executable(TARGET_NAME3 ${SOURCES3})

 ...
 Now I'd like to build just only TARGET_NAME1 when I press F7 (build
 solution) in visual studio. I tried to add
 set_target_properties(TARGET_**NAME2 PROPERTIES EXCLUDE_FROM_ALL TRUE)
 set_target_properties(TARGET_**NAME3 PROPERTIES EXCLUDE_FROM_ALL TRUE)
 ..
 but it only remove the dependency from ALL_BUILD project.
 So, is it possible to generate a such kind of solution?
 __**_
 Powered by www.kitware.com

 Visit other Kitware open-source projects at http://www.kitware.com/**
 opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/**listinfo/cmakehttp://www.cmake.org/mailman/listinfo/cmake




___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Bug fix requests for the *next* release of CMake...

2011-08-01 Thread Johan Björk
http://www.cmake.org/Bug/view.php?id=12379 (EXCLUDE_FROM_DEFAULT_BUILD
broken)
http://www.cmake.org/Bug/view.php?id=12377 (-g0 enables debug in XCode)
http://www.cmake.org/Bug/view.php?id=12358 (ENABLE_LANGUAGE(.. OPTIONAL)
breaks configure step
http://www.cmake.org/Bug/view.php?id=11690 (XCode generator overwrites user
settings)

Bonus wishlist:
http://www.cmake.org/Bug/view.php?id=12275 (Generated files not removed by
clean target w/XCode)

On Mon, Aug 1, 2011 at 12:54 PM, Domagoj Saric 
domagoj.sa...@littleendian.com wrote:


 http://public.kitware.com/Bug/**view.php?id=12375http://public.kitware.com/Bug/view.php?id=12375
 http://public.kitware.com/Bug/**view.php?id=12376http://public.kitware.com/Bug/view.php?id=12376

 thanks ;)


 --
 What Huxley teaches is that in the age of advanced technology, spiritual
 devastation is more likely to come from an enemy with a smiling face than
 from one whose countenance exudes suspicion and hate.
 Neil Postman

 __**_
 Powered by www.kitware.com

 Visit other Kitware open-source projects at http://www.kitware.com/**
 opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/**listinfo/cmakehttp://www.cmake.org/mailman/listinfo/cmake

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [cmake-developers] [CMake] Xcode and Cmake ReRun

2011-07-28 Thread Johan Björk
Cool stuff. Thanks for finding it!

/Johan


On Thu, Jul 28, 2011 at 3:47 PM, David Cole david.c...@kitware.com wrote:

 After applying a small tweak on top of your patch, we have a dashboard
 result the same as before your patch (with only one failing test):

  http://cdash.org/CDash/buildSummary.php?buildid=1374108

 The tweak needed was this:

 $ git show
 commit 027b5f14efdb841e4917275f379ec5bb712fde4c
 Author: David Cole david.c...@kitware.com
 Date:   Thu Jul 28 08:45:18 2011 -0400

WIP: Work even with spaces in the file name

 diff --git a/Source/cmGlobalXCodeGenerator.cxx
 b/Source/cmGlobalXCodeGenerator.cxx
 index 8afca5c..7104970 100644
 --- a/Source/cmGlobalXCodeGenerator.cxx
 +++ b/Source/cmGlobalXCodeGenerator.cxx
 @@ -368,9 +368,11 @@
 cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,

   // Add Re-Run CMake rules
   this-CreateReRunCMakeFile(root, gens);
 +  std::string file =
 this-ConvertToRelativeForMake(this-CurrentReRunCMakeMakefile.c_str());
 +  cmSystemTools::ReplaceString(file, \\ ,  );
   mf-AddUtilityCommand(ZERO_CHECK, true, no_depends,
 no_working_directory,
 -make, -f,
 this-ConvertToRelativeForMake(this-CurrentReRunCMakeMakefil
 +make, -f, file.c_str());

   // now make the allbuild depend on all the non-utility targets
   // in the project


 On Thu, Jul 28, 2011 at 8:39 AM, David Cole david.c...@kitware.com
 wrote:
  I ran these two dashboards this morning:
 
   before patch: http://cdash.org/CDash/buildSummary.php?buildid=1373777
   after patch:  http://cdash.org/CDash/buildSummary.php?buildid=1373850
 
  The second one with 131 failing tests is the one with your patch
  applied. I think it may just be a quoting problem with spaces in the
  path, though. I'll make some adjustments, and try again and let you
  know.
 
 
  David
 
 
  On Tue, Jul 26, 2011 at 8:23 PM, David Cole david.c...@kitware.com
 wrote:
  It looks reasonable at first glance. I'll give it a try with the full
  CMake test suite tomorrow plus maybe a build of a larger project, and
  let you know if I discover any gotchas.
 
 
  Thanks,
  David
 
 
  On Tue, Jul 26, 2011 at 5:16 PM, Johan Björk p...@spotify.com wrote:
  Hi David,
  Please see attached patch. It seems to work with the project I happened
 to
  have open; it's not tested more then that. You know the xcode generator
 a
  whole lot better then me; does it seem reasonable?
  Thanks
  /Johan
 
  On Tue, Jul 26, 2011 at 7:31 PM, David Cole david.c...@kitware.com
 wrote:
 
  Sounds like we need a ZERO_CHECK target like we have in the Visual
  Studio generators to enable parallel building in Xcode.
 
  There are currently some problems with the existing CMake re-run
  commands on VS builds when CMake inputs change during the course of
  the build. When that happens, (not something that us CMake devs
  expect, by the way, but not forbidden/prevented either...), CMake
  re-runs during the middle of the build, and we get all the bug reports
  about Visual Studio reload stuff not working (here, and related
  issues: http://public.kitware.com/Bug/view.php?id=11258 and
  particularly, this note:
  http://public.kitware.com/Bug/view.php?id=11440#c26905 )
 
  I don't think there's a specific reason for it... Perhaps it was
  simply easiest that way, or we didn't have a way to depend on custom
  targets at the time, or it was modeled after the VS re-run rules...
  (Or maybe Bill or Brad will chime in if I'm incorrect here...)
 
 
  HTH,
  David
 
 
  On Mon, Jul 25, 2011 at 5:37 PM, Johan Björk p...@spotify.com wrote:
   Hi guys,
  
   I noticed that each XCode target has an associated CMake ReRun
 script
   phase. Is there a specific reason for this (in difference to having
   one target that all others depend on that does the ReRun check?)
  
   It causes a fair few issues, it fails when you are parallelcompiling
   targets (It'll start number of cpus copies of cmake at the same
   time), secondly it adds quite some time to the build if you have
 many
   targets
   /Johan
   ___
   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/Wiki/CMake_FAQ
  
   Follow this link to subscribe/unsubscribe:
   http://www.cmake.org/mailman/listinfo/cmake
  
 
 
 
 

___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Avoid merging stderr/stdout in RunSingleCommand

2011-07-26 Thread Johan Björk
Sure, attached files.

/Johan



On Mon, Jul 25, 2011 at 5:32 PM, Brad King brad.k...@kitware.com wrote:

 On 07/20/2011 05:48 AM, Johan Björk wrote:
  Finally got around to fix this properly. Let me know what you think.

 Cool, thanks!  Please split the patch into one that converts the boolean
 to an enumeration value with just OUTPUT_NONE and OUTPUT_MERGE and a
 second patch that adds OUTPUT_NORMAL and the new implementation.  That
 will be easier to review.

 Thanks,
 -Brad



0001-cmSystemTools-RunSingleCommand-now-takes-a-enum-inst.patch
Description: Binary data


0002-cmSystemTools-RunSingleCommand-add-a-OUTPUT_NORMAL-f.patch
Description: Binary data
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[CMake] Xcode and Cmake ReRun

2011-07-25 Thread Johan Björk
Hi guys,

I noticed that each XCode target has an associated CMake ReRun script
phase. Is there a specific reason for this (in difference to having
one target that all others depend on that does the ReRun check?)

It causes a fair few issues, it fails when you are parallelcompiling
targets (It'll start number of cpus copies of cmake at the same
time), secondly it adds quite some time to the build if you have many
targets
/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Appending to the LINK_FLAGS target property ?

2011-07-22 Thread Johan Björk
Glenn,

An option APPEND_STRING was added, see
http://public.kitware.com/Bug/view.php?id=12342

/Johan


On Mon, Jun 27, 2011 at 4:47 PM, Glenn Coombs glenn.coo...@gmail.com wrote:
 For variables like CMAKE_C_FLAGS one can append to them like this:

     set(CMAKE_C_FLAGS ${CMAKE_CFLAGS} -some_option)

 For target properties like LINK_FLAGS I was using this command:

     set_property(TARGET myDLL APPEND PROPERTY LINK_FLAGS
 /NODEFAULTLIB:LIBCMT)

 to do the append.  However, when I append a second time:

     set_property(TARGET myDLL APPEND PROPERTY LINK_FLAGS
 /INCLUDE:_InitLibrary)

 then it breaks because the string that Visual Studio sees contains a
 semicolon in between the 2 options.  I can work round this by writing my
 append like this:

     get_property(link_flags TARGET myDLL PROPERTY LINK_FLAGS)
     set(link_flags ${link_flags} /INCLUDE:_InitLibrary)
     set_target_properties(myDLL PROPERTIES LINK_FLAGS ${link_flags})

 but that is a bit verbose for my liking.  I understand that the semicolons
 are how cmake separates list items from one another but shouldn't cmake
 automatically stringify the list (by replacing semicolons with spaces)
 before passing it through to the generator code ?  The same problem will
 occur for any of the XXX_FLAGS properties like COMPILE_FLAGS that are passed
 through unchanged to the makefile or Visual Studio project file.

 Is it worth filing a feature request to ask for cmake to stringify lists for
 the appropriate variables ?  Or is there a good reason why cmake can't or
 shouldn't implement this behaviour ?

 --
 Glenn


 ___
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Assembler handling in 2.8.5 vs 2.8.4

2011-07-22 Thread Johan Björk
Alex,

I'm trying to conditionally enable ASM support for my compilers that
support it (I have a project that gets crosscompiled to a whole slew
of architectures).

In an ideal situation, I would use
ENABLE_LANGUAGE(ASM OPTIONAL) and check the flag if it works or not.

For a few of the compilers, I get the same issue as Florian where the
whole project generation fails (because cmake couldn't figure out the
assembler type :/). Is there any way to tell cmake what 'type' it is?
Also, can it be changed to just report asm support as false if it
can't detect the assembler type?

/Johan


On Fri, Jul 22, 2011 at 10:00 PM, Alexander Neundorf
a.neundorf-w...@gmx.net wrote:
 On Thursday 21 July 2011, Florian Reinhard wrote:
 Hi Alex,

 Thank you for the quick response,

 2011/7/20 Alexander Neundorf a.neundorf-w...@gmx.net:
  Damn, I was so sure I updated the wiki, but apparently I didn't.
  So here are the old docs, but this changed quite a bit for 2.8.5:
  http://www.vtk.org/Wiki/CMake/Assembler
 
  What it does now:
  the language ASM is now for assembler files which can be processed by
  your C compiler. This actually seems to be the case for you.
  Is the compiler ID of your compiler recognized by cmake ?

 I guess not, since i define the compiler and how it is being called my
 self there is/was no need to have cmake detect the compiler ID.

  It seems like it isn't.
  If it was, the assembler support would not try to figure out the
  compiler ID for the assembler again, it would just use the compiler ID
  from C or CXX.
 
  Can you please post the complete cmake output from some basic C project ?

 Sure, hope to get this done by Friday afternoon CEST.

  Basically, what we should do, add support for your compiler toolchain,
  i.e. add support for recognizing your compiler, and create files in
  Modules/Compiler/TMS-C|CXX|ASM.cmake.

 Having cl6x support included in CMake would be really nice, besides
 that knowing how to setup a toolchain easily would be good either ;)

  This doesn't require recompiling cmake, it is all in the modules files.
  Then it should all work much better.
 
  How do you compiler settings, toolchain file etc. look right now ?

 I attached three files:
 help-command.txt
     The Texas Instruments command --help output
 CMakeLists_root.txt
     Thats where i setup the toolchain and define the project
 CMakeLists_src.txt
     Thats where i add sources and binaries

 The cl6x toolchain is available for linux and windows after registration
 at:
 https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.
 htm

 Can you build cmake from this branch I just created ?
 http://cmake.org/gitweb?p=stage/cmake.git;a=shortlog;h=refs/heads/TI_DSP_Compiler

 It has basic support for the TI compiler, see the files
 Modules/Compiler/TI_DSP-*.cmake.

 At least I was able to compile and link C, C++ and an assembler file.

 It should also work to copy these three files simply in the Modules/Compiler/
 directory of your installed cmake, but you need at least CMake 2.8.4.

 I'm quite sure these files are not complete.
 Please give them a try and I'd be happy about patches to make them really
 work.

 Alex
 ___
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] Avoid merging stderr/stdout in RunSingleCommand

2011-07-20 Thread Johan Björk
Hi Brad,

Finally got around to fix this properly. Let me know what you think.

Cheers
/Johan

On Mon, May 16, 2011 at 6:58 PM, Brad King brad.k...@kitware.com wrote:

 On 05/16/2011 10:05 AM, Johan Björk wrote:
  Would it be possible to change the verbose flag to output the results
  on the corresponding stream as it was read on?

 Instead replace the verbose boolean with an enumeration that chooses
 among off, on, or split verbosity.

  I don't quite understand the StdoutCallback and Error callbacks inside
  cmSystemTools. Anyone can tell me what they are used for?

 IIRC they're used inside cmake-gui to capture the output of child
 processes for display in the window instead of the real stdout and
 stderr.

  See attached patch. Not sure if I propose it, as it will break for
  anyone expecting all output in stdout. I guess we could introduce a
  --no-merge-output or something flag.

 That makes sense.  The flag would just map through to the proper
 argument of RunSingleCommand.

 -Brad



0001-Replace-the-verbose-flag-in-cmSystemTools-RunSingleC.patch
Description: Binary data
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Change type of CMAKE_OSX_SYSROOT to STRING instead of PATH

2011-05-27 Thread Johan Björk
uh, sorry about the noise, you are right, the patch is completely bogus.

I wonder where it converts it to a path, will have to look into a bit more.

thanks
/Johan


On Fri, May 27, 2011 at 12:17 PM, David Cole david.c...@kitware.com wrote:
 This patch can't quite be right.

 After this patch, the value of CMAKE_OSX_SYSROOT will be:
 macosx10.5;STRING;PATH;The product will be built agai...

 You meant to change the PATH to a STRING I think -- but even so,
 this change should have no actual effect on the behavior of CMake. The
 type of a variable is merely a hint to the gui programs on what type
 of edit control to use for editing the variable's value. Aside from
 that, there should be no observable effect.

 The effect you're seeing as a result of this mistaken patch is
 probably due to the fact that CMAKE_OSX_SYSROOT is not being *cached*
 anymore, not because you've changes a cache entry's type

 I am afraid we'll have to do a round of fixes for Xcode 4 support if
 it no longer accepts full path to the SDK as a valid value for this
 property.


 On Fri, May 27, 2011 at 5:54 AM, Johan Björk p...@spotify.com wrote:
 Hi guys,

 Attached patch that changes the type of the CMAKE_OSX_SYSROOT
 variable. All versions of XCode accept in addition to the full path to
 the SDK, also a symbolic name, ie 'macosx10.5' or similar. To make
 things worse, some versions of XCode 4 doesn't seem to like the full
 paths at all.

 Without this patch, it already works fine, until you try to use
 TRY_COMPILE() or the like, where your symbolic name will be converted
 to a full path.
 '/Users/phb/DEV/.../build/CMakeFiles/CMakeTmp/CMakeFiles/CMakeTmp/macosx10.5'

 Should be a trivial fix, there should be no reason where we want
 automatic path expansion on that value.

 Thanks
 /Johan

 ___
 cmake-developers mailing list
 cmake-developers@cmake.org
 http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers



___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] Error on uninitialized vars?

2011-05-26 Thread Johan Björk
Hi,

Basically we need to compile a few files with specific flags (only
in release builds, and we had no test that checked for this) and I had
a typo in the flag variable, resulting no extra flags being set.

SET_SOURCE_FILES_PROPERTIES(some.cpp files.cpp PROPERTIES
COMPILE_FLAGS ${SPECIAL_Flgs})

/Johan


On Wed, May 25, 2011 at 6:12 PM, David Cole david.c...@kitware.com wrote:
 Johan,

 I do not think there's a built-in way to make these warnings into errors...
 It would be easy enough to do, but it's not there right now.

 One reason is that most projects were developed with the understanding that
 ${uninitialized_variable} resolves to empty. Many projects even depend on
 this, and so making it a warning first (that must be explicitly turned on),
 seemed to be the right way to approach it.

 I'm curious: what sorts of nasty bugs did you find...?


 HTH,
 David


 On Tue, May 24, 2011 at 7:42 AM, Johan Björk p...@spotify.com wrote:

 Hi guys,

 I just discovered the --warn-uninitialized flag to cmake, and in the
 process found some really nasty bugs. Is there any way to enable this
 from the CMakeLists.txt files? Is there a corresponding
 --error-uninitialized value?

 Thanks
 /Johan
 ___
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake


___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Error on uninitialized vars?

2011-05-24 Thread Johan Björk
Hi guys,

I just discovered the --warn-uninitialized flag to cmake, and in the
process found some really nasty bugs. Is there any way to enable this
from the CMakeLists.txt files? Is there a corresponding
--error-uninitialized value?

Thanks
/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[cmake-developers] Avoid merging stderr/stdout in RunSingleCommand

2011-05-16 Thread Johan Björk
Hi,

CMake merges the output of stderr/stdout when running cmake --build . ...

The --build doesn't really do anything fancy, just boils down to
calling  cmSystemTools::RunSingleCommand with the verbose=True
argument. (Seems it does not use the output variable).
Would it be possible to change the verbose flag to output the results
on the corresponding stream as it was read on?

I don't quite understand the StdoutCallback and Error callbacks inside
cmSystemTools. Anyone can tell me what they are used for?

See attached patch. Not sure if I propose it, as it will break for
anyone expecting all output in stdout. I guess we could introduce a
--no-merge-output or something flag.

Opinions?
/Johan


0001-Don-t-squash-stderr-and-stdout-in-RunSingleCommand.patch
Description: Binary data
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[CMake] Converting ctest output to junit

2011-04-26 Thread Johan Björk
Hi,

Anyone has any code to convert the ctest xml output to jUnit?


-Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Bug fix requests for the *next* release of CMake...

2011-04-09 Thread Johan Björk
http://public.kitware.com/Bug/view.php?id=11690 XCode user settings

http://public.kitware.com/Bug/view.php?id=11692 interrupt batch build
doesn't stop visual studio

http://public.kitware.com/Bug/view.php?id=10039 Xcode gen only creates one
level of group nesting

http://public.kitware.com/Bug/view.php?id=11844 Xcode depends helper works
badly. But prefer to remove dep helper completely.



http://public.kitware.com/Bug/view.php?id=11667 - this bug is already fixed
and should be closed.

http://public.kitware.com/Bug/view.php?id=8179 - dup of above



-Johan



On Fri, Apr 1, 2011 at 2:18 AM, Chris Scharver schar...@gmail.com wrote:

 On Thu, Mar 31, 2011 at 6:39 PM, Bill Hoffman bill.hoff...@kitware.com
 wrote:
  On 3/31/2011 6:15 PM, David Cole wrote:
 
  On Thu, Mar 31, 2011 at 6:05 PM, Bill Hoffman bill.hoff...@kitware.com
  mailto:bill.hoff...@kitware.com wrote:
 
 On 3/31/2011 4:19 PM, Chris Scharver wrote:
 
 EXTERNAL_OBJECT not linked using Visual Studio 2010
 http://public.kitware.com/Bug/view.php?id=11891
 
 Thanks for the pointer to that bug.  It even has a fix.  The thing I
 can not figure  out is why our ExternlObj test is passing even when
 this is broken   Any ideas why that test works?
 
  I think it's one of those works in MSBuild, but not in devenv
 issues...
 
  Nope, I loaded it up in devenv and ExternlObj compiles  Ran cmake-gui
 on
  ExternalObj then loaded the project and it works... ???

 I just did some tinkering and found that a simple change of modifying
 the ExternalObj test to link with the external object resulted in a
 failure.

 ADD_EXECUTABLE(ExternalOBJ executable.cxx ${EXTERNAL_OBJECT})
 SET_SOURCE_FILES_PROPERTIES(${EXTERNAL_OBJECT} PROPERTIES EXTERNAL_OBJECT
 1)

 Perhaps the fact that there's a rule to generate the custom object
 changes how it's handled?

 Chris
 ___
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[cmake-developers] Small patch to support build-setting conditions in XCode

2011-04-05 Thread Johan Björk
Hi all,

Tiny patch attached to support build-setting conditions in XCode
(XCODE_ATTRIBUTE_...[sdk=iphone]) for example. The issue was simply that
XCode requires the key to be quoted when it contains [].

Cheers
/Johan


0001-XCode-Support-specifing-build-setting-conditions-in-.patch
Description: Binary data
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Small patch to support build-setting conditions in XCode

2011-04-05 Thread Johan Björk
How about this one.

/Johan

On Tue, Apr 5, 2011 at 3:35 PM, Johan Björk p...@spotify.com wrote:

 yep, but will need to update the code to print the attribute name using
 PrintString(). Will send updated patch.


 On Tue, Apr 5, 2011 at 3:23 PM, Brad King brad.k...@kitware.com wrote:

 On 04/05/2011 09:17 AM, Johan Björk wrote:
  Tiny patch attached to support build-setting conditions in XCode
  (XCODE_ATTRIBUTE_...[sdk=iphone]) for example. The issue was simply that
  XCode requires the key to be quoted when it contains [].

 I think the right place for this is in cmXCodeObject::PrintString where
 it already checks for characters that need quoting.  Does that work?

 -Brad




 --
 Johan Björk
 Team Lead, Development Tools
 Spotify AB
 Address: Birger Jarlsgatan 6, 114 46 Stockholm, Sweden
 Phone:+46 (0)709 22 59 02

 This e-mail (including any attachments) may contain information that is
 confidential and/or privileged. It is intended only for the recipient(s).
 If you have reason to believe that you are not the intended recipient of
 this e-mail, please contact the sender immediately and delete the e-mail
 from your computer.



0001-XCode-Also-qoute-as-needed-to-set-build-configuratio.patch
Description: Binary data
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] ExternalProject + Patch command

2011-03-23 Thread Johan Björk
Thanks guys.

I ended up with a different (hack) way:

To recap, my issue was that my patch would be applied twice when
building with multi-configuration generators.

Since I am always building the external project with a release
configuration, the following worked fine to disable the
multi-configuration code for the external project.

   SET(_backup ${CMAKE_CONFIGURATION_TYPES})
   SET(CMAKE_CONFIGURATION_TYPES  CACHE STRING  FORCE)
   ExternalProject_Add(foo
   ….
   )
  ExternalProject_Get_Property()
SET(CMAKE_CONFIGURATION_TYPES ${_backup} CACHE STRING  FORCE)

/Johan

On Wed, Mar 16, 2011 at 6:26 PM, Luigi Calori l.cal...@cineca.it wrote:
 On 16/03/2011 17.37, David Cole wrote:

 It would be nice (as a future feature addition) to be able to support
 sharing the download/update/patch/source_dir aspects of an
 ExternalProject target among multiple configurations and avoid the
 multiple runs of these things that are exactly the same independent of
 the config.

 Until that dream becomes reality, though.

 I had once modified the External to include support for SRC_STAMP_DIR
 #    [SRCSTAMP_DIR dir]          # Directory to store source step timestamps

 I still have the file but i unfortunated did not kept it up to date with
 recent mods

 You could run a script as the PATCH_COMMAND, and put some sort of has
 this patch already been applied to this source tree logic into the
 script, and only actually do the patch command if not already applied.

 It's a work-around, and might be ugly, but it should work.

 Another way is to split the project in two:

 one build the source and the other do the config,build,install like

 ExternalProject_Add(
    ${PACKAGE}-GetSource
    SOURCE_DIR ${Package_Source_Dir}
    STAMP_DIR ${Package_Source_Stamp_Dir}
 --- I set this in a place
 near the sources, so can remove the build without re-patch
    SVN_REPOSITORY 
    PATCH_COMMAND - your patch---
    UPDATE_COMMAND 
    CONFIGURE_COMMAND 
    BUILD_COMMAND 
    INSTALL_COMMAND 
 )

 if(Package_current_dependencies_effective_line)
    set( Package_current_dependencies_effective_line
 ${Package_current_dependencies_effective_line} ${PACKAGE}-GetSource)
 else()
    set(Package_current_dependencies_effective_line DEPENDS
 ${PACKAGE}-GetSource)
 endif()



 ExternalProject_Add(
    ${PACKAGE}
    SOURCE_DIR ${Package_Source_Dir}
    DOWNLOAD_COMMAND  --this is
 important
    BUILD_DIR ..
   INSTALL_DIR 
    CMAKE_COMMAND ${CMAKE_COMMAND}
    CMAKE_ARGS
        ${Package_std_cmake_args}
        ${Package_additional_cmake_args}
    BUILD_COMMAND 
    INSTALL_COMMAND 
    ${Package_current_dependencies_effective_line} 
 add ${PACKAGE}-GetSource to your dependencies
    STEP_TARGETS configure build

 )

 HTH
                Luigi



 HTH,
 David


 On Wed, Mar 16, 2011 at 11:40 AM, Johan Björkp...@spotify.com  wrote:

 Hi everyone,


 I'm using an SVN repository and a PATCH command. It seems to work
 fine, but when I'm selecting a different build configuration, all
 steps will be executed again (as expected), but it results in my patch
 being applied twice.

 Any ideas how to work around this?

 My externalProject command for reference:

    ExternalProject_Add(Breakpad
      SVN_REPOSITORY http://google-breakpad.googlecode.com/svn/trunk/
      UPDATE_COMMAND 
      CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=INSTALL_DIR
 -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
 -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
      PATCH_COMMAND patch
 ${CMAKE_CURRENT_LIST_DIR}/other/patches/breakpad.patch
    )

 Thanks
 /Johan
 ___
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

 ___
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake



 ___
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake




-- 
Johan Björk
Team Lead, Development Tools
Spotify AB
Address: Birger Jarlsgatan 6, 114 46 Stockholm, Sweden
Phone:+46 (0)709 22 59

[CMake] ExternalProject + Patch command

2011-03-16 Thread Johan Björk
Hi everyone,


I'm using an SVN repository and a PATCH command. It seems to work
fine, but when I'm selecting a different build configuration, all
steps will be executed again (as expected), but it results in my patch
being applied twice.

Any ideas how to work around this?

My externalProject command for reference:

ExternalProject_Add(Breakpad
  SVN_REPOSITORY http://google-breakpad.googlecode.com/svn/trunk/
  UPDATE_COMMAND 
  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=INSTALL_DIR
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
-DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
  PATCH_COMMAND patch 
${CMAKE_CURRENT_LIST_DIR}/other/patches/breakpad.patch
)

Thanks
/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] ExternalProject + Patch command

2011-03-16 Thread Johan Björk
Re-downloading it would be fine. How can I make sure a different
directory gets used? Since I'm using a multi-configuration IDE, I
can't think of any variables to use for PREFIX or such.

-Johan


On Wed, Mar 16, 2011 at 5:37 PM, David Cole david.c...@kitware.com wrote:
 It would be nice (as a future feature addition) to be able to support
 sharing the download/update/patch/source_dir aspects of an
 ExternalProject target among multiple configurations and avoid the
 multiple runs of these things that are exactly the same independent of
 the config.

 Until that dream becomes reality, though.

 You could run a script as the PATCH_COMMAND, and put some sort of has
 this patch already been applied to this source tree logic into the
 script, and only actually do the patch command if not already applied.

 It's a work-around, and might be ugly, but it should work.


 HTH,
 David


 On Wed, Mar 16, 2011 at 11:40 AM, Johan Björk p...@spotify.com wrote:
 Hi everyone,


 I'm using an SVN repository and a PATCH command. It seems to work
 fine, but when I'm selecting a different build configuration, all
 steps will be executed again (as expected), but it results in my patch
 being applied twice.

 Any ideas how to work around this?

 My externalProject command for reference:

    ExternalProject_Add(Breakpad
      SVN_REPOSITORY http://google-breakpad.googlecode.com/svn/trunk/
      UPDATE_COMMAND 
      CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=INSTALL_DIR
 -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
 -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
      PATCH_COMMAND patch 
 ${CMAKE_CURRENT_LIST_DIR}/other/patches/breakpad.patch
    )

 Thanks
 /Johan
 ___
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake





-- 
Johan Björk
Team Lead, Development Tools
Spotify AB
Address: Birger Jarlsgatan 6, 114 46 Stockholm, Sweden
Phone:+46 (0)709 22 59 02
This e-mail (including any attachments) may contain information that is
confidential and/or privileged. It is intended only for the recipient(s).
If you have reason to believe that you are not the intended recipient of
this e-mail, please contact the sender immediately and delete the e-mail
from your computer.
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] [CMake] xcode project and static library dependencies

2011-03-07 Thread Johan Björk
Nick,

We are using a modification on your patch internally.
Few things
1) It breaks projects that have resources. Fix is to attach the Executable
to only the 'copy to cmake build dir' phase. Even after the mailinglist
discussion I'm unsure of the need for this?
XCode basically claims it is a recursive dependency as the executable file
is added as a depenency on the Copy Files phase.

2) POST_BUILD targets stopped working. Re-added the code that uses those
(Before the copy-files target, maybe it should be after? I Really don't
understand the copy to cmake build dir phase.

Attached the original Patch from Nick modified to work with lastest git
master + two fixes mentioned above.

/Johan


On Sun, Feb 20, 2011 at 2:43 PM, Johan Björk p...@spotify.com wrote:

 Hi Nick,

 Any updates on this patch?

 Cheers
 /Johan


 On Thu, Jan 20, 2011 at 2:08 AM, Nick Kledzik kled...@apple.com wrote:

 
  BTW, it might make more sense to move this to the cmake-developers
 mailing list.
 
 I've transfered this thread to the developer list.  See below for
 continuation..


 On Jan 18, 2011, at 12:42 PM, Bill Hoffman wrote:

  On 1/18/2011 2:40 PM, Brad King wrote:
  On 1/18/2011 2:12 PM, Nick Kledzik wrote:
  When I use cmake to create a Makefile, the resulting main executable
  is placed in the build directory tree next to the Makefile.
 
  This is where CMake puts files in single-configuration generators.
 
  When I use cmake to create a xcode project, the resulting main
  executable is placed  in a subdirectory named Debug of the build
  directory tree.
 
  This is where CMake puts files in multi-configuration generators.
 
  Both of the above are expected default behaviors.  Both can be
  changed by CMake properties like RUNTIME_OUTPUT_DIRECTORY and
  its per-configuration equivalent.  All CMake generators must
  honor these.
 
  None of these locations are the native location
  where Xcode would put a build result.
 
  Xcode has settings like CONFIGURATION_BUILD_DIR to control
  where the build outputs go.  This already works.  Is there
  some reason your changes cannot use these?
 
  My understanding is that the main problem with the current generator
  is all the extra build phases and OTHER_LDFLAGS stuff used to deal
  with link line ordering and static libraries.  This is what Bill
  summarized:
 
  On 1/13/2011 3:41 PM, Bill Hoffman wrote:
  - have a static library show up more than once on a link line
  - be able to specify the order of static libraries on the link line
  - be able to relink and executable when a static library that it
  depends on is rebuilt.
 
  I'm more interested in a solution to implementation issues like these
  than in interface details like where output files go.
 
  -Brad
 
  So, for Xcode and VS IDE, CMake will place things in directories like
 Debug, Release.
 
  For example, you should get something like this:
 
  ${RUNTIME_OUTPUT_DIRECTORY}/Debug/myexe
 
  Xcode does support building multiple configurations like Debug, Release,
 etc.  Where is the native location for those files?
 As I said, it is per-user xcode settings.  You cannot infer the location
 from source tree cmake has access to.

 At build time, the location is known within xcode.  So, I added a
 copy-file phase to have xocde copy the resulting binary from the native
 location to the standard location the cmake expects.  There is little
 overhead for this.

 I've now have a patch which:
 1) preserves link order
 2) builds libraries into the xcode native location
 4) removes pre and post shell script phases previously used to fix
 dependency problems
 3) xcode projects now have proper dependencies

 WIth this cmake patch, I can build CMake.xcodeproject, open it in xcode,
 build-all, set the current target to be cmake, make a source change, hit
 build, and have xcode just compile that one file, re-archive the library,
 then re-link cmake tool.  I also debugged all this in Xcode by setting
 arguments for the cmake tool and hitting the build-and-debug within xcode!

 Attached is the patch from cmake-2.8.3 sources:



 This cmake also creates an xcode project that builds LLVM.  It is still
 not quite optimal because there are a bunch of cases where custom rules
 cause a custom make file to be generated which is executed from within xcode
 via a shell script phase.  Xcode does not now which files the script might
 modify, so xcode has to be conservative and re-check all timestamps.  There
 are ways to add custom scripts with specified input and output files in
 xcode.  I may get to fixing that someday...


 How does one run the test suite?  I saw the instructions about building
 cmake for make, then executing make Experimental.  I did that and all 184
 or 184 tests passed.  But it looks like this is running the cmake generated
 makefiles - not cmake generated xcode projects.

 -Nick









 ___
 cmake-developers mailing list
 cmake-developers@cmake.org
 http://public.kitware.com

Re: [cmake-developers] [CMake] xcode project and static library dependencies

2011-03-07 Thread Johan Björk
and wow, the patch I just sent is broken because cmXCodeObject-Print() has
sideffects! :(

Will send a patch that fixes -Print() when I have some extra time.

/Johan

On Mon, Mar 7, 2011 at 1:33 PM, Johan Björk p...@spotify.com wrote:

 Nick,

 We are using a modification on your patch internally.
 Few things
 1) It breaks projects that have resources. Fix is to attach the Executable
 to only the 'copy to cmake build dir' phase. Even after the mailinglist
 discussion I'm unsure of the need for this?
 XCode basically claims it is a recursive dependency as the executable file
 is added as a depenency on the Copy Files phase.

 2) POST_BUILD targets stopped working. Re-added the code that uses those
 (Before the copy-files target, maybe it should be after? I Really don't
 understand the copy to cmake build dir phase.

 Attached the original Patch from Nick modified to work with lastest git
 master + two fixes mentioned above.

 /Johan


 On Sun, Feb 20, 2011 at 2:43 PM, Johan Björk p...@spotify.com wrote:

 Hi Nick,

 Any updates on this patch?

 Cheers
 /Johan


 On Thu, Jan 20, 2011 at 2:08 AM, Nick Kledzik kled...@apple.com wrote:

 
  BTW, it might make more sense to move this to the cmake-developers
 mailing list.
 
 I've transfered this thread to the developer list.  See below for
 continuation..


 On Jan 18, 2011, at 12:42 PM, Bill Hoffman wrote:

  On 1/18/2011 2:40 PM, Brad King wrote:
  On 1/18/2011 2:12 PM, Nick Kledzik wrote:
  When I use cmake to create a Makefile, the resulting main executable
  is placed in the build directory tree next to the Makefile.
 
  This is where CMake puts files in single-configuration generators.
 
  When I use cmake to create a xcode project, the resulting main
  executable is placed  in a subdirectory named Debug of the build
  directory tree.
 
  This is where CMake puts files in multi-configuration generators.
 
  Both of the above are expected default behaviors.  Both can be
  changed by CMake properties like RUNTIME_OUTPUT_DIRECTORY and
  its per-configuration equivalent.  All CMake generators must
  honor these.
 
  None of these locations are the native location
  where Xcode would put a build result.
 
  Xcode has settings like CONFIGURATION_BUILD_DIR to control
  where the build outputs go.  This already works.  Is there
  some reason your changes cannot use these?
 
  My understanding is that the main problem with the current generator
  is all the extra build phases and OTHER_LDFLAGS stuff used to deal
  with link line ordering and static libraries.  This is what Bill
  summarized:
 
  On 1/13/2011 3:41 PM, Bill Hoffman wrote:
  - have a static library show up more than once on a link line
  - be able to specify the order of static libraries on the link line
  - be able to relink and executable when a static library that it
  depends on is rebuilt.
 
  I'm more interested in a solution to implementation issues like these
  than in interface details like where output files go.
 
  -Brad
 
  So, for Xcode and VS IDE, CMake will place things in directories like
 Debug, Release.
 
  For example, you should get something like this:
 
  ${RUNTIME_OUTPUT_DIRECTORY}/Debug/myexe
 
  Xcode does support building multiple configurations like Debug,
 Release, etc.  Where is the native location for those files?
 As I said, it is per-user xcode settings.  You cannot infer the location
 from source tree cmake has access to.

 At build time, the location is known within xcode.  So, I added a
 copy-file phase to have xocde copy the resulting binary from the native
 location to the standard location the cmake expects.  There is little
 overhead for this.

 I've now have a patch which:
 1) preserves link order
 2) builds libraries into the xcode native location
 4) removes pre and post shell script phases previously used to fix
 dependency problems
 3) xcode projects now have proper dependencies

 WIth this cmake patch, I can build CMake.xcodeproject, open it in xcode,
 build-all, set the current target to be cmake, make a source change, hit
 build, and have xcode just compile that one file, re-archive the library,
 then re-link cmake tool.  I also debugged all this in Xcode by setting
 arguments for the cmake tool and hitting the build-and-debug within xcode!

 Attached is the patch from cmake-2.8.3 sources:



 This cmake also creates an xcode project that builds LLVM.  It is still
 not quite optimal because there are a bunch of cases where custom rules
 cause a custom make file to be generated which is executed from within xcode
 via a shell script phase.  Xcode does not now which files the script might
 modify, so xcode has to be conservative and re-check all timestamps.  There
 are ways to add custom scripts with specified input and output files in
 xcode.  I may get to fixing that someday...


 How does one run the test suite?  I saw the instructions about building
 cmake for make, then executing make Experimental.  I did that and all 184
 or 184 tests passed

Re: [cmake-developers] Fwd: [CMake] CTest GIT support does not properly update recursive submodules

2011-02-23 Thread Johan Björk
cool, thanks.

Is there a way to get the version of the Nightly builds, or is it possible
to get the patch version bumped to .5? I'd like to run this on a few of my
buildservers, but I can't find a way to detect if I should disable my
workaround.

/Johan


On Tue, Feb 22, 2011 at 10:15 PM, Brad King brad.k...@kitware.com wrote:

 On 02/22/2011 04:04 PM, Johan Björk wrote:
  Just for future patches, any reason you choose to use RunChild instead
  of RunSingleCommand?
  I'll try it this week.

 Specifically inside of cmCTestGIT we use RunChild because it logs
 everything
 that is done during the update.  Furthermore the RunSingleCommand call you
 wrote didn't work when the path to git has spaces because you didn't
 quote
 it inside the string.

 -Brad

___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Fwd: [CMake] CTest GIT support does not properly update recursive submodules

2011-02-23 Thread Johan Björk
Thanks, updated http://www.vtk.org/Wiki/CMake_Useful_Variables to list it.
/Johan


On Wed, Feb 23, 2011 at 5:17 PM, Brad King brad.k...@kitware.com wrote:

 On 02/23/2011 10:22 AM, Johan Björk wrote:
  Is there a way to get the version of the Nightly builds, or is it
  possible to get the patch version bumped to .5? I'd like to run this on
  a few of my buildservers, but I can't find a way to detect if I should
  disable my workaround.

 The version scheme is

  major.minor.patch.date

 for development after version major.minor.patch as of date.
 Therefore you can compare the CMake version against

  2.8.4.20110223

 using component-wise version comparison (e.g. if(VERSION_LESS)).

 -Brad

___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[CMake] Intended use of CMAKE_lang_STANDARD_LIBRARIES

2011-02-23 Thread Johan Björk
Hi everyone,

What is the intended use for CMAKE_lang_STANDARD_LIBRARIES? Is there any
reason why it differs in behavior from TARGET_LINK_LIBRARIES() ?

I am currently using it in my toolchain files to specify platform required
libraries and been seeing a few issues, leading me to believe that I might
be using it for something it wasn't intended to do:

1) It doesn't work for the xcode generator
2) it just passes options directly to the linking line, instead of doing the
nice processing that is done with TARGET_LINK_LIBRARIES() (mostly that I
can't pass a full path to a framework, it instead requires me to manually
specify -framework name of framework and be sure that the framework paths
are properly set up)
3) I can't pass it a list, it must be a string without newlines.

Thanks
/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [cmake-developers] [CMake] xcode project and static library dependencies

2011-02-20 Thread Johan Björk
Hi Nick,

Any updates on this patch?

Cheers
/Johan


On Thu, Jan 20, 2011 at 2:08 AM, Nick Kledzik kled...@apple.com wrote:

 
  BTW, it might make more sense to move this to the cmake-developers
 mailing list.
 
 I've transfered this thread to the developer list.  See below for
 continuation..


 On Jan 18, 2011, at 12:42 PM, Bill Hoffman wrote:

  On 1/18/2011 2:40 PM, Brad King wrote:
  On 1/18/2011 2:12 PM, Nick Kledzik wrote:
  When I use cmake to create a Makefile, the resulting main executable
  is placed in the build directory tree next to the Makefile.
 
  This is where CMake puts files in single-configuration generators.
 
  When I use cmake to create a xcode project, the resulting main
  executable is placed  in a subdirectory named Debug of the build
  directory tree.
 
  This is where CMake puts files in multi-configuration generators.
 
  Both of the above are expected default behaviors.  Both can be
  changed by CMake properties like RUNTIME_OUTPUT_DIRECTORY and
  its per-configuration equivalent.  All CMake generators must
  honor these.
 
  None of these locations are the native location
  where Xcode would put a build result.
 
  Xcode has settings like CONFIGURATION_BUILD_DIR to control
  where the build outputs go.  This already works.  Is there
  some reason your changes cannot use these?
 
  My understanding is that the main problem with the current generator
  is all the extra build phases and OTHER_LDFLAGS stuff used to deal
  with link line ordering and static libraries.  This is what Bill
  summarized:
 
  On 1/13/2011 3:41 PM, Bill Hoffman wrote:
  - have a static library show up more than once on a link line
  - be able to specify the order of static libraries on the link line
  - be able to relink and executable when a static library that it
  depends on is rebuilt.
 
  I'm more interested in a solution to implementation issues like these
  than in interface details like where output files go.
 
  -Brad
 
  So, for Xcode and VS IDE, CMake will place things in directories like
 Debug, Release.
 
  For example, you should get something like this:
 
  ${RUNTIME_OUTPUT_DIRECTORY}/Debug/myexe
 
  Xcode does support building multiple configurations like Debug, Release,
 etc.  Where is the native location for those files?
 As I said, it is per-user xcode settings.  You cannot infer the location
 from source tree cmake has access to.

 At build time, the location is known within xcode.  So, I added a copy-file
 phase to have xocde copy the resulting binary from the native location to
 the standard location the cmake expects.  There is little overhead for this.

 I've now have a patch which:
 1) preserves link order
 2) builds libraries into the xcode native location
 4) removes pre and post shell script phases previously used to fix
 dependency problems
 3) xcode projects now have proper dependencies

 WIth this cmake patch, I can build CMake.xcodeproject, open it in xcode,
 build-all, set the current target to be cmake, make a source change, hit
 build, and have xcode just compile that one file, re-archive the library,
 then re-link cmake tool.  I also debugged all this in Xcode by setting
 arguments for the cmake tool and hitting the build-and-debug within xcode!

 Attached is the patch from cmake-2.8.3 sources:



 This cmake also creates an xcode project that builds LLVM.  It is still not
 quite optimal because there are a bunch of cases where custom rules cause a
 custom make file to be generated which is executed from within xcode via a
 shell script phase.  Xcode does not now which files the script might modify,
 so xcode has to be conservative and re-check all timestamps.  There are ways
 to add custom scripts with specified input and output files in xcode.  I may
 get to fixing that someday...


 How does one run the test suite?  I saw the instructions about building
 cmake for make, then executing make Experimental.  I did that and all 184
 or 184 tests passed.  But it looks like this is running the cmake generated
 makefiles - not cmake generated xcode projects.

 -Nick








 ___
 cmake-developers mailing list
 cmake-developers@cmake.org
 http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[cmake-developers] Fwd: [CMake] CTest GIT support does not properly update recursive submodules

2011-02-20 Thread Johan Björk
missed the list. attached patch.


-- Forwarded message --
From: Johan Björk p...@spotify.com
Date: Sun, Feb 20, 2011 at 5:28 PM
Subject: Re: [CMake] CTest GIT support does not properly update recursive
submodules
To: Brad King brad.k...@kitware.com


Hi Brad,

Attached a small patch for --recursive support.

/Johan

On Fri, Feb 18, 2011 at 5:18 PM, Brad King brad.k...@kitware.com wrote:

 On 02/18/2011 10:00 AM, Johan Björk wrote:
  On Mon, Feb 7, 2011 at 7:14 PM, Brad King wrote:
  (1) Hard-code --recursive and add a check to error out if the Git
  version is not new enough.
 
  (2) seems both complicated and confusing for end users. I would vote for
  (1) as if someone updates to the latest CMake on their machine, they
  shouldn't have any issues in upgrading the git version in use.

 Basically this says that CTest will support only Git 1.6.5 or higher
 even for projects that have no submodules at all, let alone recursive
 ones, and even though it would work fine were it not for this option.

 Perhaps instead we should detect whether any submodules are present
 (e.g. is the .gitmodules file present at the top) and only enforce
 the version number in that case.  Do you mind working on a patch for
 this please?

 Thanks,
 -Brad



0001-CTest-git-Use-recursive-with-gitsubmodule-support.-B.patch
Description: Binary data
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[CMake] CTestDashboardTargets targets should be captured under PREDEFINED_TARGETS_FOLDER?

2011-02-20 Thread Johan Björk
Hey guys,

I am not quite sure if PREDEFINED_TARGETS_FOLDER is supposed to also contain
targets created by external modules (CTest). What do you guys think? Right
now there seems to be no straightforward way to move the
CTestDashboardTargets folder away from the other toplevel targets.
Should be trivial to have it honor PREDEFINED_TARGETS_FOLDER, if that's the
desired behavior.

Cheers
/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [cmake-developers] [CMake] CTest GIT support does not properly update recursive submodules

2011-02-18 Thread Johan Björk
Hi Brad,

On Mon, Feb 7, 2011 at 7:14 PM, Brad King brad.k...@kitware.com wrote:

 Hi Johan,

 Let's move this over to the developers' list.  I'm cc-ing the users' list
 just for this transition message.  Thanks.

 On 02/05/2011 06:50 PM, Johan Björk wrote:
  The fix is extremely simple, in cmCTestGIT.cxx:266
  char const* git_submodule[] = {git, submodule, update, 0};
  modify to
  char const* git_submodule[] = {git, submodule, update,
  --recursive, 0};

 This would be a nice approach, but the --recursive option was added in
 Git 1.6.5, released 2009-10-10.  Versions older than that were still
 in common use when the submodule update code was added on 2010-05-04:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67277bac

 and may still be.  We have a few options:

 (1) Hard-code --recursive and add a check to error out if the Git
 version is not new enough.

 (2) Test the Git version and pass --recursive only if new enough.
 This could lead to subtle behavior differences between Git versions,
 but perhaps we could print a warning.

 (3) Add an interface to specify options for the invocation of the
 submodule update command.

 Comments?
 -Brad

(2) seems both complicated and confusing for end users. I would vote for (1)
as if someone updates to the latest CMake on their machine, they shouldn't
have any issues in upgrading the git version in use.


/Johan
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] CTest GIT support does not properly update recursive submodules

2011-02-18 Thread Johan Björk
Hi Brad,

On Mon, Feb 7, 2011 at 7:14 PM, Brad King brad.k...@kitware.com wrote:

 Hi Johan,

 Let's move this over to the developers' list.  I'm cc-ing the users' list
 just for this transition message.  Thanks.

 On 02/05/2011 06:50 PM, Johan Björk wrote:
  The fix is extremely simple, in cmCTestGIT.cxx:266
  char const* git_submodule[] = {git, submodule, update, 0};
  modify to
  char const* git_submodule[] = {git, submodule, update,
  --recursive, 0};

 This would be a nice approach, but the --recursive option was added in
 Git 1.6.5, released 2009-10-10.  Versions older than that were still
 in common use when the submodule update code was added on 2010-05-04:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67277bac

 and may still be.  We have a few options:

 (1) Hard-code --recursive and add a check to error out if the Git
 version is not new enough.

 (2) Test the Git version and pass --recursive only if new enough.
 This could lead to subtle behavior differences between Git versions,
 but perhaps we could print a warning.

 (3) Add an interface to specify options for the invocation of the
 submodule update command.

 Comments?
 -Brad

(2) seems both complicated and confusing for end users. I would vote for (1)
as if someone updates to the latest CMake on their machine, they shouldn't
have any issues in upgrading the git version in use.


/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[cmake-developers] XCode recursive folders support

2011-02-15 Thread Johan Björk
Hi everyone,

I created a patch which adds support for multiple folders in Xcode;
http://www.vtk.org/Bug/view.php?id=10039

I wasn't able to find a good place for common string helpers or similar,
in cmSourceGroupCommand.cxx, there is an inline copy of a tokenize()
function which I bluntly copied to cmGlobalXCodeGenerator.cxx in my patch,
but that's really ugly :(.

Where should code like that go? In KWSys?

Cheers
/Johan
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] XCode recursive folders support

2011-02-15 Thread Johan Björk
Thanks  done.

/Johan


On Tue, Feb 15, 2011 at 3:00 PM, Brad King brad.k...@kitware.com wrote:

 On 02/15/2011 08:39 AM, Johan Björk wrote:
  Hi everyone,
 
  I created a patch which adds support for multiple folders in Xcode;
   http://www.vtk.org/Bug/view.php?id=10039
 
  I wasn't able to find a good place for common string helpers or similar,
  in cmSourceGroupCommand.cxx, there is an inline copy of a tokenize()
  function which I bluntly copied to cmGlobalXCodeGenerator.cxx in my
  patch, but that's really ugly :(.
 
  Where should code like that go? In KWSys?

 Please factor it out into cmSystemTools.(h|cxx).

 Thanks,
 -Brad

___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[CMake] Global STATIC_LIBRARY_FLAGS_configuration ?

2011-02-15 Thread Johan Björk
Hi guys,

Any plans to add a CMAKE_STATIC_LIBRARY_FLAGS_configuration ?  It seems
rather weird that I can set 'global' linking flags as well as compilation
flags, but that the static_library step flags are tied to a target. I know
this can all be 'hacked' with overriding the add_library() call, but it's
not very pretty.

Anyone?

Thanks
/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] upload multiple files

2011-02-11 Thread Johan Björk
Use FILE(GLOB) to get a list of files first.
Don't recall if you can specify multiple files with scp, but if not, you can
always use a foreach().

-Johan


On Fri, Feb 11, 2011 at 11:28 AM, Mihai Sandu voyage...@gmail.com wrote:

 I want to upload multiple files and I think to do it with scp.

 function (SSHUpload WORKDIR HOST USERNAME SOURCE DESTINATION)

 find_program( SCP_PATH NAMES scp )

 execute_process(WORKING_DIRECTORY ${WORKDIR}

   COMMAND ${SCP_PATH} ${SOURCE} 
 ${USERNAME}@${HOST}:${DESTINATION}
 )
 endfunction ()

 And I call the function:

 SSHUpload( /home/user/tmp  HOST USERNAME * DESTINATION )

 but I get the error: *: No such file or directory

 There is another way? Or where I'm wrong?

 PS: I tried also with scp -r but it take the folder, and I want only the
 files from folder.

 ___
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] CTest: Getting the PriorRevision with ctest_update?

2011-02-09 Thread Johan Björk
Hi everyone,

Does ctest expose a way to get the old (and new I guess) revision of a
source tree?

/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] CMake Error: Error required internal CMake variable not set

2011-02-05 Thread Johan Björk
Hi,

Make sure you delete the builddirectory if you change the toolchain file, in
the output you sent all the compiler detection/testing results was cached.

/johan
On Feb 4, 2011 10:27 PM, Enrique Izaguirre enrique.izagui...@gmail.com
wrote:
 Thanks Alexander,
 Seems that it doesn't have much information but here it is:

 # cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain-linuxcpp.cmake ..
 System name is:
 Linux
 The Top directory is:
 /home/x0148488/omapflash
 Adding subdirectory comdriver...
 Entering comdriver's CMakeLists
 Now trying to find AdbWinApi.lib library
 Adding subdirectory common...
 Adding subdirectory host...
 -- Configuring done
 CMake Error: Error required internal CMake variable not set, cmake may be
 not be built correctly.
 Missing variable is:
 CMAKE_C_LINK_EXECUTABLE
 -- Generating done
 -- Build files have been written to: /home/x0148488/omapflash/cmake_build

 Thanks

 Enrique



 2011/2/4 Alexander Neundorf a.neundorf-w...@gmx.net

 On Friday 04 February 2011, Enrique Izaguirre wrote:
  Hello again,
 
  I am trying to cross-compile from Windows (actually Cygwin) to Linux.
  My Toolchain file (Toolchain-linuxcpp.cmake) is as follows:
 
  SET(CMAKE_SYSTEM_NAME Linux)
 
  #specify the cross-compiler
  set (CMAKE_C_COMPILER /bin/gcc-linux)
  set (CMAKE_CXX_COMPILER /bin/g++-linux)
 
 
  After doing the cmake build using cmake
  -DCMAKE_TOOLCHAIN_FILE=../Toolchain-linuxcpp.cmake ..
 
  CMake Error: Error required internal CMake variable not set, cmake may
be
  not be built correctly.
  Missing variable is:
  CMAKE_C_LINK_EXECUTABLE
 
 
  I have using both compilers separately and I didn't have any problem,
but
  when I put them together in the Toolchain file is when this problems
 comes
  up.
 
  What value CMAKE_C_LINK_EXECUTABLE variable should be set? And where?

 This should be set via CMakeCInformation.cmake, which loads the platform-
 and
 compiler specific files, e.g. Modules/Compiler/GNU-C.cmake.
 Can you please post the output of the cmake run ?

 Alex

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] New warnings in CMake 2.8.4-rc2

2011-02-05 Thread Johan Björk
Hi Guys,

I ran into a very similar issue, It seems that CMAKE_TOOLCHAIN_FILE does not
trigger the whatever mark as used code in question, so even if it actually
*does* use the variable, you still get a warning.

Example output:
Johan-Bjorks-MacBook-Pro-2:build-morpher phb$ cmake -G Xcode
-DCMAKE_TOOLCHAIN_FILE=~/DEV/client/cmake/morpher-toolchain.cmake ../
..
-- Configuring done
-- Generating done
CMake Warning: The variable, 'CMAKE_TOOLCHAIN_FILE', specified manually, was
not used during the generation.
-- Build files have been written to: /Users/phb/DEV/client/build-morpher

/Johan

On Wed, Feb 2, 2011 at 7:29 PM, Alexander Neundorf
a.neundorf-w...@gmx.netwrote:

 On Wednesday 02 February 2011, Eric Noulard wrote:
  2011/2/2 Emmanuel Blot eblot...@gmail.com:
   Currently, there is no way to turn this off.
  
   Very, very bad news ;-(
   IMHO, this is a recurrent issue with CMake. It seems there is no way
   to guarantee that a project that builds well with a version of CMake
   will build the same way with the next minor iteration (used to be
   called patch release).
 
  I think recurrent is a relatively tough statement, I'm using
  CMake for 7+ years now and never get caught by such an issue.
 
  I think that, CMake developpers are indeed very concerned with
  backward compatibilty.

 Yes. It is one of _the_ main concerns.
 If any change is made which is obvously backward incompatible (except for
 internal stuff), it is rejected.
 If there is a change with slight chances of breaking something somewhere in
 some cases, it is at least discussed at length, with the outcome, that
 either
 it is internal stuff, so people shouldn't rely on, or a policy is added, or
 it is rejected.
 It may happen that a change which breaks something is overlooked, but if
 you
 report it during the rc phase, this most probably will get fixed.
 (not sure this applies to the new warnings, since they are only warnings
 after
 all)

 I'm caring for KDE since, damn, almost 5 years now, and it's not bad.
 There are very few breakages, or IOW, current KDE requires cmake 2.6.4, and
 I'm not aware of any problems with newer versions of CMake.

 Alex
 ___
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] CTest GIT support does not properly update recursive submodules

2011-02-05 Thread Johan Björk
Hi everyone,

It seems the submodule support in CTest does not iterate into submodules.
I'm not sure if the reason is an overlook, or that some older versions of
git maybe didn't support the --recursive command. Is the proper way to add a
CTEST_GIT_SUBMODULE_UPDATE_COMMAND, or is the following fix good enough?

The fix is extremely simple, in cmCTestGIT.cxx:266
char const* git_submodule[] = {git, submodule, update, 0};
modify to
char const* git_submodule[] = {git, submodule, update, --recursive,
0};

/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[cmake-developers] Bug in FILE(STRINGS)?

2011-02-04 Thread Johan Björk
Hi everyone,

It seems the FILE(STRINGS) function does not properly return a list when
there is only one item.

Example cmake file:
FILE(WRITE test hello)
FILE(STRINGS test FOO)
message(${FOO})
LIST(GET test 0 TEST)
message(${TEST})

Returns:
:~ phb$ cmake -P test.cmake
hello
NOTFOUND

This is with cmake 2.8.4-rc2 as well as 2.8.3.
Is there a better way to write the above code? (Ie, get the first element,
no matter if it's a list or not?)

Thanks
/Johan
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] CMake 2.8.4-rc2 ready for testing!

2011-02-01 Thread Johan Björk
Hey David,

What is the intended behavior when upgrading CMake on a OSX Machine?
It seems that currently, generated projects will keep a reference to
the resolved symlink, ie
/Applications/CMake\ VERSION/Contents/bin/..., causing confusing errors such as

Johan-Bjorks-MacBook-Pro-2:build-Debug-normal phb$ cmake --build .
No such file or directory
CMake Error: Generator: execution of make failed. Make command was:
/Applications/CMake\
2.8-3.app/Contents/bin/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild
-project spcore.xcodeproj build -target ALL_BUILD -configuration Debug

It seems only some of the variables in CMakeCache is updated to
reflect the new cmake path
CMAKE_COMMAND:INTERNAL=/Applications/CMake 2.8-4.app/Contents/bin/cmake
CMAKE_CPACK_COMMAND:INTERNAL=/Applications/CMake 2.8-4.app/Contents/bin/cpack
CMAKE_CTEST_COMMAND:INTERNAL=/Applications/CMake 2.8-4.app/Contents/bin/ctest
CMAKE_ROOT:INTERNAL=/Applications/CMake 2.8-4.app/Contents/share/cmake-2.8
others are not
CMAKE_MAKE_PROGRAM:FILEPATH=/Applications/CMake
2.8-3.app/Contents/bin/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild
MAKECOMMAND:STRING=/Applications/CMake\
2.8-3.app/Contents/bin/cmakexbuild -project spcore.xcodeproj build
-target ALL_BUILD -configuration ${CTEST_CONFIGURATION_TYPE}
CMAKE_BUILD_TOOL:INTERNAL=/Applications/CMake
2.8-3.app/Contents/bin/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild
CMAKE_EDIT_COMMAND:INTERNAL=/Applications/CMake 2.8-3.app/Contents/bin/ccmake

(No clue how it added all those copies of cmakexbuild, I ran my
dashboard a few times before realizing what was wrong)

/Johan


/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] cmake, git and submodules

2011-02-01 Thread Johan Björk
Hey everyone,

This will be a really, really vague question.

I'm using ctest scripts to run automated dashboards on all my
platforms. My git repository contains quite a few submodules, which I
believe is related.

At some point, ranging from almost instantly to after a few days,
files starts getting removed from the checked out dashboard copy.
Looking at the dashboard history it runs fine until something triggers
the error, and then it starts removing a few files every build
(?).

I am pretty certain it is not my buildsystem that starts removing
files, and my current guess is that there is some weird interaction
between submodules and git+ctest.

This is a really longshot, but has anyone seen anything even remotely similar?

The relevant git variables are the following in my ctest file:
  if(NOT EXISTS ${CTEST_SOURCE_DIRECTORY})
set(CTEST_CHECKOUT_COMMAND \${CTEST_GIT_COMMAND}\ clone
g...@git.spotify.net:${REPOSITORY} \${CTEST_SOURCE_DIRECTORY}\
--branch ${BRANCH} --recursive)
  else()
unset(CTEST_CHECKOUT_COMMAND)
  endif()
  set(CTEST_UPDATE_COMMAND ${CTEST_GIT_COMMAND})

Thanks in advance
/Johan (who is extremely confused)
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] [ctest]: Running git clean before building?

2011-02-01 Thread Johan Björk
Hi everyone,

Unfortunately our buildsystem is not yet entirely clean, and produces
a few files in the source directory. I would like to be able to run
git clean before building, anyone have any ideas how to do this?
(Without losing cdash update history)
To be more precise, the commands I would like to run are the following

git clean -dfx
git submodule foreach clean -dfx

Thanks in advance
/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Ability to get cdash submission URL in ctest script?

2011-02-01 Thread Johan Björk
Hi everyone,

Is it possible to get (or calculate) the CDash url for a certain
submission in a ctest script?

/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] Saving user settings with xcode generator

2011-01-30 Thread Johan Björk
Attached patch and comments to bug
http://public.kitware.com/Bug/view.php?id=11690

Is there some extra access rights needed to monitor an issue in the
Mantis bugtracker? I can't seem to find any button to do it :(

-Johan

On Mon, Dec 27, 2010 at 4:44 PM, Bill Hoffman bill.hoff...@kitware.com wrote:
 On 12/26/2010 5:45 PM, Johan Björk wrote:

 Hello all,

 (See below for context)

 To solve the issue, I wish to reuse the object ID for certain
 properties[1], allowing the foo.pbxuser file to stay valid across CMake
 invocations. I modified the cmXCodeObject::GetId() function to generate
 the ID of the object, using either the name property or the comment
 property, depending on which one is available. For all other object
 types (not listed in [1]), I generate an unique object ID in the same
 way as before.

 The patch is not really finished, just a quick proof of concept (but
 very trivial :) ). Anyone at @Kitware think this sounds interesting
 enough to get into a release? Let me know and I'll polish up the patch
 and file a bug if deemed necessary.


 I would think a better approach would be to keep the guid's the same all the
 time.  I think this is done with the VS projects.  If you store them in the
 cache they will be preserved between runs of CMake.


 Merry xmas (And again, thanks for a great product!)
 /Johan
 [1]
 PBXProject, PBXNativeTarget, PBXApplicationReference,
 PBXExecutableFileReference,PBXLibraryReference,PBXToolTarget,PBXLibraryTarget,
 PBXAggregateTarget,

 On Fri, Dec 17, 2010 at 9:17 AM, Johan Björk p...@spotify.com
 mailto:p...@spotify.com wrote:

    Hi everyone,

    I haven't been able to find much information on this topic, so any
    suggestions would be greatly appreciated. When CMake regenerates the
    XCode project files, it correctly saves the user settings
    (foo.pbxuser) (contains things like executable arguments,
    environment variables and the such), however, since the GUIDs in the
    main project file changes, the pbxuser file be cleaned by XCode as
    soon as you reopen the project.

    First off, anyone know of any way to be able to keep the user
    settings? If not, anyone knows if this has been brought up before
    and if someone has attempted to fix it?

    This is with XCode 3.2.5 and CMake 2.8.3

    Thanks for any insight
    /Johan




 ___
 cmake-developers mailing list
 cmake-developers@cmake.org
 http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


 --
 Bill Hoffman
 Kitware, Inc.
 28 Corporate Drive
 Clifton Park, NY 12065
 bill.hoff...@kitware.com
 http://www.kitware.com
 518 881-4905 (Direct)
 518 371-3971 x105
 Fax (518) 371-4573
 ___
 cmake-developers mailing list
 cmake-developers@cmake.org
 http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] XCode compiler selection

2011-01-28 Thread Johan Björk
Hi Andrew,

I do this from a toolchain file (ie, cmake
-DCMAKE_TOOLCHAIN_FILE=mytoolchainfile.cmake)

SET(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION my.compiler.here.llvmgcc42 CACHE
STRING  FORCE)

and it works OK.

/Johan

On Fri, Jan 28, 2011 at 2:39 PM, Andrew Corrigan
acorr...@lcp.nrl.navy.mil wrote:
 I use the latest released version of CMake  When I set the compiler with 
 CMake for the XCode generator my choice of compiler is completely ignored, 
 and I have to manually select the compiler within XCode.  In particular, I 
 want to be able to select the Intel compilers, as opposed to Gcc-4.2.  There 
 is a discussion on this list [1] from last June which discusses the same 
 problem, without any resolution . without any resolution. It seems to me that 
 this is a bug.    Are there any workarounds to this issue which are better 
 than having to set the compiler manually every time I regenerate my XCode 
 project?

 Thanks,
 Andrew Corrigan

 [1] http://www.cmake.org/pipermail/cmake/2010-June/037353.html
 ___
 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/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake 2.8.4-rc1 ready for testing!

2011-01-27 Thread Johan Björk
Not sure if this is a known bug, but installing the symlinks on OSX
fails if they already exist. (..and there is no retry button :( )


/Johan

On Thu, Jan 13, 2011 at 3:15 PM, David Cole david.c...@kitware.com wrote:
 I am happy to announce that CMake 2.8.4 has entered the release
 candidate stage! You can find the source and binaries here:
 http://www.cmake.org/files/v2.8/?C=M;O=D

 Following is the list of changes in this release. Please try this version
 of CMake on your projects and report any issues to the list or the
 bug tracker.

 Happy building!

 -Dave


 Changes in CMake 2.8.4-rc1 (since 2.8.3)
 
 Alex Neundorf (32):
   Add support for nasm assembler, patch by Peter Collingbourne (see 
 #10069)
   Improve misleading comments.
   Add missing copyright headers
   We already have 2010, fix copyright year.
   Make FindBISON work properly with non-C locales (#11326)
   Add support for yasm, a nasm compatible assembler
   Use CMAKE_ASM_NASM_FLAGS for nasm instead of FLAGS
   Remove trailing whitespace and minor formatting changes for the dot-code
   Move the code for collecting targets and libraries into separate 
 functions
   Properly insert all targets, also those which don't link to anything.
   Generate separate dot files for each target, and a big one with
 everything.
   Move the code for generating dot-files into separate class
 cmGraphVizWriter
   Fix #11421: FindQt3.cmake doesn't honor the REQUIRED keyword
   Remove trailing whitespace
   Don't enforce VERBOSE makefiles for the CodeBlocks generator
   Remove the early alpha stage comments about Eclipse and C::B
   Don't disable colors in the CodeBlocks generator and minor cleanup.
   Some more fixes for nasm support, from Etienne (#10069)
   Enable/disable generating graphs depending on the target type
   Use std::cout instead of fprintf
   Collect targets and libs on demand instead of in the ctor
   Exclude targets from the graphviz file based on a regex
   Include CMakeDetermineCompilerId in
 CMakeDetermineASMCompiler.cmake (#11467)
   Fix typos in the doc
   Add cache var CMAKE_ECLIPSE_MAKE_ARGUMENTS when using the
 Eclipse generator
   Add ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT as a ADVANCED cache
 variable (#9631)
   Fix crash in Eclipse generator with empty project (#11616)
   Fix indentation in cmPolicies::ApplyPolicyVersion()
   Remove trailing whitespace
   Prefer files from CMAKE_ROOT when including from CMAKE_ROOT
   Improve documentation and messages for the new CMP0017
   Remove usage of CMAKE_CURRENT_LIST_DIR now that we have CMP0017

 Alexey Ozeritsky (5):
   FindBLAS works in C/C++ projects without Fortran
   ACML find fixes (issue 0011219)
   find ACML fixes
   fix for Fortran-only projects
   FindLAPACK works with C/C++ only projects (issue 0009976)

 Andrius Štikonas (1):
   Modules: Fix spelling 'becase' - 'because'.

 Ben Boeckel (25):
   Fix parsing of cache variables without a type
   Use cmCacheManager to load entries from the cache
   Support manual cache entries
   Condense parsing of cache entries
   Use FPHSA in FindOpenGL
   Ignore strerror_r since CMake isn't threaded
   Use _POLL_EMUL_H_ instead of HAVE_POLL_FINE
   Rename WorkingDirectory test
   Add WORKING_DIRECTORY argument to add_test
   Add tests for WORKING_DIRECTORY arg to add_test
   Rename the project to match the test
   Fix header includes for C++ and Visual Studio
   Add ctype.h include for toupper()
   Flip slashes around on Windows
   Use  markers to denote the path
   Simplify the _default_cwd derivation
   Only test the default cwd with Makefiles
   Group adding tests with its properties
   Fully specify the path to old-signature add_test
   Use iostream to make Borland happy
   Check for poll when looking for _POLL_EMUL_H_
   Toss out strerror_r macros
   Fix missed _POLL_EMUL_H_ and HAVE_POLL combo
   Make TestsWorkingDirectory test a C file
   Pass the expected value as the first argument

 Bill Hoffman (17):
   Fixes for the OSF operating system build.
   Add a fix for the inline keyword on the osf os.
   Add a Contract test for VTK.  The test downloads and builds VTK.
   Fix contract test so it is not hard coded to the vtk542 test.
   Fix incremental linking for VS2010 with nmake or make.
   Change cpack run and verify script to work with multi-config generators.
   Fix vs2010 project generation error when HEADER_FILE_ONLY is set.
   Add more documentation for LANGUAGE property.
   Add flags to resource builds on vs 2010 with a test.
   Disable incremental testing for this test, it crashes vs9 linker.
   Only run resource test for MSVC compilers.
   Add support for windows resources with mingw/msys.
   

[cmake-developers] NMake and trailing directory separators in custom commands?

2011-01-25 Thread Johan Björk
Hi everyone,

I just started using the NMake generator, and ran into an issue that
is probably trivial to fix for someone who knows the generator code.
If one of the steps for the makefile contains a trailing directory
separator, it will escape the newline and result in an invalid
command.

ie (Untested, just wrote something up that should reproduce)

ADD_CUSTOM_COMMAND(OUTPUT foo COMMAND cmake -E copy file
${CMAKE_CURRENT_LIST_DIR}/a.c ${CMAKE_BINARY_DIR}/foo/bar/). CMake
will correctly escape all the unix newlines to '\', but also the last
one, which results in NMake treating the next line as part of the
command.

Not very familiar with either Windows nor NMake, so I don't know what
the correct fix is.. Add an extra space if the last character is a \ ?

/Johan

BTW: It also happens for WORKING_DIRECTORY.
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] CDash submissions show up as two entries, one row for update, one for build/test etc

2011-01-24 Thread Johan Björk
Hi David,

I found the issue. I happened to put a trailing newline in CTEST_SITE,
causing some error further down the line. I guess CDash could deal
with it a bit better, but all in all it's a user error. (I utilized
the hostname command to get the hostname, but forgot to use
OUTPUT_STRIP_TRAILING_WHITESPACE)

Thanks a ton for the help
/Johan


On Thu, Jan 13, 2011 at 4:01 PM, Johan Björk p...@spotify.com wrote:
 Attached them with some modifications.
 I have one ctest_platform.cmake for each platform, that all include
 ctest_base.cmake that contains a macro that allow me to run all different
 configurations of my builds.
 While I have your attention, would it somehow be possible to re-use a single
 sourcetree for several builds and still get the (same) update logs for all
 builds?
 /Johan


 On Thu, Jan 13, 2011 at 3:53 PM, David Cole david.c...@kitware.com wrote:

 Can you pass along your whole script, and describe how the looping
 works rather than just the snippet you sent...? (Or is that not
 possible for some reason?)

 We don't typically run more than one dashboard per script, so you may
 discovered a real problem with trying to run more than one dashboard
 from a single script...

 Does this happen only on 2nd and later dashboards in your loop, or
 does even the very 1st one demonstrate this problem?


 On Thu, Jan 13, 2011 at 9:47 AM, Johan Björk p...@spotify.com wrote:
  Hi David,
  Not using subprojects.
  CMake/CTest version 2.8.3 and CDash 1.8.2 (upgraded from the previous
  release however)
  /Johan
 
 
  On Thu, Jan 13, 2011 at 3:27 PM, David Cole david.c...@kitware.com
  wrote:
 
  Are subprojects involved? (i.e. -- do you use them and do you have
  them set up for this dashboard)
 
  What versions of CDash and CMake/CTest are you using?
 
 
  On Thu, Jan 13, 2011 at 4:07 AM, Johan Björk p...@spotify.com wrote:
   Hi everyone,
   I'm having a strange problem with my CDash submissions, and I'm not
   sure
   what is going on. For every submission I do, I get two builds, one
   that
   only
   has a UPDATE stage, and one line that has the rest of the steps.
   The row with UPDATE has a higher buildID versus the row with
   configure/build/test.
   In my CTest script, I run several builds in a loop. For every build I
   do
   //Setup CTEST_SOURCE_DIRECTORY and CTEST_BINARY_DIRECTORY
     ctest_start(${CTEST_MODEL})
     ctest_update()
     ctest_configure()
     ctest_build()
     ctest_test()
     if (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
       ctest_coverage()
     endif (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
     if (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
       ctest_memcheck()
     endif (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
     ctest_submit()
  
   I also tried adding the APPEND keyword to the ctest_* commands, but
   no
   luck.
   Has anyone seen this before? Does anyone have any suggestions how to
   debug
   this?
   Thanks
   /Johan
  
   ___
   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/Wiki/CMake_FAQ
  
   Follow this link to subscribe/unsubscribe:
   http://www.cmake.org/mailman/listinfo/cmake
  
 
 


___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] CDash submissions show up as two entries, one row for update, one for build/test etc

2011-01-13 Thread Johan Björk
Hi everyone,

I'm having a strange problem with my CDash submissions, and I'm not sure
what is going on. For every submission I do, I get two builds, one that only
has a UPDATE stage, and one line that has the rest of the steps.
The row with UPDATE has a higher buildID versus the row with
configure/build/test.
In my CTest script, I run several builds in a loop. For every build I do

//Setup CTEST_SOURCE_DIRECTORY and CTEST_BINARY_DIRECTORY
  ctest_start(${CTEST_MODEL})
  ctest_update()
  ctest_configure()
  ctest_build()
  ctest_test()
  if (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
ctest_coverage()
  endif (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
  if (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
ctest_memcheck()
  endif (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
  ctest_submit()


I also tried adding the APPEND keyword to the ctest_* commands, but no luck.
Has anyone seen this before? Does anyone have any suggestions how to debug
this?

Thanks
/Johan
attachment: Screen shot 2011-01-13 at 10.01.01 AM.png___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] CDash submissions show up as two entries, one row for update, one for build/test etc

2011-01-13 Thread Johan Björk
Hi David,

Not using subprojects.
CMake/CTest version 2.8.3 and CDash 1.8.2 (upgraded from the previous
release however)

/Johan



On Thu, Jan 13, 2011 at 3:27 PM, David Cole david.c...@kitware.com wrote:

 Are subprojects involved? (i.e. -- do you use them and do you have
 them set up for this dashboard)

 What versions of CDash and CMake/CTest are you using?


 On Thu, Jan 13, 2011 at 4:07 AM, Johan Björk p...@spotify.com wrote:
  Hi everyone,
  I'm having a strange problem with my CDash submissions, and I'm not sure
  what is going on. For every submission I do, I get two builds, one that
 only
  has a UPDATE stage, and one line that has the rest of the steps.
  The row with UPDATE has a higher buildID versus the row with
  configure/build/test.
  In my CTest script, I run several builds in a loop. For every build I do
  //Setup CTEST_SOURCE_DIRECTORY and CTEST_BINARY_DIRECTORY
ctest_start(${CTEST_MODEL})
ctest_update()
ctest_configure()
ctest_build()
ctest_test()
if (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
  ctest_coverage()
endif (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
if (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
  ctest_memcheck()
endif (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
ctest_submit()
 
  I also tried adding the APPEND keyword to the ctest_* commands, but no
 luck.
  Has anyone seen this before? Does anyone have any suggestions how to
 debug
  this?
  Thanks
  /Johan
 
  ___
  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/Wiki/CMake_FAQ
 
  Follow this link to subscribe/unsubscribe:
  http://www.cmake.org/mailman/listinfo/cmake
 

___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] CDash submissions show up as two entries, one row for update, one for build/test etc

2011-01-13 Thread Johan Björk
Attached them with some modifications.

I have one ctest_platform.cmake for each platform, that all include
ctest_base.cmake that contains a macro that allow me to run all different
configurations of my builds.

While I have your attention, would it somehow be possible to re-use a single
sourcetree for several builds and still get the (same) update logs for all
builds?

/Johan



On Thu, Jan 13, 2011 at 3:53 PM, David Cole david.c...@kitware.com wrote:

 Can you pass along your whole script, and describe how the looping
 works rather than just the snippet you sent...? (Or is that not
 possible for some reason?)

 We don't typically run more than one dashboard per script, so you may
 discovered a real problem with trying to run more than one dashboard
 from a single script...

 Does this happen only on 2nd and later dashboards in your loop, or
 does even the very 1st one demonstrate this problem?


 On Thu, Jan 13, 2011 at 9:47 AM, Johan Björk p...@spotify.com wrote:
  Hi David,
  Not using subprojects.
  CMake/CTest version 2.8.3 and CDash 1.8.2 (upgraded from the previous
  release however)
  /Johan
 
 
  On Thu, Jan 13, 2011 at 3:27 PM, David Cole david.c...@kitware.com
 wrote:
 
  Are subprojects involved? (i.e. -- do you use them and do you have
  them set up for this dashboard)
 
  What versions of CDash and CMake/CTest are you using?
 
 
  On Thu, Jan 13, 2011 at 4:07 AM, Johan Björk p...@spotify.com wrote:
   Hi everyone,
   I'm having a strange problem with my CDash submissions, and I'm not
 sure
   what is going on. For every submission I do, I get two builds, one
 that
   only
   has a UPDATE stage, and one line that has the rest of the steps.
   The row with UPDATE has a higher buildID versus the row with
   configure/build/test.
   In my CTest script, I run several builds in a loop. For every build I
 do
   //Setup CTEST_SOURCE_DIRECTORY and CTEST_BINARY_DIRECTORY
 ctest_start(${CTEST_MODEL})
 ctest_update()
 ctest_configure()
 ctest_build()
 ctest_test()
 if (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
   ctest_coverage()
 endif (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
 if (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
   ctest_memcheck()
 endif (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
 ctest_submit()
  
   I also tried adding the APPEND keyword to the ctest_* commands, but no
   luck.
   Has anyone seen this before? Does anyone have any suggestions how to
   debug
   this?
   Thanks
   /Johan
  
   ___
   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/Wiki/CMake_FAQ
  
   Follow this link to subscribe/unsubscribe:
   http://www.cmake.org/mailman/listinfo/cmake
  
 
 



ctest_base.cmake
Description: Binary data


ctest_linux.cmake
Description: Binary data
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[cmake-developers] XCodeGenerator bug; ReRunCMake.make only includes toplevel dependencies

2011-01-12 Thread Johan Björk
Hi everyone,


The XCode generator does not properly add recursive dependencies, resulting
in that the project files won't be re-generated correctly.
The problem should be easily reproduced in any project that has at least one
add_subdirectory() command, just study the
build/CMakeScripts/ReRunCMake.make file.


Attached patch seems to fix the issue, but I haven't spend enough time to
understand the source code fully.
Is this an acceptable workflow for small fixes like this, or is
the preferred way pull requests at github? What branch should I use, next or
master?

The patch is based of the current master.

/Johan


xcode_generator_dependency.patch
Description: Binary data
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[cmake-developers] .SUFFIXES: not used in Xcode CreateCustomRulesMakefile

2011-01-11 Thread Johan Björk
Hi everyone,

The Makefile generation code in cmGlobalXCodeGenerator.cxx
(cmGlobalXCodeGenerator::CreateCustomRulesMakefile) does not add a
.SUFFIXES: call, resulting in make having implicit rules in place.

The fix should be trivial, simply adding
makefileStream  .SUFFIXES:   \n; after the first two lines will
disable the implicit rules.

The issue is easy to reproduce, just create a custom rule that has an output
foo.source.cpp depending in foo.source.
In the case of foo.source.cpp already existing, and with a newer timestamp
then foo.source, the implicit rule with take precedence and attempt to build
foo.source by compiling foo.source.cpp

This is really only an issue if you generate the files in the source tree,
which we stopped doing, but the fix is trivial and it's already done for the
standard unix makefile generator.

Thanks
/Johan
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Saving user settings with xcode generator

2010-12-26 Thread Johan Björk
Hello all,

(See below for context)

To solve the issue, I wish to reuse the object ID for certain properties[1],
allowing the foo.pbxuser file to stay valid across CMake invocations.
I modified the cmXCodeObject::GetId() function to generate the ID of the
object, using either the name property or the comment property, depending on
which one is available. For all other object types (not listed in [1]), I
generate an unique object ID in the same way as before.

The patch is not really finished, just a quick proof of concept (but very
trivial :) ). Anyone at @Kitware think this sounds interesting enough to get
into a release? Let me know and I'll polish up the patch and file a bug if
deemed necessary.

Merry xmas (And again, thanks for a great product!)
/Johan
[1]
PBXProject, PBXNativeTarget, PBXApplicationReference,
PBXExecutableFileReference,PBXLibraryReference,PBXToolTarget,PBXLibraryTarget,
PBXAggregateTarget,

On Fri, Dec 17, 2010 at 9:17 AM, Johan Björk p...@spotify.com wrote:

 Hi everyone,

 I haven't been able to find much information on this topic, so any
 suggestions would be greatly appreciated. When CMake regenerates the XCode
 project files, it correctly saves the user settings (foo.pbxuser) (contains
 things like executable arguments, environment variables and the such),
 however, since the GUIDs in the main project file changes, the pbxuser file
 be cleaned by XCode as soon as you reopen the project.

 First off, anyone know of any way to be able to keep the user settings? If
 not, anyone knows if this has been brought up before and if someone has
 attempted to fix it?

 This is with XCode 3.2.5 and CMake 2.8.3

 Thanks for any insight
 /Johan




cmake_2.8.3_xcodeIDs.patch
Description: Binary data
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] Saving user settings with xcode generator

2010-12-26 Thread Johan Björk
Hello all,

(See below for context)

To solve the issue, I wish to reuse the object ID for certain properties[1],
allowing the foo.pbxuser file to stay valid across CMake invocations.
I modified the cmXCodeObject::GetId() function to generate the ID of the
object, using either the name property or the comment property, depending on
which one is available. For all other object types (not listed in [1]), I
generate an unique object ID in the same way as before.

The patch is not really finished, just a quick proof of concept (but very
trivial :) ). Anyone at @Kitware think this sounds interesting enough to get
into a release? Let me know and I'll polish up the patch and file a bug if
deemed necessary.

Merry xmas (And again, thanks for a great product!)
/Johan
[1]
PBXProject, PBXNativeTarget, PBXApplicationReference,
PBXExecutableFileReference,PBXLibraryReference,PBXToolTarget,PBXLibraryTarget,
PBXAggregateTarget,

On Fri, Dec 17, 2010 at 9:17 AM, Johan Björk p...@spotify.com wrote:

 Hi everyone,

 I haven't been able to find much information on this topic, so any
 suggestions would be greatly appreciated. When CMake regenerates the XCode
 project files, it correctly saves the user settings (foo.pbxuser) (contains
 things like executable arguments, environment variables and the such),
 however, since the GUIDs in the main project file changes, the pbxuser file
 be cleaned by XCode as soon as you reopen the project.

 First off, anyone know of any way to be able to keep the user settings? If
 not, anyone knows if this has been brought up before and if someone has
 attempted to fix it?

 This is with XCode 3.2.5 and CMake 2.8.3

 Thanks for any insight
 /Johan




cmake_2.8.3_xcodeIDs.patch
Description: Binary data
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] CPack 101

2010-12-23 Thread Johan Björk
On Thu, Dec 23, 2010 at 1:43 PM, David Cole david.c...@kitware.com wrote:

 On Wed, Dec 22, 2010 at 12:57 PM, KC Jones kc.jo...@skype.net wrote:

 Feeling really uneasy about putting this out there, but here goes...

 I have an app that I am building with cmake (2.8) on both Mac (10.6.40 and
 Linux (Ubuntu 10.04).
 The app depends on some libraries (Qt4.6 (no plugins) and a customized
 build of Poco).
 I want to generate a DragAndDrop DMG installer on Mac. (a la macdeployqt +
 Poco lib packaging)
 On Linux, I want a Debian package to install the Poco libs at a minimum
 along with my executable.
 Equivalent Windows installers will be needed someday.

 I've reviewed the docs at
 http://www.cmake.org/cmake/help/cmake-2-8-docs.html
 I've reviewed bits and pieces on the wiki:
 http://www.cmake.org/Wiki/BundleUtilitiesExample
 http://www.cmake.org/Wiki/CMake#CPack

 And I just don't seem to get it. I know this is very possible.  I know
 this is my own problem, first and foremost.  So I'm exposing myself to
 potential criticism here since RTFM and get a clue are probably the
 biggest part of fixing my problem.  Im not really asking for specific help
 on my code - I might ask for that later.  For now I just want to vent,
 hopefully in a constructive way.

 I just don't think that CPack documentation and examples as they currently
 are published are sufficient or effective.


 Neither do we:
 http://public.kitware.com/Bug/view.php?id=10067


 A few suggestions:

- More CPack example and tutorials would be very helpful.  I see from
archive searches that I'm not the first to suggest this.  The Qt example 
 is
great, but the plugin support is overkill for most, and obfuscates much of
the rest of the example.
- A step-wise tutorial format that starts with a working build, adds
install target support, then adds CPack code would help my addled brain.
 Presenting newbies like me with a fully baked end result is helpful, but
somewhat hard to digest.
- Separating the docs into different namespaces (Cmake, CPack,
CTest...) might be more effective.  I struggled a long while before 
 finding
the install command docs (which I continue to struggle with). The atomic
layout of the docs obscures the module-level relationships.
- A glossary, please.  For instance bundle comes out of OS X, but
now has some CMake-specific meaning for Linux and Win that I know is very
important to me, but fully incomprehensible in my reading so far.  Oh, and
what are bundle keys?
- More meta docs please.  Somewhere in my stumbling I found a decent
diagram about how the ExternalProject module works.  I think it was on the
wiki, but I can't find it now.  I would die for something similar that 
 shows
what install does and how it integrates with CPack.  Same goes for
BudleUtilities and other modules I've yet to discover.


 As always, as developers we find ourselves constantly working to improve
 what we have: fixing bugs, implementing new features, answering questions on
 the mailing list, blogging/communicating about it, adding examples and
 suggestions to the Wiki.

 The struggle is reserving enough time to contribute to documentation when
 there are always real (functional) bugs to be fixed. Perpetual questions:
 what's enough documentation?, how do we make sure people can find it
 easily?, how do we name this better (but still preserve the existing names
 for people already using it / backwards compatibility)?

 I make no excuses here: yes, the CPack and CTest documentation are lacking
 / lagging behind the CMake documentation. However, it will take a very real
 and concerted and time-consuming effort to improve the situation. With the
 open source nature of the project, we have to be willing to accept the
 organic growth that occurs in the code base: the documentation will be the
 same: it will improve gradually, over time, as contributors are able to
 improve it.

 Until then, at least the mailing list has a reasonable response rate and,
 it seems, sufficient participation from knowledgeable folks willing to pitch
 in and answer. So... if you're confused about something, please ask here.

 How about a search for the mailinglist archives?



 One final comment, cmake is elegant in the extreme.  I can see from some
 of the wiki pages about how install is a merge that canonically folds
 multiple precursors into one uber-powerful, uber-flexible silver bullet.
  Impressive I'm sure.  But harder to grok.  I'm not suggesting that this is
 a wrong choice.  But it is a barrier to learning.  Where there is this kind
 of folding of advanced features into basic operations, some care is needed
 to ensure the docs convey the basics clearly.

 WRT Cpack, what I find is that by merging it into CMake, the CPack code is
 declared one step away from where it is applied.  The need for careful
 quoting in install(CODE ) blocks is a case in point.  I'm sure this folding
 into a 

[CMake] Saving user settings with xcode generator

2010-12-17 Thread Johan Björk
Hi everyone,

I haven't been able to find much information on this topic, so any
suggestions would be greatly appreciated. When CMake regenerates the XCode
project files, it correctly saves the user settings (foo.pbxuser) (contains
things like executable arguments, environment variables and the such),
however, since the GUIDs in the main project file changes, the pbxuser file
be cleaned by XCode as soon as you reopen the project.

First off, anyone know of any way to be able to keep the user settings? If
not, anyone knows if this has been brought up before and if someone has
attempted to fix it?

This is with XCode 3.2.5 and CMake 2.8.3

Thanks for any insight
/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [cmake-developers] [CMake 0011209]: Support generator expression everywhere they make sense

2010-12-16 Thread Johan Björk
Oh, sweet, didn't know there was a bug open for this. +1! Can't wait to get
my hands dirty with 2.8.4

-Johan


On Thu, Dec 16, 2010 at 8:46 AM, Michael Wild them...@gmail.com wrote:

 Thanks Brad, that's fantastic! Kind of a premature Christmas gift ;-)

 Michael

 On 12/15/2010 09:43 PM, Mantis Bug Tracker wrote:
 
  The following issue has been RESOLVED.
  ==
  http://public.kitware.com/Bug/view.php?id=11209
  ==
  Reported By:Michael Wild
  Assigned To:Brad King
  ==
  Project:CMake
  Issue ID:   11209
  Category:   CMake
  Reproducibility:N/A
  Severity:   feature
  Priority:   normal
  Status: resolved
  Resolution: fixed
  Fixed in Version:
  ==
  Date Submitted: 2010-09-07 02:10 EDT
  Last Modified:  2010-12-15 15:43 EST
  ==
  Summary:Support generator expression everywhere they
 make
  sense
  Description:
  It would be very convenient if CMake supported the generator expressions
  available in the ADD_TEST command in all user-definable commands that run
 at
  build time. ADD_CUSTOM_COMMAND and ADD_CUSTOM_TARGET spring to mind.
  ==
  Relationships   ID  Summary
  --
  related to  0009974 CMake should support custom commands th...
  ==
 
  --
   (0024189) Brad King (developer) - 2010-12-15 15:36
   http://public.kitware.com/Bug/view.php?id=11209#c24189
  --
  I've wanted to do this feature for a long time.  I finally got my chance
 this
  month and have been working on it for a couple weeks.
 
  The main commit is
 
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0cdb600
 
  but a lot of refactoring and cleanup was needed to get to that point.
  The full
  commit range produced by this effort was
 
git log --graph afc89064..f0cdb600
 
  --
   (0024190) Brad King (developer) - 2010-12-15 15:42
   http://public.kitware.com/Bug/view.php?id=11209#c24190
  --
  Commit f0cdb600 adds support for generator expressions in
 add_custom_command and
  add_custom target.  They already work in add_test.
 
  The only other place I can think that non-C++ (pure CMake) code can
 define
  commands is the Makefile generator rule variables like
  CMAKE_lang_COMPILE_OBJECT.  These are very specific to one generator
 though.
  Actually the placeholder syntax they use, such as TARGET, was one of
 the
  reasons we chose $ syntax for generator expressions in the first place.
  We
  anticipated adding them elsewhere beyond add_test.  However, since rule
  variables are already expanded with per-configuration substitution I
 don't
  currently see a use case for generator expressions there.  Although it
 may help
  cleanup our builtin rule variables we would always have to support the
 old-style
  placeholders so I don't want to add extra code until we have a good
 reason.
 
  Issue History
  Date ModifiedUsername   FieldChange
  ==
  2010-09-07 02:10 Michael Wild   New Issue
  2010-12-15 12:02 David Cole Assigned To   = Brad King
  2010-12-15 12:02 David Cole Status   new = assigned
  2010-12-15 14:28 Brad King  Relationship added   related to
 0009974
  2010-12-15 15:36 Brad King  Note Added: 0024189
  2010-12-15 15:42 Brad King  Note Added: 0024190
  2010-12-15 15:43 Brad King  Status   assigned =
 resolved
  2010-12-15 15:43 Brad King  Resolution   open = fixed
  ==
 

 ___
 cmake-developers mailing list
 cmake-developers@cmake.org
 http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] Cross-compiling, CMAKE_C_FLAGS, and configure-time compiler tests

2010-12-14 Thread Johan Björk
Hi Justin,

I'm very unsure if this is the correct solution, but it worked for me. I
haven't been able to find any good documentation stating how the CMakeCache
interacts with other parts of CMake.

My assumption is that since CMAKE_C{XX}_FLAGS is supposed to allow the user
to set optional compilation flags, it prefers the value in the cache versus
the one from the toolchain file.

From one of my toolchain files, reproduce as necessary for CMAKE_C_FLAGS:
SET(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS} -fno-rtti CACHE STRING  FORCE)

Cheers
/Johan


On Mon, Dec 13, 2010 at 4:49 PM, Justin Holewinski 
justin.holewin...@gmail.com wrote:

 I am experiencing a cross-compiling issue that I believe is related to how
 toolchain files interact with the configure-time compiler checks.  For
 reference, I am targeting the iOS 4.2 SDK.  I have a toolchain file that
 sets CMAKE_C_FLAGS, CMAKE_CXX_FLAGS, CMAKE_C_LINK_FLAGS, and
 CMAKE_CXX_LINK_FLAGS with appropriate flags for the iOS platform, in
 particular -arch armv6 -arch armv7.  The toolchain file also sets the
 proper C and C++ compilers.

 When CMake is executed and the C compiler is tested, the
 toolchain-specified compiler arguments are passed to the link line, but
 *not* the compile line (according to the error output).  Since the compile
 line does not contain the -arch arguments, the generated object file is
 for i386.  However, since the link line contains these flags, the linker
 tries to link ARM code and fails.

 Are there any additional variables I should be setting in addition to
 CMAKE_C_FLAGS and CMAKE_CXX_FLAGS in order to get the compiler tests to use
 the right flags?  If I add the -arch flags using ADD_DEFINITIONS(), they
 are passed to the compiler test and it succeeds.  That seems like a hack and
 not a proper solution, though.

 Below is the CMake output that prints the values of CMAKE_*_FLAGS as set by
 the toolchain file, as well as the compile and link lines used by CMake.

 I am using CMake 2.8.3 on Snow Leopard 10.6.5.

 CMake Output:

 -- CMAKE_C_FLAGS:-arch armv6 -arch armv7 -pipe -no-cpp-precomp
 --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk
 -miphoneos-version-min=4.2
 -- CMAKE_CXX_FLAGS   -arch armv6 -arch armv7 -pipe -no-cpp-precomp
 --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk
 -miphoneos-version-min=4.2
 -- CMAKE_C_LINK_FLAGS-arch armv6 -arch armv7 -pipe -no-cpp-precomp
 --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk
 -miphoneos-version-min=4.2
 -- CMAKE_CXX_LINK_FLAGS  -arch armv6 -arch armv7 -pipe -no-cpp-precomp
 --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk
 -miphoneos-version-min=4.2
 -- CMAKE_C_FLAGS:-arch armv6 -arch armv7 -pipe -no-cpp-precomp
 --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk
 -miphoneos-version-min=4.2
 -- CMAKE_CXX_FLAGS   -arch armv6 -arch armv7 -pipe -no-cpp-precomp
 --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk
 -miphoneos-version-min=4.2
 -- CMAKE_C_LINK_FLAGS-arch armv6 -arch armv7 -pipe -no-cpp-precomp
 --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk
 -miphoneos-version-min=4.2
 -- CMAKE_CXX_LINK_FLAGS  -arch armv6 -arch armv7 -pipe -no-cpp-precomp
 --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk
 -miphoneos-version-min=4.2
 -- The C compiler identification is GNU
 -- The CXX compiler identification is GNU
 -- Check for working C compiler:
 /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2
 -- Check for working C compiler:
 /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -- broken
 CMake Error at
 /opt/local/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
   The C compiler
   /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 is not
   able to compile a simple test program.

   It fails with the following output:

Change Dir:
 /Users/jholewinski/projects/rapture/build-test/ios/CMakeFiles/CMakeTmp



   Run Build Command:/usr/bin/make cmTryCompileExec/fast

   /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make
   CMakeFiles/cmTryCompileExec.dir/build

   /opt/local/bin/cmake -E cmake_progress_report

   
 /Users/jholewinski/projects/rapture/build-test/ios/CMakeFiles/CMakeTmp/CMakeFiles
   1

   Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj

   /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2

   
 -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include
   -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj -c

   
 /Users/jholewinski/projects/rapture/build-test/ios/CMakeFiles/CMakeTmp/testCCompiler.c


   Linking C executable cmTryCompileExec

   /opt/local/bin/cmake -E cmake_link_script
   CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1

   

[CMake] CPack: Different directory layout depending on generator

2010-11-29 Thread Johan Björk
Hi everyone,

This is basically a repeat question from what was asked in 2008 [1]. Is this
possible now?

To reiterate, I have a project to which I want to give my users an option to
either install as a .deb file, or as a .tgz.

in my tgz, I would like a layout such as
foo-1.2.3.tgz:
foo-1.2.3/README
foo-1.2.3/ChangeLog
foo-1.2.3/lib/libfoo.so
foo-1.2.3/doc/...

And in the deb, I want to install it like
foo-1.2.3.deb:
/usr/lib/libfoo.so
/usr/share/doc/foo/README
/usr/share/doc/foo/ChangeLog

[1]: http://www.cmake.org/pipermail/cmake/2008-September/024117.html

Thanks in advance
/Johan
___
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/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake