Compiling OpenSubDiv on mac os x with gcc

Alec Jacobson

March 16, 2015

weblog/

I had a bit of trouble compiling OpenSubDiv on Mac OS X Yosemite with gcc. I could at least manage to compile the cpu library with:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DNO_EXAMPLES=1 -DNO_GCD=1 -DNO_CUDA=1 ..
make osd_static_cpu

This creates lib/libosdCPU.a. It seems -DNO_GCD=1 is the most critical option as grand central dispatch uses apple's "blocks" extension C which is only supported by clang.