Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6826725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:10:55+00:00 2026-05-26T22:10:55+00:00

I know that until recently it was not possible to select any specific compiler

  • 0

I know that until recently it was not possible to select any specific compiler for xcode projects generated by CMake (it would always choose xcodes default compiler). Anyways this post: http://cmake.3232098.n2.nabble.com/CMake-2-8-1-available-for-download-td4752230.html
makes me believe that it should be possible with a specific CMAKE_XCODE_ATTRIBUTE_ flag by now.- Unfortunatelly I could neither find which flag is supposed to change xcodes compiler, nor a list of all xcode flags supported by CMake.

I am using Xcode 4.2 and CMake 2.8.6, and I’d like to be able to switch between LLVM 3.0 and LLVM GCC 4.2 from within CMake.

As I said a list, which lists all xcode flags I can change from within CMake would be great!

Thanks

EDIT:

with Cmake 2.8.6, if you want to generate an xcode project that does not default to Clang/LLVM 3.0, use the following:

set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:10:56+00:00Added an answer on May 26, 2026 at 10:10 pm

    It seems that CMake just transparently sets whatever attribute you set in the XCode Project file – so it supports any and all attributes that you like.

    By inspection of one of my XCode project files, the attribute that you want seems to be GCC_VERSION, and these are the acceptable values (my XCode is 4.0.2, gcc v4.2).

    GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
    GCC_VERSION = 4.2
    GCC_VERSION = com.apple.compilers.llvmgcc42
    

    My CMake documentation seems to suggest that you want to set XCODE_ATTRIBUTE_X not CMAKE_XCODE_ATTRIBUTE_X, too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We know that IIS caches ConfigurationManager.AppSettings so it reads the disk only once until
Do you know any libraries similar to java.util.Properties that support more advanced features like
In our company, just until recently, we were not using namespaces because some compilers
I was recently asked by a Team Leader (not mine) if I would be
Until very recently, instruments worked fine. I don't know what I did to make
To my great horror, I recently discovered that the SSL/TLS protocol that I until
I know that I can do something like $int = (int)99; //(int) has a
I know that default cron's behavior is to send normal and error output to
I know that you can insert multiple rows at once, is there a way
I know that |DataDirectory| will resolve to App_Data in an ASP.NET application but is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.