On Monday 10 October 2011, Robert Dailey wrote:
> I'm using set_source_files_properties() to add COMPILE_DEFINITIONS to a
> single source file. Are these definitions appended to those added via
> target-specific defines, or do they completely replace the existing ones? I
> need them to append, which is why I ask.

They are appended.
And you can simply try that out quickly:

cmake_minimum_required(VERSION 2.8)

set_source_files_properties(hello.c PROPERTIES COMPILE_FLAGS -DFOO)

add_executable(hello main.c hello.c)


That's all you need for testing, and two source files:

int hello(void) { return 17; }

and a main.c:

#include <stdio.h>
extern int hello(void);

int main()
{
  printf("hello: %d\n", hello());
  return 0;
}

Alex
--
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to