[Cmake-commits] [cmake-commits] king committed cmTarget.cxx 1.266 1.267 cmTarget.h 1.138 1.139
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Aug 11 09:07:44 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv25578/Source
Modified Files:
cmTarget.cxx cmTarget.h
Log Message:
Create cmTarget DLL query methods
We creates methods IsDLLPlatform() and HasImportLibrary(). The former
returns true on Windows. The latter returns whether the target has a
DLL import library. It is true on Windows for shared libraries and
executables with exports.
Index: cmTarget.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.h,v
retrieving revision 1.138
retrieving revision 1.139
diff -C 2 -d -r1.138 -r1.139
*** cmTarget.h 10 Jul 2009 17:53:28 -0000 1.138
--- cmTarget.h 11 Aug 2009 13:07:42 -0000 1.139
***************
*** 414,417 ****
--- 414,423 ----
bool IsLinkable();
+ /** Return whether or not the target is for a DLL platform. */
+ bool IsDLLPlatform() { return this->DLLPlatform; }
+
+ /** Return whether or not the target has a DLL import library. */
+ bool HasImportLibrary();
+
/** Return whether this target is a shared library Framework on
Apple. */
Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.266
retrieving revision 1.267
diff -C 2 -d -r1.266 -r1.267
*** cmTarget.cxx 30 Jul 2009 14:59:37 -0000 1.266
--- cmTarget.cxx 11 Aug 2009 13:07:42 -0000 1.267
***************
*** 1024,1027 ****
--- 1024,1035 ----
//----------------------------------------------------------------------------
+ bool cmTarget::HasImportLibrary()
+ {
+ return (this->DLLPlatform &&
+ (this->GetType() == cmTarget::SHARED_LIBRARY ||
+ this->IsExecutableWithExports()));
+ }
+
+ //----------------------------------------------------------------------------
bool cmTarget::IsFrameworkOnApple()
{
***************
*** 3636,3642 ****
// On a DLL platform there may be only IMPORTED_IMPLIB for a shared
// library or an executable with exports.
! bool allowImp =
! this->DLLPlatform && (this->GetType() == cmTarget::SHARED_LIBRARY ||
! this->IsExecutableWithExports());
// Look for a mapping from the current project's configuration to
--- 3644,3648 ----
// On a DLL platform there may be only IMPORTED_IMPLIB for a shared
// library or an executable with exports.
! bool allowImp = this->HasImportLibrary();
// Look for a mapping from the current project's configuration to
More information about the Cmake-commits
mailing list