[CMake] cmp0065

David Cole DLRdave at aol.com
Wed Jul 6 22:18:15 EDT 2016


Seems like you ought to be able to avoid this warning just by setting
ENABLE_EXPORTS to 0 or 1 ... If you're going to require 3.0, then use 3.0.
If you're going to use 3.5, then add the property to squelch the warning
and get the behavior you want.


D


On Wednesday, July 6, 2016, J Decker <d3ck0r at gmail.com> wrote:

>
> M:/tmp/cmake_cmp0065/CMakeLists.txt(1):  cmake_minimum_required(VERSION
> 3.0 )
> M:/tmp/cmake_cmp0065/CMakeLists.txt(2):  project(cmake-test )
> M:/tmp/cmake_cmp0065/CMakeLists.txt(3):  add_executable(myExe main.c )
> M:/tmp/cmake_cmp0065/CMakeLists.txt(4):  target_compile_definitions(myExe
> PRIVATE MY_DEFINITION )
> M:/tmp/cmake_cmp0065/CMakeLists.txt(5):  target_compile_definitions(myExe
> PRIVATE VERSION_STRING="0.8.15" )
> M:/tmp/cmake_cmp0065/CMakeLists.txt(6):  set(project myExe )
>
> -- Configuring done
> CMake Warning (dev) in CMakeLists.txt:
>   Policy CMP0065 is not set: Do not add flags to export symbols from
>   executables without the ENABLE_EXPORTS target property.  Run "cmake
>   --help-policy CMP0065" for policy details.  Use the cmake_policy command
> to
>   set the policy and suppress this warning.
>
>   For compatibility with older versions of CMake, additional flags may be
>   added to export symbols on all executables regardless of thier
>   ENABLE_EXPORTS property.
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> -- Generating done
> -- Build files have been written to: M:/tmp/cmake_cmp0065/build
>
> ---------------
> you have cmake_minimum_required(VERSION 3.5 ) in your example... setting
> 3.0 instead and adding --trace shows the warning...
>
> -----
> 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.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160706/6883abe1/attachment.html>


More information about the CMake mailing list