diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 29165f825..11a962747 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -44,6 +44,16 @@ private: extern cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[]; +static void cmConvertToWindowsSlash(std::string& s) +{ + std::string::size_type pos = 0; + while((pos = s.find('/', pos)) != std::string::npos) + { + s[pos] = '\\'; + pos++; + } +} + //---------------------------------------------------------------------------- cmLocalVisualStudio7Generator::cmLocalVisualStudio7Generator(VSVersion v): cmLocalVisualStudioGenerator(v) @@ -862,6 +872,31 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, } } fout << "/>\n"; // end of IsMasmEnabled() && !this->FortranProject) + { + Options masmOptions(this, Options::MasmCompiler, 0, 0); + fout << + "\t\t\tEscapeForXML(inc); + sep = ";"; + } + fout << "\"\n"; + // Use same preprocessor definitions as VCCLCompilerTool. + targetOptions.OutputPreprocessorDefinitions(fout, "\t\t\t\t", "\n", + "ASM_MASM"); + masmOptions.OutputFlagMap(fout, "\t\t\t\t"); + fout << + "\t\t\t\tObjectFile=\"$(IntDir)\\\"\n" + "\t\t\t/>\n"; + } tool = "VCCustomBuildTool"; if(this->FortranProject) { @@ -1700,6 +1735,7 @@ bool cmLocalVisualStudio7Generator { aCompilerTool = "VFFortranCompilerTool"; } + std::string const& lang = (*sf)->GetLanguage(); std::string ext = (*sf)->GetExtension(); ext = cmSystemTools::LowerCase(ext); if(ext == "idl") @@ -1727,6 +1763,11 @@ bool cmLocalVisualStudio7Generator aCompilerTool = "VFCustomBuildTool"; } } + if (gg->IsMasmEnabled() && !this->FortranProject && + lang == "ASM_MASM") + { + aCompilerTool = "MASM"; + } for(std::map::const_iterator fci = fcinfo.FileConfigMap.begin(); fci != fcinfo.FileConfigMap.end(); ++fci) @@ -2095,6 +2136,16 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout, << "\t\n" << "\t\tGetPlatformName() << "\"/>\n" << "\t\n"; + if(gg->IsMasmEnabled()) + { + fout << + "\t\n" + "\t\t\n" + "\t\n" + ; + } } diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index f237f21c9..7aa31ccbf 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1680,7 +1680,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endif() if(MSVC AND NOT MSVC_VERSION LESS 1310 - AND NOT CMAKE_GENERATOR MATCHES "Visual Studio [6789]( |$)") + AND NOT CMAKE_GENERATOR MATCHES "Visual Studio [67]( |$)" + AND (NOT CMAKE_GENERATOR MATCHES "Visual Studio [89]( |$)" + OR CMAKE_SIZEOF_VOID_P EQUAL 4) + ) ADD_TEST_MACRO(VSMASM VSMASM) endif()