Author: tfaber
Date: Sat Jun 22 15:57:36 2013
New Revision: 59290
URL:
http://svn.reactos.org/svn/reactos?rev=59290&view=rev
Log:
[C++]
- Enable STLPort build on MSVC
- Configure STLPort not to generate static constant definitions (which MSVC doesn't
like)
- Link C++ modules to stlport and cpprt as appropriate
- Fix comsupp and atl C++ options
CORE-6950
Modified:
trunk/reactos/cmake/msvc.cmake
trunk/reactos/include/c++/stlport/stl/config/_reactos.h
trunk/reactos/lib/3rdparty/CMakeLists.txt
trunk/reactos/lib/3rdparty/stlport/CMakeLists.txt
trunk/reactos/lib/atl/CMakeLists.txt
trunk/reactos/lib/sdk/comsupp/CMakeLists.txt
Modified: trunk/reactos/cmake/msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=59290…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Sat Jun 22 15:57:36 2013
@@ -112,7 +112,9 @@
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")
Modified: trunk/reactos/include/c++/stlport/stl/config/_reactos.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/c%2B%2B/stlport/st…
==============================================================================
--- trunk/reactos/include/c++/stlport/stl/config/_reactos.h [iso-8859-1] (original)
+++ trunk/reactos/include/c++/stlport/stl/config/_reactos.h [iso-8859-1] Sat Jun 22
15:57:36 2013
@@ -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():
Modified: trunk/reactos/lib/3rdparty/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/CMakeLists.tx…
==============================================================================
--- trunk/reactos/lib/3rdparty/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/CMakeLists.txt [iso-8859-1] Sat Jun 22 15:57:36 2013
@@ -9,6 +9,8 @@
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)
Modified: trunk/reactos/lib/3rdparty/stlport/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/stlport/CMake…
==============================================================================
--- trunk/reactos/lib/3rdparty/stlport/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/stlport/CMakeLists.txt [iso-8859-1] Sat Jun 22 15:57:36
2013
@@ -1,13 +1,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
Modified: trunk/reactos/lib/atl/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/atl/CMakeLists.txt?rev…
==============================================================================
--- trunk/reactos/lib/atl/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/atl/CMakeLists.txt [iso-8859-1] Sat Jun 22 15:57:36 2013
@@ -1,7 +1,5 @@
-if(NOT MSVC)
- set_cpp(WITH_RTTI)
-endif()
+set_cpp(WITH_RTTI)
add_definitions(
-DUNICODE -D_UNICODE
Modified: trunk/reactos/lib/sdk/comsupp/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/comsupp/CMakeLists…
==============================================================================
--- trunk/reactos/lib/sdk/comsupp/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/comsupp/CMakeLists.txt [iso-8859-1] Sat Jun 22 15:57:36 2013
@@ -1,5 +1,5 @@
-set_cpp(WITH_EXCEPTIONS)
+set_cpp(WITH_EXCEPTIONS WITH_STL)
add_library(comsupp comsupp.cpp)
add_dependencies(comsupp psdk)