The following CMakeLists.txt:
cmake_minimum_required(VERSION 3.30)
project(ProjectName)
set(F "Test with spaces and (parens)")
add_custom_target(t ALL COMMAND doit ${F})
Generate the folloing command line:
doit Test\ with\ spaces\ and\ (parens)
As we can see, spaces are correctly escaped, but not the parentheses? Why is that so?