[CMake] newbie question about inline functions

Roy Zuo ROYLZUO at gmail.com
Mon Sep 22 02:00:10 EDT 2008


Hello eveyone,

I am just new to cmake and have some trouble when compiling a big
project whose cpp source files are put deep inside subdirectories. 

In my CMakeLists.txt, I use AUX_SOURCE_DIRECTORY(subdir VARX) and
SET(SRC ${VAR1} ${VAR2} ...) to put all the source files in a
variable, and then use ADD_EXECUTABLE(foo main.c ${SRC}) to make the
executable. However, there are some cpp files containing only inline
functions, and when complier tries to compile them into .o files, a
lot of errors are throw out. So my question is, how to exclude those
files from the compilation? 

I know this question is naive because this is my first time working
with cmake as well as C++.

Kind regards,

Roy


More information about the CMake mailing list