Commit ba89db4b authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: check in fixes from main tree to create 2.4.7 RC 5

parent 8ec0385e
......@@ -7,7 +7,7 @@ SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 4)
SET(CMake_VERSION_PATCH 7)
# for an actual release this should not be defined
SET(CMake_VERSION_RC 4)
SET(CMake_VERSION_RC 5)
SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}")
......@@ -432,3 +432,45 @@ CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/Templates/CTestScript.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/CTestScript.cmake"
@ONLY IMMEDIATE)
# Testing
IF (NOT DART_ROOT)
SET(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM})
ENDIF (NOT DART_ROOT)
IF(BUILD_TESTING)
SET(CMAKE_TEST_GENERATOR "" CACHE STRING "Generator used when running tests")
SET(CMAKE_TEST_MAKEPROGRAM "" CACHE FILEPATH "Generator used when running tests")
IF(NOT CMAKE_TEST_GENERATOR)
SET(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}")
SET(CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}")
ELSE(NOT CMAKE_TEST_GENERATOR)
SET(CMAKE_TEST_DIFFERENT_GENERATOR TRUE)
ENDIF(NOT CMAKE_TEST_GENERATOR)
# Are we testing with the MSVC compiler?
SET(CMAKE_TEST_MSVC 0)
IF(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
SET(CMAKE_TEST_MSVC 1)
ELSE(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
IF("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR
"${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio")
SET(CMAKE_TEST_MSVC 1)
ENDIF("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR
"${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio")
ENDIF(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
SET(CMAKE_TEST_SYSTEM_LIBRARIES 0)
FOREACH(util CURL EXPAT XMLRPC ZLIB)
IF(CMAKE_USE_SYSTEM_${util})
SET(CMAKE_TEST_SYSTEM_LIBRARIES 1)
ENDIF(CMAKE_USE_SYSTEM_${util})
ENDFOREACH(util)
# This variable is set by cmake, however to
# test cmake we want to make sure that
# the ctest from this cmake is used for testing
# and not the ctest from the cmake building and testing
# cmake.
SET(CMAKE_CTEST_COMMAND "${EXECUTABLE_OUTPUT_PATH}/ctest")
SET(CMAKE_CMAKE_COMMAND "${EXECUTABLE_OUTPUT_PATH}/cmake")
ENDIF(BUILD_TESTING)
Changes in CMake 2.4.7
* Fix for bug# 4423, LANGUAGE property now works in VS IDE
* Fix for RUN_TESTS running the tests twice in VS IDE
* Do not create import libraries for modules on borland
* Fix for FILE(RELATIVE_PATH) # 4482
* Fix for apple lack of support for isystem flag
* Fix for Borland skipping make rules with no depends
* Fix for bug #4423 set source file properties LANGUAGE not always working
* Fix for bug #4462 isystem not supported on OSX
* Fix bug in save of resize of CMakeSetup
* Fix for @@ in file names
* Fix for if command scope issues
......@@ -297,7 +316,7 @@ default.
* Add target/fast rules in the sub directories
* Fix Visual stuido C and C++ targets to not add /TP and /TC
* Fix Visual studio C and C++ targets to not add /TP and /TC
* print a context when cmake errors occur
......
......@@ -26,23 +26,27 @@ SET(CMAKE_FIND_LIBRARY_SUFFIXES "-bcc.lib" ".lib")
# Borland cannot handle + in the file name, so mangle object file name
SET (CMAKE_MANGLE_OBJECT_FILE_NAMES "ON")
# create a shared C++ library
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
# Create a C++ module library.
SET(CMAKE_CXX_CREATE_SHARED_MODULE
"<CMAKE_CXX_COMPILER> ${CMAKE_START_TEMP_FILE}-e<TARGET> -tWD <LINK_FLAGS> -tWR <LINK_LIBRARIES> <OBJECTS>${CMAKE_END_TEMP_FILE}"
"implib -c -w <TARGET_IMPLIB> <TARGET>"
)
SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
# Create a C++ shared library.
# First create a module and then its import library.
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_MODULE}
"implib -c -w <TARGET_IMPLIB> <TARGET>"
)
# create a C shared library
SET(CMAKE_C_CREATE_SHARED_LIBRARY
# Create a C module library.
SET(CMAKE_C_CREATE_SHARED_MODULE
"<CMAKE_C_COMPILER> ${CMAKE_START_TEMP_FILE}-e<TARGET> -tWD <LINK_FLAGS> -tWR <LINK_LIBRARIES> <OBJECTS>${CMAKE_END_TEMP_FILE}"
"implib -c -w <TARGET_IMPLIB> <TARGET>"
)
# create a C shared module just copy the shared library rule
SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY})
# Create a C shared library.
# First create a module and then its import library.
SET(CMAKE_C_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_MODULE}
"implib -c -w <TARGET_IMPLIB> <TARGET>"
)
# create a C++ static library
SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "tlib ${CMAKE_START_TEMP_FILE}/p512 <LINK_FLAGS> /a <TARGET_QUOTED> <OBJECTS_QUOTED>${CMAKE_END_TEMP_FILE}")
......
......@@ -6,7 +6,9 @@ IF(CMAKE_COMPILER_IS_GNUCC)
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
SET (CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
IF(NOT APPLE)
SET (CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
ENDIF(NOT APPLE)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
IF(CMAKE_COMPILER_IS_GNUCXX)
......@@ -17,6 +19,8 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
SET (CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
IF(NOT APPLE)
SET (CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
ENDIF(NOT APPLE)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
......@@ -345,34 +345,17 @@ IF (NOT DART_ROOT)
ENDIF (NOT DART_ROOT)
IF(BUILD_TESTING)
SET(CMAKE_TEST_GENERATOR "" CACHE STRING "Generator used when running tests")
SET(CMAKE_TEST_MAKEPROGRAM "" CACHE FILEPATH "Generator used when running tests")
IF(NOT CMAKE_TEST_GENERATOR)
SET(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}")
SET(CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}")
ELSE(NOT CMAKE_TEST_GENERATOR)
SET(CMAKE_TEST_DIFFERENT_GENERATOR TRUE)
ENDIF(NOT CMAKE_TEST_GENERATOR)
SET(CMAKE_TEST_SYSTEM_LIBRARIES 0)
FOREACH(util CURL EXPAT XMLRPC ZLIB)
IF(CMAKE_USE_SYSTEM_${util})
SET(CMAKE_TEST_SYSTEM_LIBRARIES 1)
ENDIF(CMAKE_USE_SYSTEM_${util})
ENDFOREACH(util)
# This variable is set by cmake, however to
# test cmake we want to make sure that
# the ctest from this cmake is used for testing
# and not the ctest from the cmake building and testing
# cmake.
SET(CMAKE_CTEST_COMMAND "${EXECUTABLE_OUTPUT_PATH}/ctest")
SET(CMAKE_CMAKE_COMMAND "${EXECUTABLE_OUTPUT_PATH}/cmake")
# Should the long tests be run?
OPTION(CMAKE_RUN_LONG_TESTS "Should the long tests be run (such as Bootstrap)." ON)
MARK_AS_ADVANCED(CMAKE_RUN_LONG_TESTS)
IF (CMAKE_RUN_LONG_TESTS)
OPTION(CTEST_TEST_CTEST
"Should the tests that run a full sub ctest process be run?"
OFF)
MARK_AS_ADVANCED(CTEST_TEST_CTEST)
ENDIF (CMAKE_RUN_LONG_TESTS)
ADD_TEST(CommandLineTest ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/CommandLineTest"
......@@ -665,6 +648,27 @@ IF(BUILD_TESTING)
-DCMAKE_TEST_SYSTEM_LIBRARIES:BOOL=${CMAKE_TEST_SYSTEM_LIBRARIES}
--test-command complex)
ADD_TEST(SetLang ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/SetLang"
"${CMake_BINARY_DIR}/Tests/SetLang"
--build-two-config
--build-generator ${CMAKE_TEST_GENERATOR}
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project SetLang
--test-command bar)
# ADD_TEST(ConvLibrary ${CMAKE_CTEST_COMMAND}
# --build-and-test
# "${CMake_SOURCE_DIR}/Tests/ConvLibrary"
# "${CMake_BINARY_DIR}/Tests/ConvLibrary"
# --build-two-config
# --build-generator ${CMAKE_TEST_GENERATOR}
# --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
# --build-project ConvLibrary
# --test-command bartest)
# ADD_TEST(complexRelativePaths ${CMAKE_CTEST_COMMAND}
# --build-and-test
# "${CMake_SOURCE_DIR}/Tests/ComplexRelativePaths"
......@@ -988,6 +992,18 @@ IF(BUILD_TESTING)
)
ENDIF (WIN32)
IF(CMAKE_TEST_MSVC)
ADD_TEST(PrecompiledHeader ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/PrecompiledHeader"
"${CMake_BINARY_DIR}/Tests/PrecompiledHeader"
--build-generator ${CMAKE_TEST_GENERATOR}
--build-project PrecompiledHeader
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--test-command foo)
ENDIF(CMAKE_TEST_MSVC)
IF("${CMAKE_TEST_GENERATOR}" MATCHES "Makefile")
ADD_TEST(MakeClean ${CMAKE_CTEST_COMMAND}
--build-and-test
......
......@@ -427,7 +427,7 @@ void CMakeSetupDialog::SaveToRegistry()
// write the size of the dialog
CRect size;
this->GetClientRect(&size);
this->GetWindowRect(&size);
unsigned long width = size.Width();
unsigned long height = size.Height();
RegSetValueEx(hKey, _T("Width"), 0, REG_DWORD,
......
......@@ -104,7 +104,7 @@ public:
"MAKE_DIRECTORY will create a directory at the specified location\n"
"RELATIVE_PATH will determine relative path from directory to the given"
" file.\n"
"TO_CMAKE_PATH will convert path into a cmake sytle path with unix /. "
"TO_CMAKE_PATH will convert path into a cmake style path with unix /. "
" The input can be a single path or a system path like \"$ENV{PATH}\". "
" Note the double quotes around the ENV call TO_CMAKE_PATH only takes "
" one argument.\n"
......
......@@ -1276,83 +1276,6 @@ void cmGlobalGenerator::SetCMakeInstance(cmake* cm)
this->CMakeInstance = cm;
}
void cmGlobalGenerator::SetupTests()
{
std::string ctest = this->LocalGenerators[0]->GetMakefile()->
GetRequiredDefinition("CMAKE_COMMAND");
ctest = removeQuotes(ctest);
ctest = cmSystemTools::GetFilenamePath(ctest.c_str());
ctest += "/";
ctest += "ctest";
ctest += cmSystemTools::GetExecutableExtension();
if(!cmSystemTools::FileExists(ctest.c_str()))
{
ctest = this->LocalGenerators[0]->GetMakefile()->
GetRequiredDefinition("CMAKE_COMMAND");
ctest = cmSystemTools::GetFilenamePath(ctest.c_str());
ctest += "/Debug/";
ctest += "ctest";
ctest += cmSystemTools::GetExecutableExtension();
}
if(!cmSystemTools::FileExists(ctest.c_str()))
{
ctest = this->LocalGenerators[0]->GetMakefile()->
GetRequiredDefinition("CMAKE_COMMAND");
ctest = cmSystemTools::GetFilenamePath(ctest.c_str());
ctest += "/Release/";
ctest += "ctest";
ctest += cmSystemTools::GetExecutableExtension();
}
// if we found ctest
if (cmSystemTools::FileExists(ctest.c_str()))
{
// Create a full path filename for output Testfile
std::string fname;
fname = this->CMakeInstance->GetStartOutputDirectory();
fname += "/";
if ( this->LocalGenerators[0]->GetMakefile()->IsSet("CTEST_NEW_FORMAT") )
{
fname += "CTestTestfile.txt";
}
else
{
fname += "DartTestfile.txt";
}
// Add run_test only if any tests are foun
size_t total_tests = 0;
size_t i;
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
total_tests +=
this->LocalGenerators[i]->GetMakefile()->GetTests()->size();
}
// If the file doesn't exist, then ENABLE_TESTING hasn't been run
if (total_tests > 0)
{
const char* no_working_dir = 0;
std::vector<std::string> no_depends;
std::map<cmStdString, std::vector<cmLocalGenerator*> >::iterator it;
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
{
std::vector<cmLocalGenerator*>& gen = it->second;
// add the RUN_TESTS to the first local generator of each project
if(gen.size())
{
cmMakefile* mf = gen[0]->GetMakefile();
if(const char* outDir = mf->GetDefinition("CMAKE_CFG_INTDIR"))
{
mf->AddUtilityCommand("RUN_TESTS", false, no_depends,
no_working_dir,
ctest.c_str(), "-C", outDir);
}
}
}
}
}
}
void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
{
cmMakefile* mf = this->LocalGenerators[0]->GetMakefile();
......
......@@ -210,8 +210,6 @@ protected:
void ConfigureRelativePaths();
bool RelativePathsConfigured;
void SetupTests();
void CreateDefaultGlobalTargets(cmTargets* targets);
cmTarget CreateGlobalTarget(const char* name, const char* message,
const cmCustomCommandLines* commandLines,
......
......@@ -178,9 +178,6 @@ void cmGlobalVisualStudio6Generator::Generate()
}
}
// add the Run Tests command
this->SetupTests();
// first do the superclass method
this->cmGlobalGenerator::Generate();
......
......@@ -35,6 +35,7 @@ cmLocalGenerator *cmGlobalVisualStudio71Generator::CreateLocalGenerator()
{
cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
lg->SetVersion71();
lg->SetExtraFlagTable(this->GetExtraFlagTableVS7());
lg->SetGlobalGenerator(this);
return lg;
}
......
......@@ -138,7 +138,8 @@ std::string cmGlobalVisualStudio7Generator
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalVisualStudio7Generator::CreateLocalGenerator()
{
cmLocalGenerator *lg = new cmLocalVisualStudio7Generator;
cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
lg->SetExtraFlagTable(this->GetExtraFlagTableVS7());
lg->SetGlobalGenerator(this);
return lg;
}
......@@ -235,9 +236,6 @@ void cmGlobalVisualStudio7Generator::Generate()
}
}
// add the Run Tests command
this->SetupTests();
// first do the superclass method
this->cmGlobalGenerator::Generate();
......@@ -824,3 +822,24 @@ bool cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(const char* project,
// default is to be part of the build
return true;
}
//----------------------------------------------------------------------------
static cmVS7FlagTable cmVS7ExtraFlagTable[] =
{
// Precompiled header and related options. Note that the
// UsePrecompiledHeader entries are marked as "Continue" so that the
// corresponding PrecompiledHeaderThrough entry can be found.
{"UsePrecompiledHeader", "YX", "Automatically Generate", "2",
cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"PrecompiledHeaderThrough", "YX", "Precompiled Header Name", "",
cmVS7FlagTable::UserValueRequired},
{"UsePrecompiledHeader", "Yu", "Use Precompiled Header", "3",
cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"PrecompiledHeaderThrough", "Yu", "Precompiled Header Name", "",
cmVS7FlagTable::UserValueRequired},
{0,0,0,0,0}
};
cmVS7FlagTable const* cmGlobalVisualStudio7Generator::GetExtraFlagTableVS7()
{
return cmVS7ExtraFlagTable;
}
......@@ -20,6 +20,7 @@
#include "cmGlobalGenerator.h"
class cmTarget;
struct cmVS7FlagTable;
/** \class cmGlobalVisualStudio7Generator
* \brief Write a Unix makefiles.
......@@ -97,6 +98,7 @@ public:
virtual const char* GetCMakeCFGInitDirectory() { return "$(OutDir)"; }
protected:
static cmVS7FlagTable const* GetExtraFlagTableVS7();
virtual void OutputSLNFile(cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators);
virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root,
......
......@@ -36,6 +36,7 @@ cmLocalGenerator *cmGlobalVisualStudio8Generator::CreateLocalGenerator()
{
cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
lg->SetVersion8();
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
lg->SetGlobalGenerator(this);
return lg;
}
......@@ -245,3 +246,21 @@ cmGlobalVisualStudio8Generator
}
}
}
//----------------------------------------------------------------------------
static cmVS7FlagTable cmVS8ExtraFlagTable[] =
{
// Precompiled header and related options. Note that the
// UsePrecompiledHeader entries are marked as "Continue" so that the
// corresponding PrecompiledHeaderThrough entry can be found.
{"UsePrecompiledHeader", "Yu", "Use Precompiled Header", "2",
cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"PrecompiledHeaderThrough", "Yu", "Precompiled Header Name", "",
cmVS7FlagTable::UserValueRequired},
// There is no YX option in the VS8 IDE.
{0,0,0,0,0}
};
cmVS7FlagTable const* cmGlobalVisualStudio8Generator::GetExtraFlagTableVS8()
{
return cmVS8ExtraFlagTable;
}
......@@ -50,6 +50,7 @@ public:
virtual void Configure();
virtual void Generate();
protected:
static cmVS7FlagTable const* GetExtraFlagTableVS8();
virtual void AddPlatformDefinitions(cmMakefile* mf);
virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators);
......
......@@ -33,6 +33,7 @@ cmLocalGenerator *cmGlobalVisualStudio8Win64Generator::CreateLocalGenerator()
cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator;
lg->SetVersion8();
lg->SetPlatformName(this->PlatformName.c_str());
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
lg->SetGlobalGenerator(this);
return lg;
}
......
......@@ -2286,6 +2286,16 @@ cmLocalGenerator::GetObjectFileNameWithoutTarget(const cmSourceFile& source)
objectName = relFromSource;
}
}
// if it is still a full path check for the try compile case
// try compile never have in source sources, and should not
// have conflicting source file names in the same target
if(cmSystemTools::FileIsFullPath(objectName.c_str()))
{
if(this->GetGlobalGenerator()->GetCMakeInstance()->GetIsInTryCompile())
{
objectName = cmSystemTools::GetFilenameName(source.GetFullPath());
}
}
// Replace the original source file extension with the object file
// extension.
......
......@@ -741,6 +741,16 @@ cmLocalUnixMakefileGenerator3
no_commands, false);
}
// Work-around for makes that drop rules that have no dependencies
// or commands.
cmGlobalUnixMakefileGenerator3* gg =
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
std::string hack = gg->GetEmptyRuleHackDepends();
if(!hack.empty())
{
no_depends.push_back(hack);
}
// Special symbolic target that never exists to force dependers to
// run their rules.
this->WriteMakeRule
......
......@@ -421,13 +421,17 @@ void cmLocalVisualStudio6Generator
compileFlags += cflags;
}
const char* lang = this->GlobalGenerator->
GetLanguageFromExtension((*sf)->GetSourceExtension().c_str());
const char* lang = this->GetSourceFileLanguage(*(*sf));
if(lang && strcmp(lang, "CXX") == 0)
{
// force a C++ file type
compileFlags += " /TP ";
}
else if(strcmp(lang, "C") == 0)
{
// force to c file type
compileFlags += " /TC ";
}
// Check for extra object-file dependencies.
const char* dependsValue = (*sf)->GetProperty("OBJECT_DEPENDS");
......
......@@ -28,11 +28,14 @@
#include <ctype.h> // for isspace
extern cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[];
//----------------------------------------------------------------------------
cmLocalVisualStudio7Generator::cmLocalVisualStudio7Generator()
{
this->Version = 7;
this->PlatformName = "Win32";
this->ExtraFlagTable = 0;
}
cmLocalVisualStudio7Generator::~cmLocalVisualStudio7Generator()
......@@ -284,26 +287,6 @@ void cmLocalVisualStudio7Generator::WriteConfigurations(std::ostream& fout,
fout << "\t</Configurations>\n";
}
// This is a table mapping XML tag IDE names to command line options
struct cmVS7FlagTable
{
const char* IDEName; // name used in the IDE xml file
const char* commandFlag; // command line flag
const char* comment; // comment
const char* value; // string value
unsigned int special; // flags for special handling requests
enum
{
UserValue = (1<<0), // flag contains a user-specified value
UserIgnored = (1<<1), // ignore any user value
UserRequired = (1<<2), // match only when user value is non-empty
Continue = (1<<3), // continue looking for matching entries
UserValueIgnored = UserValue | UserIgnored,
UserValueRequired = UserValue | UserRequired
};
};
// fill the table here currently the comment field is not used for
// anything other than documentation NOTE: Make sure the longer
// commandFlag comes FIRST!
......@@ -363,16 +346,10 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] =
cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"PrecompiledHeaderThrough", "Yc", "Precompiled Header Name", "",
cmVS7FlagTable::UserValueRequired},
{"UsePrecompiledHeader", "YX", "Automatically Generate", "2",
cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"PrecompiledHeaderThrough", "YX", "Precompiled Header Name", "",
cmVS7FlagTable::UserValueRequired},
{"UsePrecompiledHeader", "Yu", "Use Precompiled Header", "3",
cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"PrecompiledHeaderThrough", "Yu", "Precompiled Header Name", "",
cmVS7FlagTable::UserValueRequired},
{"PrecompiledHeaderFile", "Fp", "Generated Precompiled Header", "",
cmVS7FlagTable::UserValue},
// The YX and Yu options are in a per-global-generator table because
// their values differ based on the VS IDE version.
{"ForcedIncludeFiles", "FI", "Forced include files", "",
cmVS7FlagTable::UserValueRequired},
......@@ -424,7 +401,8 @@ public:
Compiler,
Linker
};
cmLocalVisualStudio7GeneratorOptions(Tool tool);
cmLocalVisualStudio7GeneratorOptions(Tool tool,
cmVS7FlagTable const* extraTable = 0);
// Store options from command line flags.
void Parse(const char* flags);
......@@ -441,7 +419,6 @@ public:
// Check for specific options.
bool UsingUnicode();
bool UsingDebugPDB();
// Write options to output.
void OutputPreprocessorDefinitions(std::ostream& fout,
......@@ -470,7 +447,10 @@ private:
bool DoingDefine;