[Cmake-commits] [cmake-commits] david.cole committed CMakeLists.txt 1.403 1.404 cmCallVisualStudioMacro.cxx 1.4 1.5
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Oct 8 14:19:03 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv10942
Modified Files:
CMakeLists.txt cmCallVisualStudioMacro.cxx
Log Message:
BUG: Fix issue #7533. Revise fix for issue #7058 to use pragma comment libs in the source file rather than using TARGET_LINK_LIBRARIES in CMakeLists.txt because of the complex ifdef logic used in correct copies of comdef.h.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CMakeLists.txt,v
retrieving revision 1.403
retrieving revision 1.404
diff -C 2 -d -r1.403 -r1.404
*** CMakeLists.txt 1 Aug 2008 16:10:43 -0000 1.403
--- CMakeLists.txt 8 Oct 2008 18:19:01 -0000 1.404
***************
*** 303,319 ****
ENDIF(CMAKE_BUILD_ON_VISUAL_STUDIO OR MINGW)
- # With the Microsoft compiler (for _bstr_t support used from
- # cmCallVisualStudioMacro) we need the comsupp lib. Needed when
- # _MSC_VER and HAVE_COMDEF_H are defined...
- #
- IF(MSVC)
- IF(MSVC60)
- # comsuppd did not yet exist in VS6
- TARGET_LINK_LIBRARIES(CMakeLib comsupp)
- ELSE(MSVC60)
- TARGET_LINK_LIBRARIES(CMakeLib optimized comsupp debug comsuppd)
- ENDIF(MSVC60)
- ENDIF(MSVC)
-
#
# CTestLib
--- 303,306 ----
Index: cmCallVisualStudioMacro.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCallVisualStudioMacro.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -C 2 -d -r1.4 -r1.5
*** cmCallVisualStudioMacro.cxx 30 Jul 2008 19:26:34 -0000 1.4
--- cmCallVisualStudioMacro.cxx 8 Oct 2008 18:19:01 -0000 1.5
***************
*** 37,40 ****
--- 37,65 ----
//----------------------------------------------------------------------------
+ // Copied from a correct comdef.h to avoid problems with deficient versions
+ // of comdef.h that exist in the wild... Fixes issue #7533.
+ //
+ #if ( _MSC_VER >= 1300 )
+ // VS7 and later:
+ #ifdef _NATIVE_WCHAR_T_DEFINED
+ # ifdef _DEBUG
+ # pragma comment(lib, "comsuppwd.lib")
+ # else
+ # pragma comment(lib, "comsuppw.lib")
+ # endif
+ #else
+ # ifdef _DEBUG
+ # pragma comment(lib, "comsuppd.lib")
+ # else
+ # pragma comment(lib, "comsupp.lib")
+ # endif
+ #endif
+ #else
+ // VS6 only had comsupp.lib:
+ # pragma comment(lib, "comsupp.lib")
+ #endif
+
+
+ //----------------------------------------------------------------------------
///! Use ReportHRESULT to make a cmSystemTools::Message after calling
///! a COM method that may have failed.
More information about the Cmake-commits
mailing list