diff --git a/reactos/cmake/msvc.cmake b/reactos/cmake/msvc.cmake index bf89a427725..0258ed5b6dc 100644 --- a/reactos/cmake/msvc.cmake +++ b/reactos/cmake/msvc.cmake @@ -112,7 +112,9 @@ function(set_module_type_toolchain MODULE TYPE) if((${TYPE} STREQUAL "kernelmodedriver") OR (${TYPE} STREQUAL "wdmdriver")) message(FATAL_ERROR "Use of STL in kernelmodedriver or wdmdriver type module prohibited") endif() - #target_link_libraries(${MODULE} stlport oldnames) + target_link_libraries(${MODULE} cpprt stlport oldnames) + elseif(CPP_USE_RT) + target_link_libraries(${MODULE} cpprt) endif() if((${TYPE} STREQUAL "win32dll") OR (${TYPE} STREQUAL "win32ocx") OR (${TYPE} STREQUAL "cpl")) add_target_link_flags(${MODULE} "/DLL") diff --git a/reactos/include/c++/stlport/stl/config/_reactos.h b/reactos/include/c++/stlport/stl/config/_reactos.h index b6951bdb201..a29415d63b1 100644 --- a/reactos/include/c++/stlport/stl/config/_reactos.h +++ b/reactos/include/c++/stlport/stl/config/_reactos.h @@ -214,7 +214,7 @@ // Uncomment to indicate that the compiler do not like static constant // definition. // Meaningfull only if _STLP_STATIC_CONST_INIT_BUG is not defined. -// # define _STLP_NO_STATIC_CONST_DEFINITION +# define _STLP_NO_STATIC_CONST_DEFINITION // Define if default constructor for builtin integer type fails to initialize it to 0 // In expression like new(&char) char(): diff --git a/reactos/lib/3rdparty/CMakeLists.txt b/reactos/lib/3rdparty/CMakeLists.txt index 52f1f933537..36cd9aab693 100644 --- a/reactos/lib/3rdparty/CMakeLists.txt +++ b/reactos/lib/3rdparty/CMakeLists.txt @@ -9,6 +9,8 @@ add_subdirectory(libmpg123) add_subdirectory(libsamplerate) add_subdirectory(libwine) add_subdirectory(libxml2) -# add_subdirectory(stlport) FIXME: Add proper STL support +if(MSVC) + add_subdirectory(stlport) +endif() add_subdirectory(strmbase) add_subdirectory(zlib) diff --git a/reactos/lib/3rdparty/stlport/CMakeLists.txt b/reactos/lib/3rdparty/stlport/CMakeLists.txt index b1cf3c8bcbe..4a60835710a 100644 --- a/reactos/lib/3rdparty/stlport/CMakeLists.txt +++ b/reactos/lib/3rdparty/stlport/CMakeLists.txt @@ -2,13 +2,13 @@ #uncomment this if you want to test c++ compilation #add_subdirectory(test) +set_cpp(WITH_RTTI WITH_EXCEPTIONS WITH_STL) + add_definitions( -D_STLP_USE_EXCEPTIONS -D_DLL -D__USE_CRTIMP -D_BUILD_STLPORT) -set_cpp() - list(APPEND SOURCE src/allocators.cpp src/bitset.cpp diff --git a/reactos/lib/atl/CMakeLists.txt b/reactos/lib/atl/CMakeLists.txt index cc4bb757d12..031ce279d62 100644 --- a/reactos/lib/atl/CMakeLists.txt +++ b/reactos/lib/atl/CMakeLists.txt @@ -1,7 +1,5 @@ -if(NOT MSVC) - set_cpp(WITH_RTTI) -endif() +set_cpp(WITH_RTTI) add_definitions( -DUNICODE -D_UNICODE diff --git a/reactos/lib/sdk/comsupp/CMakeLists.txt b/reactos/lib/sdk/comsupp/CMakeLists.txt index 5721a924888..0232dfb4682 100644 --- a/reactos/lib/sdk/comsupp/CMakeLists.txt +++ b/reactos/lib/sdk/comsupp/CMakeLists.txt @@ -1,5 +1,5 @@ -set_cpp(WITH_EXCEPTIONS) +set_cpp(WITH_EXCEPTIONS WITH_STL) add_library(comsupp comsupp.cpp) add_dependencies(comsupp psdk)