[CMake] Problems with CMP0037

Erik de Castro Lopo mle+tools at mega-nerd.com
Sun Nov 2 00:55:25 EDT 2014


Hi,

I'm a project maintainer. I just upgraded to CMake 3.0.2 and now I'm
getting this:

  CMake Warning (dev) at CMakeLists.txt:284 (add_executable):
    Policy CMP0037 is not set: Target names should not be reserved and should
    match a validity pattern.  Run "cmake --help-policy CMP0037" for policy
    details.  Use the cmake_policy command to set the policy and suppress this
    warning.

    The target name "tests/win32_test" is reserved or not valid for certain
    CMake features, such as generator expressions, and may result in undefined
    behavior.

After some debugging, it seems that its the forward slash path separator that
CMake is complaining about. I don't understand why the forward slash is not
allowed as all Unix (including OSX) and Windows accept a forward slash.

Clues?

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the CMake mailing list