[CMake] WIN32_EXECUTABLE property with generator expression

Surya Kiran Gullapalli suryakiran.gullapalli at gmail.com
Sun May 13 07:12:17 EDT 2018


With Cmake-3.11.1 and Visual Studio 2017 generator, I'm trying to set
WIN32_EXECUTABLE property on executable only for release mode with
generator expression like this

set_target_properties(target PROPERTIES WIN32_EXECUTABLE $<CONFIG:Release>)

The generator expression doesn't seem to be working as I see
/SUBSYSTEM:CONSOLE link flag for both Debug and Release configurations.

set_target_properties(target PROPERTIES WIN32_EXECUTABLE 1)  is working
though.

Please help.
Thanks,
Surya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180513/e72836f4/attachment.html>


More information about the CMake mailing list