set_target_properties
の値に改行等を含む文字列が渡されると、次のようなメッセージと共に失敗する不正なmakefileが生成される事がある。
src/CMakeFiles/awesometarget.dir/build.make:91: : *** missing separator. Stop.
改行を変数中から取り除く方法にはSTRIP
string operationで取り除ける:
https://cmake.org/cmake/help/latest/command/string.html#strip
execute_process
から文字列を得ている場合はOUTPUT_STRIP_TRAILING_WHITESPACE
で取り除ける:
https://cmake.org/cmake/help/latest/command/execute_process.html