1
2#uncomment this if you want to test c++ compilation
3#add_subdirectory(test)
4
5set_cpp(WITH_RTTI WITH_EXCEPTIONS WITH_STL)
6
7add_definitions(
8    -D_STLP_USE_EXCEPTIONS
9    -D_DLL -D__USE_CRTIMP
10    -D_BUILD_STLPORT)
11
12list(APPEND SOURCE
13    src/allocators.cpp
14    src/bitset.cpp
15    src/codecvt.cpp
16    src/collate.cpp
17    src/complex.cpp
18    src/complex_io.cpp
19    src/complex_trig.cpp
20    src/ctype.cpp
21    src/dll_main.cpp
22    src/facets_byname.cpp
23    src/fstream.cpp
24    src/ios.cpp
25    src/iostream.cpp
26    src/istream.cpp
27    src/locale.cpp
28    src/locale_catalog.cpp
29    src/locale_impl.cpp
30    src/messages.cpp
31    src/monetary.cpp
32    src/num_get.cpp
33    src/num_get_float.cpp
34    src/num_put.cpp
35    src/num_put_float.cpp
36    src/numpunct.cpp
37    src/ostream.cpp
38    src/sstream.cpp
39    src/stdio_streambuf.cpp
40    src/string.cpp
41    src/strstream.cpp
42    src/time_facets.cpp
43    src/stlport_prefix.h)
44
45add_library(stlport
46    ${SOURCE}
47    src/cxa.c
48    src/c_locale.c)
49
50if(USE_CLANG_CL)
51    add_target_compile_flags(stlport "-Wno-missing-braces -Wno-unused-local-typedef")
52    add_target_compile_flags(stlport "-Wno-infinite-recursion -Wno-deprecated-register")
53    add_target_compile_flags(stlport "-Wno-tautological-unsigned-zero-compare")
54endif()
55
56add_dependencies(stlport xdk)
57add_pch(stlport src/stlport_prefix.h SOURCE)
58