MetaScale/nt2 — Issue #94: CMake configuration errors - duplicate binary directories
Author: brokenn
Created: 2011-10-13 11:41:14+00:00
State: open

Ubuntu 11.04, CMake 2.8.6
NT2 git ref f0e92d2e8221b78e91ee526d0c90f19feb851a5f

Running ccmake (and setting correct boost location) produces an extensive CMake error list:

---------------------------------------------------------
CMake Warning (dev) at CMakeLists.txt:101 (add_subdirectory):
Policy CMP0013 is not set: Duplicate binary directories are not allowed.
Run "cmake --help-policy CMP0013" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The binary directory

/home/brokenn/dev/nt2/nt2/modules/boost/dispatch

is already used to build a source directory. This command uses it to build
source directory

/home/brokenn/dev/nt2/nt2/modules/boost/dispatch

which can generate conflicting build files. CMake does not support this
use case but it used to work accidentally and is being allowed for
compatibility.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at cmake/NT2Module.cmake:120 (add_custom_target):
add_custom_target cannot create target "boost.dispatch.unit" because
another target with the same name already exists. The existing target is a
custom target created in source directory
"/home/brokenn/dev/nt2/nt2/modules/boost/dispatch". See documentation for
policy CMP0002 for more details.
Call Stack (most recent call first):
cmake/NT2Module.cmake:160 (nt2_module_dir)
modules/boost/dispatch/CMakeLists.txt:26 (nt2_module_main)
---------------------------------------------------------