tags:

views:

17

answers:

2

Is there any way in CMake to force a path specified via include_directories (or perhaps through a different function) to use the -isystem flag instead of the -I flag when building with gcc?

See http://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html#Directory-Options for details on -I and -isystem.

A: 

You could try using CMAKE_C_FLAGS and CMAKE_CXX_FLAGS to add additional flags.

the_void
+1  A: 

Yes you force a path to be a system include by using the optional SYSTEM flag

set_include_directories(SYSTEM path)

http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:include_directories

RobertJMaynard