Hello,
with cmake 2.6.4 I run into a problem with our build system (OpenSG,
opensg.vrsource.org). It has to build a bunch of (shared) libraries from
a fairly deeply neested source tree with dependencies between some of
the libs, plus tests programs, unittests and documentation.
It does so by performing multiple passes over the source tree
(collecting dependency information, building libs, building tests, ...).
The top level CMakeLists.txt has this to drive the passes:
SET(OSG_CMAKE_PASSES "OSGCOLLECT" "OSGSETUP")
SET(OSG_PASSDIR_OSGCOLLECT "")
SET(OSG_PASSDIR_OSGSETUP "")
# find CMakeLists.Lib.*.txt files
FILE(GLOB_RECURSE OSG_LIBRARY_CONFIG_FILES RELATIVE "${CMAKE_SOURCE_DIR}"
"Source/*CMakeLists.Lib.*.txt")
# run build passes
FOREACH(PASS ${OSG_CMAKE_PASSES})
SET(OSG_CMAKE_PASS ${PASS})
MESSAGE(STATUS "\nPASS : ${OSG_CMAKE_PASS} in
${OSG_PASSDIR_${PASS}}\n")
FOREACH(LIBCONFIGFILE ${OSG_LIBRARY_CONFIG_FILES})
GET_FILENAME_COMPONENT(LIBCONFIGDIR ${LIBCONFIGFILE} PATH)
MESSAGE("ADD_SUBDIRECTORY(${LIBCONFIGDIR} ${OSG_PASSDIR_${PASS}})")
ADD_SUBDIRECTORY(${LIBCONFIGDIR} ${OSG_PASSDIR_${PASS}})
ENDFOREACH(LIBCONFIGFILE)
ENDFOREACH()
This all works fine with cmake 2.6.x (x < 4), but the latest version
complains in the OSGSETUP pass on the first call to ADD_SUBDIRECTORY in
that pass (see attachment for more details):
CMake Error at CMakeLists.txt:705 (ADD_SUBDIRECTORY):
The binary directory
/store/home/carsten/devel/opensg2/svn/trunk/build.cmake.2.6.4/Source/Base
is already used to build another source directory, so it cannot be
used to
build source directory
/store/home/carsten/devel/opensg2/svn/trunk/Source/Base
Specify a unique binary directory name.
While it is true that the binary directory is already used, it is in
fact used to build the *same* source directory ;)
Is this intended behavior, should I file a bug report, any ideas how to
make this or something similar work again?
Many thanks and kind regards,
Carsten
PASS : OSGCOLLECT in
ADD_SUBDIRECTORY(Source/Base )
-- Processing OSGBase
ADD_SUBDIRECTORY(Source/System )
-- Processing OSGSystem
ADD_SUBDIRECTORY(Source/Contrib/PLY )
-- Processing OSGContribPLY
ADD_SUBDIRECTORY(Source/Contrib/VTK )
ADD_SUBDIRECTORY(Source/Contrib/Manipulators )
-- Processing OSGContribGUI
ADD_SUBDIRECTORY(Source/Contrib/ComplexSceneManager )
-- Processing OSGContribCSM
ADD_SUBDIRECTORY(Source/Contrib/BackgroundLoader )
-- Processing OSGContribBackgroundLoader
ADD_SUBDIRECTORY(Source/System/Cluster )
-- Processing OSGCluster
ADD_SUBDIRECTORY(Source/System/FileIO )
-- Processing OSGFileIO
ADD_SUBDIRECTORY(Source/System/NodeCores/Groups/Effects )
-- Processing OSGEffectGroups
ADD_SUBDIRECTORY(Source/System/NodeCores/Groups )
-- Processing OSGGroup
ADD_SUBDIRECTORY(Source/System/NodeCores/Drawables )
-- Processing OSGDrawable
ADD_SUBDIRECTORY(Source/System/Window )
-- Processing OSGWindow
ADD_SUBDIRECTORY(Source/System/Text )
-- Processing OSGText
ADD_SUBDIRECTORY(Source/System/GraphOp )
-- Processing OSGUtil
ADD_SUBDIRECTORY(Source/System/Image/FileIO )
-- Processing OSGImageFileIO
ADD_SUBDIRECTORY(Source/System/State )
-- Processing OSGState
ADD_SUBDIRECTORY(Source/WindowSystem/WIN32 )
ADD_SUBDIRECTORY(Source/WindowSystem/Cocoa )
ADD_SUBDIRECTORY(Source/WindowSystem/GLUT )
-- Processing OSGWindowGLUT
ADD_SUBDIRECTORY(Source/WindowSystem/QT4 )
-- Processing OSGWindowQT4
ADD_SUBDIRECTORY(Source/WindowSystem/CoreGL )
ADD_SUBDIRECTORY(Source/WindowSystem/X )
-- Processing OSGWindowX
ADD_SUBDIRECTORY(Source/WindowSystem/Carbon )
--
PASS : OSGSETUP in
ADD_SUBDIRECTORY(Source/Base )
CMake Error at CMakeLists.txt:705 (ADD_SUBDIRECTORY):
The binary directory
/store/home/carsten/devel/opensg2/svn/trunk/build.cmake.2.6.4/Source/Base
is already used to build another source directory, so it cannot be used to
build source directory
/store/home/carsten/devel/opensg2/svn/trunk/Source/Base
Specify a unique binary directory name._______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake