[CMake] CMake and NaCl (Google NativeClient)

Nils Hjelte nils at algoryx.se
Thu Aug 11 08:17:11 EDT 2011


Hello!

I'm trying to port a C++ project to NaCl
(http://code.google.com/chrome/nativeclient/), with cmake as the build
system, and I need to figure out some things. I am using a Mac as
build machine. I have changed the CMAKE_CXX_COMPILER/LINKER variables
to use the nacl toolchain. What I would like to know is if it is
possible to discard all the default compiler flags. I get lots of
flags that the nacl compiler does not like,

example:
-mmacosx-version-min=10.5
-arch i386
-isysroot /Developer/SDKs/MacOSX10.7.sdk

and the linker adds these flags that I can not get rid of:
-compatibility_version 1.12.0
-current_version 1.12.0


Ideally I would like an empty compile command where I can explicitly
add the flags needed. Is it possible with CMake?


// Nils


More information about the CMake mailing list