[CMake] Generator for Xcode 3.0+?

Daniel Blezek Blezek.Daniel at mayo.edu
Fri Jun 19 09:30:54 EDT 2009


Hi,

  For some of our code, I need to have an environment variable set, and for
a while I had OpenMP support turned on in Xcode.  CMake doesn't support
these things directly, so I wrote a short AppleScript.  Use it FWIW.

#! /bin/sh

TABWIDTH=`osascript << ENDOFSCRIPT
tell application "Xcode"
    tell project "Sumatra"
        -- set foo to get value of build setting "GCC_VERSION" of every
build configuration
        -- display value of foo
        set value of build setting "GCC_VERSION" of every build
configuration to "4.2"
        set value of build setting "ENABLE_OPENMP_SUPPORT" of every build
configuration to "YES"
        tell executable "Sumatra"
            make new environment variable with properties
{name:"DCMDICTPATH", value:"/opt/local/lib/dicom.dic", active:true}
            --            set myEnv to environment variable
            --            set myEnv's value to "Foo"
            --            name of myEnv
            -- add environment variable "DCMDICTPATH"
        end tell
    end tell
    -- set the environment variable "DCMDICTPATH" to
"/opt/local/lib/dicom.dic" of executable "Sumatra"
end tell
`

# echo -n "%%%{PBXSelection}%%%"
# expand -t ${TABWIDTH} <&0
# echo -n "%%%{PBXSelection}%%%"





On 6/18/09 6:42 PM, "Doug Gregor" <doug.gregor at gmail.com> wrote:

> On Thu, Jun 18, 2009 at 3:04 PM, E. Wing<ewmailing at gmail.com> wrote:
>> On 6/18/09, Michael Jackson <mike.jackson at bluequartz.net> wrote:
>>> What is the difference and what does a project that is Xcode 3.0+
>>> compatible gain you? In other words, what are we missing by NOT having
>>> a "true" Xcode 3.0+ compatible project?
>>> 
>> 
>> Since CMake does a very good job with dependency relationships, one
>> minor thing that would be nice is to enable "Build independent targets
>> in parallel" by default. For projects with lots and lots of tiny
>> targets with few dependencies (e.g. OpenSceneGraph), this can speed up
>> builds by several magnitudes.
> 
> That's exactly the option that triggered my question :)
> 
>   - Doug
> _______________________________________________
> 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

-- 
Daniel Blezek, PhD
Medical Imaging Informatics Innovation Center

P 127 or (77) 8 8886
T 507 538 8886
E blezek.daniel at mayo.edu

Mayo Clinic
200 First St. S.W.
Harwick SL-44
Rochester, MN 55905
mayoclinic.org




More information about the CMake mailing list