Add an /FS flag to the lib/interception CMake to make it buildable with VS2013 too
[blocksruntime.git] / lib / interception / CMakeLists.txt
blob2b069ed1161421a06d55bd3ae1826f9fa5ddce37
1 # Build for the runtime interception helper library.
3 set(INTERCEPTION_SOURCES
4   interception_linux.cc
5   interception_mac.cc
6   interception_win.cc
7   interception_type_test.cc
8   )
10 include_directories(..)
12 if (NOT MSVC)
13   set(INTERCEPTION_CFLAGS
14     ${SANITIZER_COMMON_CFLAGS})
15     -fno-rtti)
16 else()
17   set(INTERCEPTION_CFLAGS
18     ${SANITIZER_COMMON_CFLAGS}
19     /GR- /FS)
20 endif()
22 if(APPLE)
23   # Build universal binary on APPLE.
24   foreach(os ${SANITIZER_COMMON_SUPPORTED_DARWIN_OS})
25     add_compiler_rt_darwin_object_library(RTInterception ${os}
26       ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH}
27       SOURCES ${INTERCEPTION_SOURCES}
28       CFLAGS ${INTERCEPTION_CFLAGS})
29   endforeach()
30 elseif(ANDROID)
31   add_library(RTInterception.arm.android OBJECT ${INTERCEPTION_SOURCES})
32   set_target_compile_flags(RTInterception.arm.android
33     ${INTERCEPTION_CFLAGS})
34 else()
35   # Otherwise, build separate libraries for each target.
36   foreach(arch ${SANITIZER_COMMON_SUPPORTED_ARCH})
37     add_compiler_rt_object_library(RTInterception ${arch}
38       SOURCES ${INTERCEPTION_SOURCES} CFLAGS ${INTERCEPTION_CFLAGS})
39   endforeach()
40 endif()