Xake cmake generator creates a project that cannot build

After trying to find an answer to my problem for some time, I decided to ask someone to have the same problem.

I have a C ++ project that uses cmake build system. I use the Macbook Pro for development, so when I use the terminal, everything works like a charm, and I can create my own project.

However, today I found out that I can use Xcode after creating the appropriate project using the cmake generator:

$> cmake -G Xcode . 

He is working on a project and it looks great, except that I cannot build anything. It does not recognize characters included from included files. Does anyone know why this is? It seems that cmake environment variables are not being passed to Xcode.

Can someone point me in the right direction? Thanks everyone

aa

+6
generator xcode cmake
source share
1 answer

Omit the period (.) In the command invocation, leaving only cmake -G Xcode . When I first started using CMake, I also created Xcode projects that were not going to build. I used the interactive interface of the CMake wizard, which led to a world of pain. As often happens, using the simplest command is often the way out. As soon as I stopped using the wizard and just used the default settings, I got an Xcode project that is solidly built.

+5
source share

All Articles