boost icon indicating copy to clipboard operation
boost copied to clipboard

Deprecated target names

Open dutow opened this issue 8 years ago • 2 comments

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.

dutow avatar Oct 02 '17 19:10 dutow

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.

pfultz2 avatar Oct 02 '17 20:10 pfultz2

Problem exist also under Ninja and MinGW generators

Pwera avatar Nov 19 '17 21:11 Pwera