[CMake] "INCLUDE called with wrong number of arguments" error,
please help.
kdsfinger at gmail.com
kdsfinger at gmail.com
Thu Jan 4 14:01:30 EST 2007
hi,
I recently installed the lapack library on my linux box and would like
to configure cmake to use it. I steal the FindLapack.cmake file from
http://www.mip.informatik.uni-kiel.de/~jw/cmake/CMakeModules/FindLAPACK.cmake
(btw, I also use the FindGSL.cmake from there and it works great)
and put it in the cmake modules folder.
I have a CMakeList.txt like this:
========================================
PROJECT(ta)
FIND_PACKAGE(GSL)
INCLUDE(${GSL_INCLUDE_DIR})
ADD_DEFINITIONS(-g -Wall -O2 -fno-gcse -finline-functions -funswitch-loops )
FIND_PACKAGE(LAPACK)
IF(LAPACK_FOUND)
INCLUDE(${LAPACK_USE_FILE})
ELSE(LAPACK_FOUND)
MESSAGE(FATAL_ERROR "Cannot build without LAPACK. Please set LAPACK_DIR.")
ENDIF(LAPACK_FOUND)
#list all source files here
ADD_EXECUTABLE(test testunsymm.c )
TARGET_LINK_LIBRARIES(test ${GSL_LIBRARIES} ${LAPACK_LIBRARIES} )
==========================================
Then I run ccmake . and manually set up
LAPACK_FORTRAN_TO_C_LIBRARY /usr/bin/gfortran
LAPACK_LIBRARY /usr/lib/liblapack.so.3.1.0
After I configure it, the cmake gave out the following message:
CMake Error: Error in cmake code at
/home/me/Desktop/ta/CMakeLists.txt:9:
INCLUDE called with wrong number of arguments. Include only takes one file.
Current CMake stack:
/home/me/Desktop/ta/CMakeLists.txt;/usr/local/share/cmake-2.5/Modules/CMake
CInformation.cmake;/usr/local/share/cmake-2.5/Modules/CMakeCXXInformation.cmak
e
Can someone help me to correct the problem? What does "INCLUDE called
with wrong number of arguments" means? My working dir is
/home/me/Desktop/ta
More information about the CMake
mailing list