From f0b8cecf9d17ed596f26b78f9298c28c6b27b5df Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Fri, 10 Jun 2005 10:08:41 -0400 Subject: [PATCH] ENH: allow libs with no sources but complain --- Source/cmAddLibraryCommand.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 9af872c11..f363b933e 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -60,8 +60,11 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args) if (s == args.end()) { - this->SetError("called with incorrect number of arguments, no sources provided"); - return false; + std::string msg = "You have called ADD_LIBRARY for library "; + msg += args[0]; + msg += " without any source files. This typically indicates a problem "; + msg += "with your CMakeLists.txt file"; + cmSystemTools::Message(msg.c_str() ,"Warning"); } std::vector srclists;