add_custom_command not possible pass semicolon ";" symbol to COMMAND
cmake version 3.23.1 windows 10 pro x64 visual studio 2019 16.11.9
cmake_minimum_required(VERSION 3.23)
project(testCmake)
set(EE "echo generated_data; > gen.h")
add_custom_command( OUTPUT gen.h
COMMAND ${EE} )
add_executable(server main.cpp gen.h)
when try to build - got error
Generating gen.h
'"echo generated_data"' is not recognized as an internal or external command,
operable program or batch file.
how to correctly escape semicolon symbol?
i also try $<SEMICOLON>
instead symbol
i also try VERBATIM
option in add_custom_command - not help
PS: in real situation i try to call java program and it need ;
as separator for CLASSPATH
Edited by Aleksandr Udovenko