[CMake] re assert error

dfeustel at mindspring.com dfeustel at mindspring.com
Thu Apr 19 09:29:34 EDT 2007


I tried modifying the find_lib code but
it still does not work. Plus the comment line
"#---------" generates an error.


# from page 37

macro(ASSERT test comment)
  if (NOT ${test})
    message ("Assertion failed: ${comment}")
  endif (NOT ${test})
endmacro(ASSERT)

find_library(MYLIB jpeg )
ASSERT(${MYLIB} "lib jpeg not found")

#-------------
CMake Error: Error in cmake code at
/home/daf/CmTest/CMakeLists.txt:11:
Parse error.  Expected a command name, got unquoted argument with text "-------------".
Assertion failed: lib jpeg not found
-- Configuring done
#-------------
#find /usr/local/lib -name '*jpeg*'
#/usr/local/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-jpeg.a
#/usr/local/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-jpeg.la
#/usr/local/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-jpeg.so
#/usr/local/lib/libjpeg.a
#/usr/local/lib/libjpeg.la
#/usr/local/lib/libjpeg.so.62.0
#/usr/local/lib/kde3/kfile_jpeg.la
#/usr/local/lib/kde3/kfile_jpeg.so


More information about the CMake mailing list