From 678bccc64bf2104def5de610fb14447439fb4704 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 19 Nov 2007 14:22:38 -0500 Subject: COMP: Do not build VS-specific code when generators are not included. --- Source/cmake.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index e85b94a..f14bb56 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -68,6 +68,7 @@ # include "cmGlobalBorlandMakefileGenerator.h" # include "cmGlobalNMakeMakefileGenerator.h" # include "cmGlobalWatcomWMakeGenerator.h" +# define CMAKE_HAVE_VS_GENERATORS # endif # include "cmGlobalMSYSMakefileGenerator.h" # include "cmGlobalMinGWMakefileGenerator.h" @@ -530,10 +531,12 @@ void cmake::SetArgs(const std::vector& args) { this->CheckStampFile = args[++i]; } +#if defined(CMAKE_HAVE_VS_GENERATORS) else if((i < args.size()-1) && (arg.find("--vs-solution-file",0) == 0)) { this->VSSolutionFile = args[++i]; } +#endif else if(arg.find("-V",0) == 0) { this->Verbose = true; @@ -2103,6 +2106,7 @@ int cmake::Run(const std::vector& args, bool noconfigure) int ret = this->Configure(); if (ret || this->ScriptMode) { +#if defined(CMAKE_HAVE_VS_GENERATORS) if(!this->VSSolutionFile.empty() && this->GlobalGenerator) { // CMake is running to regenerate a Visual Studio build tree @@ -2117,6 +2121,7 @@ int cmake::Run(const std::vector& args, bool noconfigure) gg->CallVisualStudioMacro(cmGlobalVisualStudioGenerator::MacroStop, this->VSSolutionFile.c_str()); } +#endif return ret; } ret = this->Generate(); -- cgit v0.12