[Cmake-commits] CMake branch, next, updated. v3.3.0-rc3-801-g6242647
Bill Hoffman
bill.hoffman at kitware.com
Thu Jul 2 18:07:31 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 62426472d6b2126c0c615dececef351754d2cc4b (commit)
via e3d1399d7e2380b9958252c479c3d81336a7e546 (commit)
via e03171ecb554c3688ad776b44ce5e2728ea4210e (commit)
via 3873507a77446696877cf0043c61babf601a7a36 (commit)
from 324dcf1cfff8ab7ddea0e3697f215487fcb39c72 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=62426472d6b2126c0c615dececef351754d2cc4b
commit 62426472d6b2126c0c615dececef351754d2cc4b
Merge: 324dcf1 e3d1399
Author: Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Thu Jul 2 18:07:13 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jul 2 18:07:13 2015 -0400
Merge topic 'auto_export_dll_symbols' into next
e3d1399d Merge branch 'auto_export_dll_symbols' of git://cmake.org/stage/cmake into auto_export_dll_symbols
e03171ec Make sure only .obj files are listed and only enable export if property is on.
3873507a Add support for /bigobj format and a test for it.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e3d1399d7e2380b9958252c479c3d81336a7e546
commit e3d1399d7e2380b9958252c479c3d81336a7e546
Merge: e03171e 7fe42a1
Author: Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Thu Jul 2 17:59:07 2015 -0400
Commit: Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Thu Jul 2 17:59:07 2015 -0400
Merge branch 'auto_export_dll_symbols' of git://cmake.org/stage/cmake into auto_export_dll_symbols
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e03171ecb554c3688ad776b44ce5e2728ea4210e
commit e03171ecb554c3688ad776b44ce5e2728ea4210e
Author: Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Thu Jul 2 17:47:25 2015 -0400
Commit: Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Thu Jul 2 17:47:25 2015 -0400
Make sure only .obj files are listed and only enable export if property is on.
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index a41e843..bc134e1 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -20,6 +20,7 @@
#include "cmSourceFile.h"
#include "cmTarget.h"
#include <cmsys/Encoding.hxx>
+#include "cmAlgorithms.h"
//----------------------------------------------------------------------------
cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator(cmake* cm)
@@ -942,7 +943,10 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand(
// replace $(ConfigurationName) in the object names
cmSystemTools::ReplaceString(objFile, this->GetCMakeCFGIntDir(),
configName.c_str());
- fout << objFile << "\n";
+ if(cmHasLiteralSuffix(objFile, ".obj"))
+ {
+ fout << objFile << "\n";
+ }
}
cmCustomCommandLines commandLines;
commandLines.push_back(cmdl);
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index e4eb014..a0e9e4d 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1084,9 +1084,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
if (target.GetType() == cmTarget::SHARED_LIBRARY &&
this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
{
- std::string const autodef_prop = "WINDOWS_EXPORT_ALL_SYMBOLS";
- const char *autodef = target.GetProperty(autodef_prop);
- if (autodef && *autodef)
+ if (target.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
{
linkOptions.AddFlag("ModuleDefinitionFile", "$(IntDir)/exportall.def");
}
@@ -2029,9 +2027,7 @@ void cmLocalVisualStudio7Generator
if (target.GetType() == cmTarget::SHARED_LIBRARY &&
this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
{
- std::string const autodef_prop = "WINDOWS_EXPORT_ALL_SYMBOLS";
- const char *autodef = target.GetProperty(autodef_prop);
- if (autodef && *autodef)
+ if (target.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
{
addedPrelink = true;
std::vector<cmCustomCommand> commands =
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index ffdd27b..696dcc4 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -18,6 +18,7 @@
#include "cmSourceFile.h"
#include "cmTarget.h"
#include "cmake.h"
+#include "cmAlgorithms.h"
//----------------------------------------------------------------------------
cmMakefileLibraryTargetGenerator
@@ -567,9 +568,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
if (this->Target->GetType() == cmTarget::SHARED_LIBRARY &&
this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
{
- std::string const autodef_prop = "WINDOWS_EXPORT_ALL_SYMBOLS";
- const char *autodef = this->Target->GetProperty(autodef_prop);
- if (autodef && *autodef)
+ if(this->Target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
{
std::string name_of_def_file =
this->Target->GetSupportDirectory();
@@ -595,7 +594,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
for(std::vector<std::string>::const_iterator i = this->Objects.begin();
i != this->Objects.end(); ++i)
{
- fout << *i << "\n";
+ if(cmHasLiteralSuffix(*i, ".obj"))
+ {
+ fout << *i << "\n";
+ }
}
for(std::vector<std::string>::const_iterator i =
this->ExternalObjects.begin();
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 4603de8..88da09b 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -489,9 +489,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
if(this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS")
&& target.GetType() == cmTarget::SHARED_LIBRARY)
{
- std::string const autodef_prop = "WINDOWS_EXPORT_ALL_SYMBOLS";
- const char *autodef = target.GetProperty(autodef_prop);
- if (autodef && *autodef)
+ if(target.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
{
std::string dllname = targetOutput;
std::string name_of_def_file
@@ -622,9 +620,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
if (target.GetType() == cmTarget::SHARED_LIBRARY &&
this->GetMakefile()->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
{
- std::string const autodef_prop = "WINDOWS_EXPORT_ALL_SYMBOLS";
- const char *autodef = target.GetProperty(autodef_prop);
- if (autodef && *autodef)
+ if(target.GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
{
std::string cmakeCommand =
this->GetLocalGenerator()->ConvertToOutputFormat(
@@ -651,7 +647,10 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
cmGeneratedFileStream fout(obj_list_file.c_str());
for(cmNinjaDeps::iterator i=objs.begin(); i != objs.end(); ++i)
{
- fout << *i << "\n";
+ if(cmHasLiteralSuffix(*i, ".obj"))
+ {
+ fout << *i << "\n";
+ }
}
}
}
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 024a1c5..57ec212 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2469,9 +2469,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
if (this->Target->GetType() == cmTarget::SHARED_LIBRARY &&
this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
{
- std::string const autodef_prop = "WINDOWS_EXPORT_ALL_SYMBOLS";
- const char *autodef = this->Target->GetProperty(autodef_prop);
- if (autodef && *autodef)
+ if (this->Target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
{
linkOptions.AddFlag("ModuleDefinitionFile", "$(IntDir)exportall.def");
}
@@ -2628,9 +2626,7 @@ cmVisualStudio10TargetGenerator::WriteEvents(std::string const& configName)
if (this->Target->GetType() == cmTarget::SHARED_LIBRARY &&
this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS"))
{
- std::string const autodef_prop = "WINDOWS_EXPORT_ALL_SYMBOLS";
- const char *autodef = this->Target->GetProperty(autodef_prop);
- if (autodef && *autodef)
+ if (this->Target->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS"))
{
addedPrelink = true;
std::vector<cmCustomCommand> commands =
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3873507a77446696877cf0043c61babf601a7a36
commit 3873507a77446696877cf0043c61babf601a7a36
Author: Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Thu Jul 2 17:46:25 2015 -0400
Commit: Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Thu Jul 2 17:46:25 2015 -0400
Add support for /bigobj format and a test for it.
diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx
index 879d9bc..48d7b7e 100644
--- a/Source/bindexplib.cxx
+++ b/Source/bindexplib.cxx
@@ -78,6 +78,23 @@
#include <fstream>
#include <iostream>
+PIMAGE_SECTION_HEADER GetSectionHeaderOffset(PIMAGE_FILE_HEADER
+ pImageFileHeader)
+{
+ return (PIMAGE_SECTION_HEADER)
+ ((DWORD_PTR)pImageFileHeader +
+ IMAGE_SIZEOF_FILE_HEADER +
+ pImageFileHeader->SizeOfOptionalHeader);
+}
+
+PIMAGE_SECTION_HEADER GetSectionHeaderOffset(ANON_OBJECT_HEADER_BIGOBJ*
+ pImageFileHeader)
+{
+ return (PIMAGE_SECTION_HEADER)
+ ((DWORD_PTR)pImageFileHeader +
+ sizeof(ANON_OBJECT_HEADER_BIGOBJ));
+}
+
/*
+ * Utility func, strstr with size
+ */
@@ -102,89 +119,121 @@ const char* StrNStr(const char* start, const char* find, size_t &size) {
return 0;
}
+template <
+ // ANON_OBJECT_HEADER_BIGOBJ or IMAGE_FILE_HEADER
+ class ObjectHeaderType,
+ // PIMAGE_SYMBOL_EX or PIMAGE_SYMBOL
+ class SymbolTableType>
+class DumpSymbols
+{
+public:
+ /*
+ *----------------------------------------------------------------------
+ * Constructor --
+ *
+ * Initialize variables from pointer to object header.
+ *
+ *----------------------------------------------------------------------
+ */
+
+ DumpSymbols(ObjectHeaderType* ih,
+ FILE* fout)
+ {
+ this->ObjectImageHeader = ih;
+ this->SymbolTable = (SymbolTableType*)
+ ((DWORD_PTR)this->ObjectImageHeader
+ + this->ObjectImageHeader->PointerToSymbolTable);
+ this->FileOut = fout;
+ this->SectionHeaders =
+ GetSectionHeaderOffset(this->ObjectImageHeader);
+ this->ImportFlag = true;
+ this->SymbolCount = this->ObjectImageHeader->NumberOfSymbols;
+ }
+
/*
*----------------------------------------------------------------------
* HaveExportedObjects --
*
- * Returns >0 if export directives (declspec(dllexport)) exist.
+ * Returns true if export directives (declspec(dllexport)) exist.
*
*----------------------------------------------------------------------
*/
-int
-HaveExportedObjects(PIMAGE_FILE_HEADER pImageFileHeader,
- PIMAGE_SECTION_HEADER pSectionHeaders)
-{
- static int fImportFlag = 0; /* The status is nor defined yet */
- WORD i;
- size_t size;
- char foundExports;
- const char * rawdata;
-
- PIMAGE_SECTION_HEADER pDirectivesSectionHeader;
- if (fImportFlag) return 1;
-
- i = 0;
- foundExports = 0;
- pDirectivesSectionHeader = 0;
- for(i = 0; (i < pImageFileHeader->NumberOfSections &&
- !pDirectivesSectionHeader); i++)
- if (!strncmp((const char*)&pSectionHeaders[i].Name[0], ".drectve",8))
+ bool HaveExportedObjects()
+ {
+ WORD i = 0;
+ size_t size = 0;
+ char foundExports = 0;
+ const char * rawdata = 0;
+ PIMAGE_SECTION_HEADER pDirectivesSectionHeader = 0;
+ PIMAGE_SECTION_HEADER pSectionHeaders = this->SectionHeaders;
+ for(i = 0; (i < this->ObjectImageHeader->NumberOfSections &&
+ !pDirectivesSectionHeader); i++)
+ if (!strncmp((const char*)&pSectionHeaders[i].Name[0], ".drectve",8))
pDirectivesSectionHeader = &pSectionHeaders[i];
- if (!pDirectivesSectionHeader) return 0;
-
- rawdata=(const char*)
- pImageFileHeader+pDirectivesSectionHeader->PointerToRawData;
- if (!pDirectivesSectionHeader->PointerToRawData || !rawdata) return 0;
-
- size = pDirectivesSectionHeader->SizeOfRawData;
- const char* posImportFlag = rawdata;
- while ((posImportFlag = StrNStr(posImportFlag, " /EXPORT:", size))) {
- const char* lookingForDict = posImportFlag + 9;
- if (!strncmp(lookingForDict, "_G__cpp_",8) ||
- !strncmp(lookingForDict, "_G__set_cpp_",12)) {
+ if (!pDirectivesSectionHeader) return 0;
+
+ rawdata=(const char*)
+ this->ObjectImageHeader+pDirectivesSectionHeader->PointerToRawData;
+ if (!pDirectivesSectionHeader->PointerToRawData || !rawdata) return 0;
+
+ size = pDirectivesSectionHeader->SizeOfRawData;
+ const char* posImportFlag = rawdata;
+ while ((posImportFlag = StrNStr(posImportFlag, " /EXPORT:", size))) {
+ const char* lookingForDict = posImportFlag + 9;
+ if (!strncmp(lookingForDict, "_G__cpp_",8) ||
+ !strncmp(lookingForDict, "_G__set_cpp_",12)) {
posImportFlag = lookingForDict;
continue;
- }
-
- const char* lookingForDATA = posImportFlag + 9;
- while (*(++lookingForDATA) && *lookingForDATA != ' ');
- lookingForDATA -= 5;
- // ignore DATA exports
- if (strncmp(lookingForDATA, ",DATA", 5)) break;
- posImportFlag = lookingForDATA + 5;
+ }
+
+ const char* lookingForDATA = posImportFlag + 9;
+ while (*(++lookingForDATA) && *lookingForDATA != ' ');
+ lookingForDATA -= 5;
+ // ignore DATA exports
+ if (strncmp(lookingForDATA, ",DATA", 5)) break;
+ posImportFlag = lookingForDATA + 5;
+ }
+ if(posImportFlag)
+ {
+ return true;
+ }
+ return false;
}
- fImportFlag = (int)posImportFlag;
- return fImportFlag;
-}
-
-
+ /*
+ *----------------------------------------------------------------------
+ * DumpObjFile --
+ *
+ * Dump an object file's exported symbols.
+ *----------------------------------------------------------------------
+ */
+ void DumpObjFile()
+ {
+ if(!HaveExportedObjects())
+ {
+ this->DumpExternalsObjects();
+ }
+ }
/*
*----------------------------------------------------------------------
-* DumpExternalsObjects --
-*
-* Dumps a COFF symbol table from an EXE or OBJ. We only use
-* it to dump tables from OBJs.
-*----------------------------------------------------------------------
-*/
-void
-DumpExternalsObjects(PIMAGE_SYMBOL pSymbolTable,
- PIMAGE_SECTION_HEADER pSectionHeaders,
- FILE *fout, DWORD_PTR cSymbols)
-{
- unsigned i;
- PSTR stringTable;
- std::string symbol;
- DWORD SectChar;
- static int fImportFlag = -1; /* The status is nor defined yet */
-
- /*
- * The string table apparently starts right after the symbol table
- */
- stringTable = (PSTR)&pSymbolTable[cSymbols];
-
- for ( i=0; i < cSymbols; i++ ) {
+ * DumpExternalsObjects --
+ *
+ * Dumps a COFF symbol table from an OBJ.
+ *----------------------------------------------------------------------
+ */
+ void DumpExternalsObjects()
+ {
+ unsigned i;
+ PSTR stringTable;
+ std::string symbol;
+ DWORD SectChar;
+ /*
+ * The string table apparently starts right after the symbol table
+ */
+ stringTable = (PSTR)&this->SymbolTable[this->SymbolCount];
+ SymbolTableType* pSymbolTable = this->SymbolTable;
+ for ( i=0; i < this->SymbolCount; i++ ) {
if (pSymbolTable->SectionNumber > 0 &&
( pSymbolTable->Type == 0x20 || pSymbolTable->Type == 0x0)) {
if (pSymbolTable->StorageClass == IMAGE_SYM_CLASS_EXTERNAL) {
@@ -209,9 +258,9 @@ DumpExternalsObjects(PIMAGE_SYMBOL pSymbolTable,
}
}
if (symbol[0] == '_') symbol.erase(0,1);
- if (fImportFlag) {
- fImportFlag = 0;
- fprintf(fout,"EXPORTS \n");
+ if (this->ImportFlag) {
+ this->ImportFlag = false;
+ fprintf(this->FileOut,"EXPORTS \n");
}
/*
Check whether it is "Scalar deleting destructor" and
@@ -228,14 +277,15 @@ DumpExternalsObjects(PIMAGE_SYMBOL pSymbolTable,
symbol.compare(0, 4, vectorPrefix) )
{
SectChar =
- pSectionHeaders[pSymbolTable->SectionNumber-1].Characteristics;
+ this->
+ SectionHeaders[pSymbolTable->SectionNumber-1].Characteristics;
if (!pSymbolTable->Type && (SectChar & IMAGE_SCN_MEM_WRITE)) {
// Read only (i.e. constants) must be excluded
- fprintf(fout, "\t%s \t DATA\n", symbol.c_str());
+ fprintf(this->FileOut, "\t%s \t DATA\n", symbol.c_str());
} else {
if ( pSymbolTable->Type ||
!(SectChar & IMAGE_SCN_MEM_READ)) {
- fprintf(fout, "\t%s\n", symbol.c_str());
+ fprintf(this->FileOut, "\t%s\n", symbol.c_str());
} else {
// printf(" strange symbol: %s \n",symbol.c_str());
}
@@ -252,11 +302,11 @@ DumpExternalsObjects(PIMAGE_SYMBOL pSymbolTable,
symbol = stringTable + pSymbolTable->N.Name.Long;
while (isspace(symbol[0])) symbol.erase(0,1);
if (symbol[0] == '_') symbol.erase(0,1);
- if (!fImportFlag) {
- fImportFlag = 1;
- fprintf(fout,"IMPORTS \n");
+ if (!this->ImportFlag) {
+ this->ImportFlag = true;
+ fprintf(this->FileOut,"IMPORTS \n");
}
- fprintf(fout, "\t%s DATA \n", symbol.c_str()+1);
+ fprintf(this->FileOut, "\t%s DATA \n", symbol.c_str()+1);
}
}
@@ -266,49 +316,17 @@ DumpExternalsObjects(PIMAGE_SYMBOL pSymbolTable,
i += pSymbolTable->NumberOfAuxSymbols;
pSymbolTable += pSymbolTable->NumberOfAuxSymbols;
pSymbolTable++;
- }
-}
-
-/*
-*----------------------------------------------------------------------
-* DumpObjFile --
-*
-* Dump an object file--either a full listing or just the exported
-* symbols.
-*----------------------------------------------------------------------
-*/
-void
-DumpObjFile(PIMAGE_FILE_HEADER pImageFileHeader, FILE *fout)
-{
- PIMAGE_SYMBOL PCOFFSymbolTable;
- PIMAGE_SECTION_HEADER PCOFFSectionHeaders;
- DWORD_PTR COFFSymbolCount;
-
- PCOFFSymbolTable = (PIMAGE_SYMBOL)
- ((DWORD_PTR)pImageFileHeader + pImageFileHeader->PointerToSymbolTable);
- COFFSymbolCount = pImageFileHeader->NumberOfSymbols;
-
- PCOFFSectionHeaders = (PIMAGE_SECTION_HEADER)
- ((DWORD_PTR)pImageFileHeader +
- IMAGE_SIZEOF_FILE_HEADER +
- pImageFileHeader->SizeOfOptionalHeader);
-
-
- int haveExports = HaveExportedObjects(pImageFileHeader,
- PCOFFSectionHeaders);
- if (!haveExports)
- DumpExternalsObjects(PCOFFSymbolTable, PCOFFSectionHeaders,
- fout, COFFSymbolCount);
-}
+ }
+ }
+private:
+ bool ImportFlag;
+ FILE* FileOut;
+ DWORD_PTR SymbolCount;
+ PIMAGE_SECTION_HEADER SectionHeaders;
+ ObjectHeaderType* ObjectImageHeader;
+ SymbolTableType* SymbolTable;
+};
-/*
-*----------------------------------------------------------------------
-* DumpFile --
-*
-* Open up a file, memory map it, and call the appropriate
-* dumping routine
-*----------------------------------------------------------------------
-*/
void
DumpFile(const char* filename, FILE *fout)
{
@@ -344,7 +362,7 @@ DumpFile(const char* filename, FILE *fout)
dosHeader = (PIMAGE_DOS_HEADER)lpFileBase;
if (dosHeader->e_magic == IMAGE_DOS_SIGNATURE) {
fprintf(stderr, "File is an executable. I don't dump those.\n");
- return;
+ exit(1); // die so build stops
}
/* Does it look like a i386 COFF OBJ file??? */
else if (
@@ -357,9 +375,24 @@ DumpFile(const char* filename, FILE *fout)
* really checking for IMAGE_FILE_HEADER.Machine == i386 (0x14C)
* and IMAGE_FILE_HEADER.SizeOfOptionalHeader == 0;
*/
- DumpObjFile((PIMAGE_FILE_HEADER) lpFileBase, fout);
+ DumpSymbols<IMAGE_FILE_HEADER, IMAGE_SYMBOL>
+ symbolDumper((PIMAGE_FILE_HEADER) lpFileBase, fout);
+ symbolDumper.DumpObjFile();
} else {
- printf("unrecognized file format\n");
+ // check for /bigobj format
+ ANON_OBJECT_HEADER_BIGOBJ* h = (ANON_OBJECT_HEADER_BIGOBJ*) lpFileBase;
+ if(h->Sig1 == 0x0 && h->Sig2 == 0xffff)
+ {
+ DumpSymbols<ANON_OBJECT_HEADER_BIGOBJ, IMAGE_SYMBOL_EX>
+ symbolDumper((ANON_OBJECT_HEADER_BIGOBJ*) lpFileBase, fout);
+ symbolDumper.DumpObjFile();
+ }
+ // if we don't know what it is die so the build will stop
+ else
+ {
+ printf("unrecognized file format abort %s\n", filename);
+ exit(1);
+ }
}
UnmapViewOfFile(lpFileBase);
CloseHandle(hFileMapping);
diff --git a/Tests/RunCMake/AutoExportDll/sub/CMakeLists.txt b/Tests/RunCMake/AutoExportDll/sub/CMakeLists.txt
index dee33e6..c0533af 100644
--- a/Tests/RunCMake/AutoExportDll/sub/CMakeLists.txt
+++ b/Tests/RunCMake/AutoExportDll/sub/CMakeLists.txt
@@ -1 +1,5 @@
+# test /bigobj for msvc
+if("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
+endif()
add_library(autoexport2 SHARED sub.cxx)
-----------------------------------------------------------------------
Summary of changes:
Source/bindexplib.cxx | 279 +++++++++++++----------
Source/cmGlobalVisualStudioGenerator.cxx | 6 +-
Source/cmLocalVisualStudio7Generator.cxx | 8 +-
Source/cmMakefileLibraryTargetGenerator.cxx | 10 +-
Source/cmNinjaNormalTargetGenerator.cxx | 13 +-
Source/cmVisualStudio10TargetGenerator.cxx | 8 +-
Tests/RunCMake/AutoExportDll/sub/CMakeLists.txt | 4 +
7 files changed, 181 insertions(+), 147 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list