[CMake] Removing a compile flag for a specific file

Tyler Roscoe tyler at cryptio.net
Fri May 8 12:41:29 EDT 2009


On Fri, May 08, 2009 at 02:51:27PM +0200, David Larsson wrote:
> First, should really CMAKE_CXX_FLAGS affect targets suffixed .c at all?
> Shouldn't it be only for c++ files like suffixed .cpp or .cxx?

I wouldn't think it should, but it's not impossible that CMake would
determine what language a particular library or executable was written
in based on, say, the first few filenames.

> Since it does affect my C file, is there a way of actively remove flags for
> a specific file?

Maybe this?

http://www.cmake.org/cmake/help/cmake2.6docs.html#command:set_source_files_properties

tyler


More information about the CMake mailing list