[CMake] CMake 2.4.5 errors on code which works fine in 2.4.7

Andreas Pakulat apaku at gmx.de
Thu Jan 24 14:50:31 EST 2008


Hi,

consider the following code snippet:
  	  IF(_boost_REQ_VERSION)
            IF( Boost_VERSION LESS ${_boost_REQ_VERSION})
              SET(Boost_INCLUDE_DIR FALSE)
            ENDIF( Boost_VERSION LESS ${_boost_REQ_VERSION})
  	  ENDIF(_boost_REQ_VERSION)

cmake 2.4.5 and 2.4.6 error out on the second line, while cmake 2.4.7
works fine.  Is that a bug in 2.4.5 which got fixed in 2.4.7?

The error is:
CMake Error: Error in cmake code at
/home/andreas/KDE-work/4.0/kdevplatform/cmake/modules/FindBoost.cmake:267:
IF had incorrect arguments: Boost_VERSION LESS ${_boost_REQ_VERSION} (Unknown arguments specified).
Current CMake stack: /home/andreas/KDE-work/4.0/kdevplatform/plugins/CMakeLists.txt;/home/andreas/KDE-work/4.0/kdevplatform/cmake/modules/FindBoost.cmake

At that point Boost_VERSION is not empty, while _boost_REQ_VERSION is
not set. Setting the latter to some value doesn't help.

Any ideas how to solve this (besides upgrading cmake)?

Andreas

-- 
Do nothing unless you must, and when you must act -- hesitate.


More information about the CMake mailing list