refactor codes in CDSPass.cpp and also add support for function-like atomic operation...
[c11llvm.git] / CMakeLists.txt
1 add_library(CDSPass MODULE
2     # List your source files here.
3     CDSPass.cpp
4 )
5
6 # Use C++11 to compile our pass (i.e., supply -std=c++11).
7 target_compile_features(CDSPass PRIVATE cxx_range_for cxx_auto_type)
8
9 # LLVM is (typically) built with no C++ RTTI. We need to match that.
10 set_target_properties(CDSPass PROPERTIES
11     COMPILE_FLAGS "-fno-rtti"
12 )
13
14 # Get proper shared-library behavior (where symbols are not necessarily
15 # resolved when the shared library is linked) on OS X.
16 if(APPLE)
17     set_target_properties(CDSPass PROPERTIES
18         LINK_FLAGS "-undefined dynamic_lookup"
19     )
20 endif(APPLE)