0

My cmake file looks like this. I want to uncomment the lines 1 through 100 with a single shortcut

#line1
#line2
#line3
.
.
.
#line100

build(a_library
USING
b
c)
johnson
  • 1
  • 2
  • 1
    Does this answer your question? [Commenting code in Notepad++](https://stackoverflow.com/questions/1022261/commenting-code-in-notepad) Commenting and un-commenting CMake code is no different from other languages in Notepad++. Just use the **CTRL + SHIFT + K** keyboard shortcut. – Kevin Aug 26 '20 at 16:05

1 Answers1

0
if(FALSE) # fake a block comment

endif()

Note that this works well for commenting out a block of valid CMake code, it doesn't allow you write plain text within the if block

As of CMake 3.0 there is a special syntax for block comments which start with #[[ and ends with ]] at the end of block comment.

Taoufik
  • 482
  • 5
  • 13
  • This is working for me, what I did was for commenting `if(FALSE) # fake a block comment endif()`. And for uncomment `if(TRUE) # fake a block comment endif()` – johnson Aug 27 '20 at 05:45