<div dir="ltr"><div><br></div><div>M:/tmp/cmake_cmp0065/CMakeLists.txt(1):  cmake_minimum_required(VERSION 3.0 )</div><div>M:/tmp/cmake_cmp0065/CMakeLists.txt(2):  project(cmake-test )<br></div><div>M:/tmp/cmake_cmp0065/CMakeLists.txt(3):  add_executable(myExe main.c )<br></div><div><div>M:/tmp/cmake_cmp0065/CMakeLists.txt(4):  target_compile_definitions(myExe PRIVATE MY_DEFINITION )<br></div><div>M:/tmp/cmake_cmp0065/CMakeLists.txt(5):  target_compile_definitions(myExe PRIVATE VERSION_STRING="0.8.15" )<br></div><div>M:/tmp/cmake_cmp0065/CMakeLists.txt(6):  set(project myExe )<br></div><div><br></div><div>-- Configuring done<br></div><div>CMake Warning (dev) in CMakeLists.txt:<br></div><div>  Policy CMP0065 is not set: Do not add flags to export symbols from<br></div><div>  executables without the ENABLE_EXPORTS target property.  Run "cmake<br></div><div>  --help-policy CMP0065" for policy details.  Use the cmake_policy command to<br></div><div>  set the policy and suppress this warning.<br></div><div><br></div><div>  For compatibility with older versions of CMake, additional flags may be<br></div><div>  added to export symbols on all executables regardless of thier<br></div><div>  ENABLE_EXPORTS property.<br></div><div>This warning is for project developers.  Use -Wno-dev to suppress it.<br></div><div><br></div><div>-- Generating done<br></div><div>-- Build files have been written to: M:/tmp/cmake_cmp0065/build<br></div><div><br></div></div><div>---------------</div><div>you have cmake_minimum_required(VERSION 3.5 ) in your example... setting 3.0 instead and adding --trace shows the warning...<br></div><div><br></div><div>-----</div><div>then command you said to use is doing exactly the same thing I'm doing to the same target property... of course it should generate the same result.... and it does.</div><div><br></div><div><br></div></div>