Boost logo

Boost Interest :

Subject: [Boost-cmake] Boost Tools are NOT being built
From: Michael Jackson (mike.jackson_at_[hidden])
Date: 2009-12-16 11:55:30


I was trying to get the Boost-cmake to build bcp for me and generally
no matter what I put in for BUILD_TOOLS none of the tools are built.

   Seems I have traced the problem to this line in tools/CMakeLists.txt

   foreach(tooldir
       ${tooldirs}
       )
                message(STATUS "tooldir: ${tooldir}")
     get_filename_component(tooldirname ${tooldir} NAME)
     list(FIND BUILD_TOOLS ${tooldir} THIS_BUILD_TOOLS_INDEX)
                message(STATUS "THIS_BUILD_TOOLS_INDEX: ${THIS_BUILD_TOOLS_INDEX}")
     if ((THIS_BUILD_TOOLS_INDEX GREATER -1) OR (BUILD_TOOLS STREQUAL
"ALL"))
       message(STATUS "+ ${tooldirname}")
       add_subdirectory(${tooldir})
     endif()

The output from running CMake is this:

-- Reading tools...

-- 
-- tooldir: /Users/Shared/OpenSource/imikejacksons-boost-cmake/tools/bcp
-- THIS_BUILD_TOOLS_INDEX: -1
-- tooldir: /Users/Shared/OpenSource/imikejacksons-boost-cmake/tools/ 
inspect
-- THIS_BUILD_TOOLS_INDEX: -1
-- tooldir: /Users/Shared/OpenSource/imikejacksons-boost-cmake/tools/ 
quickbook
-- THIS_BUILD_TOOLS_INDEX: -1
-- tooldir: /Users/Shared/OpenSource/imikejacksons-boost-cmake/tools/ 
wave
-- THIS_BUILD_TOOLS_INDEX: -1
So the problem really lies in this line:
if ((THIS_BUILD_TOOLS_INDEX GREATER -1) OR (BUILD_TOOLS STREQUAL "ALL"))
All the tool directories are initially -1 so they never get added to  
the list? Is this a bug or are we just NOT wanting to build any of the  
tools.
<background> I cloned the Boost-cmake on gitorious in order to hack on  
bcp so that I could get a subset of boost with all the CMake files. I  
would like to make those changes available to a wider audience</ 
background>
Thanks
_________________________________________________________
Mike Jackson                  mike.jackson_at_[hidden]
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio

Boost-cmake list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk