View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001788CMakepublic2005-04-22 06:352006-10-11 12:06
ReporterFliipe Sousa 
Assigned ToKen Martin 
PrioritylowSeverityfeatureReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001788: MESSAGE without new lines
DescriptionI'm used to autotools and I like to see status messages when I run cmake. I use MESSAGE()
to notify the user if the library and other things was found or not. Right know, I'm writting
my scripts like this:

MESSAGE(STATUS "Checking for mylib --")
FIND_LIBRARY(MY_LIB ...)
IF (MY_LIB)
  MESSAGE(STATUS "Checking for mylib -- found")
ELSE(MY_LIB)
  MESSAGE(STATUS "Checking for mylib -- not found")
ENDIF(MY_LIB)

that outputs:

-- Checking for mylib --
-- Checking for mylib -- found

A better way, IMHO would be

MESSAGE(STATUS "Checking for mylib -- ")
FIND_LIBRARY(MY_LIB ...)
IF (MY_LIB)
  MESSAGE(STATUS "found\n")
ELSE(MY_LIB)
  MESSAGE(STATUS "not found\n")
ENDIF(MY_LIB)

-- Checking for mylib -- found

if there was an option in MESSAGE that could do that
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0005179)
Brad King (manager)
2006-10-04 14:46

I'm assigning this to Ken because he wrote the MESSAGE and status reporting callback stuff.

IMO the double-message is good because if something goes wrong you see what it was doing and the shell prompt can never cover the message in a tty.
(0005338)
Ken Martin (developer)
2006-10-11 12:06

OK I have implemented this but I'm not sure it is worth it. The way the code is organized makes this a little messy but not a huge deal. The bigger issue is that with some of the GUIs "no new line" really impacts not the current message but rather the next message. e.g. for a dialog, no new line means that the next message needs to get the current text and then concatenate the message to it and then set it. This means that the GUI has to store state on if the prior message had a newline. Given that even with text output, other text could be dumped between the two MESSAGE calls my take is to not check this in. So I am marking this as closed.

 Issue History
Date Modified Username Field Change


Copyright © 2000 - 2018 MantisBT Team