boost-cmake / boost

Cmake-based build of boost
Boost Software License 1.0
58 stars 24 forks source link

Deprecated target names #4

Open dutow opened 7 years ago

dutow commented 7 years ago

The project contains a large amount of deprecated names (policy CMP0037), such as windows/basic_handle.

This causes the VS2017 generator to fail with CMake 3.8.1 (also tested with 3.9):

CMake Error at bcm/share/bcm/cmake/BCMFuture.cmake:68 (_add_library):
  The target name "windows/basic_handle" is reserved or not valid for certain
  CMake features, such as generator expressions, and may result in undefined
  behavior.
Call Stack (most recent call first):
  bcm/share/bcm/cmake/BCMTest.cmake:104 (add_library)
  libs/asio/test/CMakeLists.txt:115 (bcm_test)

Setting the policy to the old version explicitly hides the problem for this generator:

cmake_policy(SET CMP0037 OLD)

I'm also not sure why it is an error by default - according to the CMake docs, this policy should be a warning by default, maybe it has something to do with the VS generator, as I see no similar problems on linux with Ninja.

pfultz2 commented 7 years ago

Thanks, yea there shouldn't target be with a / in the name. I will look over the name of tests to make sure they are all correct.

Pwera commented 6 years ago

Problem exist also under Ninja and MinGW generators