Re: [CMake] XCode4 and archiving

2011-06-27 Thread Johan Knutzen
Hey!

Thank you for your reply. I tried unsetting CMAKE_XCODE_ATTRIBUTE_INSTALL_PATH
but since it is not defined until the generator actually runs it does nothing. 
An interesting not is that if I do:
set(CMAKE_XCODE_ATTRIBUTE_INSTALL_PATH test)
all INSTALL_PATH entries in xcode become test, so there should a a connection. 
The problem lies in that INSTALL_PATH gets set by default to , but a project 
file generated by XCode does not set it at all.

Another bug in the generating step is that this line in cmake:
set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY 1,2)
generates
TARGETED_DEVICE_FAMILY = 1,2;
instead of what's correct:
TARGETED_DEVICE_FAMILY = 1,2;

However, this line:
set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY 1)
generates:
TARGETED_DEVICE_FAMILY = 1;
which is correct. Notice the encompassing .

So in order to get the encompassing  one might try:
set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY 1, 2)
which generates:
TARGETED_DEVICE_FAMILY = 1, 2;

However 1, 2 with a space after , can not be parsed by Xcode 4. 

A hack which works is:
set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY 1,2 )
which generates:
TARGETED_DEVICE_FAMILY = 1,2 ;

which for some reason can be parsed and is parsed correctly by XCode 4. Note 
the space after 2. 

Regarding INSTALL_PATH, if someone has any ideas about how this can be fixed 
using CMake instead of in a script run after the generating step please reply. 

And another question: Where do I find the code which actually creates the 
entries in targets of an xcode 4 project? Is it all in the binary or are there 
any other run-time files which I can modify and perhaps submit as a patch? 

Johan

--- Den sön 2011-06-26 skrev David Cole david.c...@kitware.com:

Från: David Cole david.c...@kitware.com
Ämne: Re: [CMake] XCode4 and archiving
Till: jo...@knutzen.se
Kopia: era...@senri.se, cmake@cmake.org
Datum: söndag 26 juni 2011 22:37

We will be getting to various Xcode 4 issues over the coming months.
In the meantime, I would look into whether there's a way to suppress the 
generation of the INSTALL_PATH lines rather than having to run a 
post-processing script. If I remember this later on I'll check into it 
myself and report back.


HTH,David

On Sun, Jun 26, 2011 at 12:11 PM, Johan Knutzen knutzen_jo...@yahoo.se wrote:

I found a workaround, if anybody is interested. The problem lies in the cmake 
generator setting the INSTALL_PATH to  in the project file. Not sure why 
cmake does this, but a fix is to remove all entries.




Here is a bash script which takes a pbxproj file as argument and fixes it:

#! /bin/bash

sed -i.bak '/INSTALL_PATH/d' $1



Would be helpful if somebody working on cmake would comment, and perhaps fix 
this issue.



Johan





--- Den sön 2011-06-26 skrev Johan Knutzen knutzen_jo...@yahoo.se:



 Från: Johan Knutzen knutzen_jo...@yahoo.se

 Ämne: [CMake] XCode4 and archiving

 Till: cmake@cmake.org

 Datum: söndag 26 juni 2011 16:00

 Hey!



 I've experienced a few hickups when using cmake with XCode

 4, and one of them is the ability to create archives. In the

 IDE you do this by clicking Product-Archive, which

 results in an archive which you later can sign with

 different provisioning profiles when distributing iOS apps

 to beta testers.



 However, for projects generated using cmake the archiving

 command does not work. The result of that command should be

 an archiving listed in the organizer, but that is not the

 case when you have a cmake generated project.



 Does anyone have a solution or work around for this?



 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




-Infogad bilaga följer-

___
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

[CMake] XCode4 and archiving

2011-06-26 Thread Johan Knutzen
Hey!

I've experienced a few hickups when using cmake with XCode 4, and one of them 
is the ability to create archives. In the IDE you do this by clicking 
Product-Archive, which results in an archive which you later can sign with 
different provisioning profiles when distributing iOS apps to beta testers.

However, for projects generated using cmake the archiving command does not 
work. The result of that command should be an archiving listed in the 
organizer, but that is not the case when you have a cmake generated project.

Does anyone have a solution or work around for this?

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] XCode4 and archiving

2011-06-26 Thread Johan Knutzen
I found a workaround, if anybody is interested. The problem lies in the cmake 
generator setting the INSTALL_PATH to  in the project file. Not sure why 
cmake does this, but a fix is to remove all entries.

Here is a bash script which takes a pbxproj file as argument and fixes it:
#! /bin/bash
sed -i.bak '/INSTALL_PATH/d' $1

Would be helpful if somebody working on cmake would comment, and perhaps fix 
this issue.

Johan


--- Den sön 2011-06-26 skrev Johan Knutzen knutzen_jo...@yahoo.se:

 Från: Johan Knutzen knutzen_jo...@yahoo.se
 Ämne: [CMake] XCode4 and archiving
 Till: cmake@cmake.org
 Datum: söndag 26 juni 2011 16:00
 Hey!
 
 I've experienced a few hickups when using cmake with XCode
 4, and one of them is the ability to create archives. In the
 IDE you do this by clicking Product-Archive, which
 results in an archive which you later can sign with
 different provisioning profiles when distributing iOS apps
 to beta testers.
 
 However, for projects generated using cmake the archiving
 command does not work. The result of that command should be
 an archiving listed in the organizer, but that is not the
 case when you have a cmake generated project.
 
 Does anyone have a solution or work around for this?
 
 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] (no subject)

2009-12-16 Thread Johan Knutzen
Hi John,

Thank you! This looks very nice, and uses a bit different approach than the one 
used in PCHSupport. 

Will use this!

Johan

--- Den tis 2009-12-15 skrev John Drescher dresche...@gmail.com:

Från: John Drescher dresche...@gmail.com
Ämne: Re: [CMake] (no subject)
Till: Johan Knutzen knutzen_joh...@yahoo.se
Kopia: cmake@cmake.org
Datum: tisdag 15 december 2009 15.08

On Tue, Dec 15, 2009 at 4:13 AM, Johan Knutzen knutzen_joh...@yahoo.se wrote:

 Hi!

 What is the status of scripts enabling precompiled headers for gcc/visual 
 studio? I've tried out PCHSupport_26 from 
 http://www.cmake.org/Bug/view.php?id=1260 but I couldn't get it to work. Does 
 anyone have any up to date script that works with 2.8?


I have not bothered in linux since I can use ccache to speed up
builds. In windows I use the following macro:

#

macro( SM_PCH_SUPPORT ProjectName )
if (MSVC)
    if (USE_MSVC_PCH)
    
        set_source_files_properties(${ProjectName}PCH.cxx
            PROPERTIES
            COMPILE_FLAGS /Yc${ProjectName}PCH.h
            )
        foreach( src_file ${${ProjectName}_SRCS} )
            set_source_files_properties(
                ${src_file}
                PROPERTIES
                COMPILE_FLAGS /Yu${ProjectName}PCH.h
                )
        endforeach( src_file ${${ProjectName}_SRCS} )
        
        list(APPEND ${ProjectName}_SRCS ${ProjectName}PCH.cxx)
        list(APPEND ${ProjectName}_EXT_HDRS ${ProjectName}PCH.h)

    endif(USE_MSVC_PCH)
endif (MSVC)
endmacro (SM_PCH_SUPPORT)

#


And this requires me to have my source variable named ${ProjectName}_SRCS

And my header variable to be named ${ProjectName}_EXT_HDRS

and the following files to exist in the same folder as the CMakeLists.txt

${ProjectName}PCH.cxx ${ProjectName}PCH.h

I generally put this macro in the main project before my first
add_subdirectory so that all subprojects can use the macro as well.

Then to activate this in a project. I place the macro call after I
define the list variables.

SET( smDataManagement_SRCS
    ./src/smData.cxx
    ./src/smDataOperation.cxx
    ./src/smCounterBalanceOperation.cxx
)

SET( smDataManagement_EXT_HDRS
    ./Include/smData.h
    ./Include/smDataOperation.h
    ./Include/smCounterBalanceOperation.h
)

SET( smDataManagement_MOC_HDRS
    
)

# some .ui files
SET( smDataManagement_UIS
)

# and finally an resource file
SET( smDataManagement_RCS
)

SET( smDataManagement_INT_HDRS

)

#Add precompiled header support
SM_PCH_SUPPORT(smDataManagement)

This works in cmake-2.6 and above.
John



  __
Låna pengar utan säkerhet. Jämför vilkor online hos Kelkoo.
http://www.kelkoo.se/c-100390123-lan-utan-sakerhet.html?partnerId=96915014___
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] (no subject)

2009-12-15 Thread Johan Knutzen
Hi!

What is the status of scripts enabling precompiled headers for gcc/visual 
studio? I've tried out PCHSupport_26 from 
http://www.cmake.org/Bug/view.php?id=1260 but I couldn't get it to work. Does 
anyone have any up to date script that works with 2.8? 


Johan



  __
Ta semester! - sök efter resor hos Kelkoo.
Jämför pris på flygbiljetter och hotellrum här:
http://www.kelkoo.se/c-169901-resor-biljetter.html?partnerId=96914052___
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