Tab
Tab

Reputation: 815

CMake 3.4.0 Including multiple files

I was using CMake 2.8.10.1 before and while configuring with that was alright. Now when I switched to CMake 3.4.0 the same CMakelists.txt giving following error:

CMake Error at CMakeLists.txt:31 (INCLUDE):
  include called with wrong number of arguments.  include() only takes one
  file.

I used old CMake again and it is working fine with the same file. Following is the part of CMakelists

FIND_PACKAGE ( ITK)
IF ( ITK_FOUND)
INCLUDE( ${USE_ITK_FILE} )  //Line 31
ENDIF( ITK_FOUND)

Do I need to change some syntax here?

Upvotes: 0

Views: 429

Answers (1)

Tab
Tab

Reputation: 815

Reason was USE_ITK_FILE is now obsolete and it was working with 2.8.10.1 due to backward compatibility. As Given here

#  USE_ITK_FILE - The full path to the UseITK.cmake file.  
#                 This is provided for backward 
#                 compatability.  Use ITK_USE_FILE
#                 instead.

I changed it to ITK_USE_FILE and it worked.

Upvotes: 1

Related Questions