[CMake] Per-target compiler flags?

2006-07-05 Thread Remi Denis-Courmont
Hello, I am trying to port a project to CMake, but I couldn't find anyway to specify C preprocessor defines on a per-target (or alternatively, per-source) basis. The project is compiling the same source files multiple times with different defines, resulting in different object code... But it

Re: [CMake] Per-target compiler flags?

2006-07-05 Thread Jan Woetzel
Remi Denis-Courmont wrote: The project is compiling the same source files multiple times with different defines, resulting in different object code... But it seems like ADD_DEFINITIONS won't support this case. Any solution? You may write multiple .cpp files that #include the code. Then

Re: [CMake] Per-target compiler flags?

2006-07-05 Thread Brad King
Remi Denis-Courmont wrote: Hello, I am trying to port a project to CMake, but I couldn't find anyway to specify C preprocessor defines on a per-target (or alternatively, per-source) basis. The project is compiling the same source files multiple times with different defines, resulting in

Re: [CMake] Per-target compiler flags?

2006-07-05 Thread Brandon J. Van Every
Jan Woetzel wrote: Remi Denis-Courmont wrote: The project is compiling the same source files multiple times with different defines, resulting in different object code... But it seems like ADD_DEFINITIONS won't support this case. Any solution? You may write multiple .cpp files that