# FetchContent ITK gives strange error (include): include called with wrong number of arguments.

**URL:** https://discourse.cmake.org/t/fetchcontent-itk-gives-strange-error-include-include-called-with-wrong-number-of-arguments/7613
**Category:** Usage
**Created:** [March 7, 2023, 2:40am UTC](https://discourse.cmake.org/t/fetchcontent-itk-gives-strange-error-include-include-called-with-wrong-number-of-arguments/7613 "2023-03-07T02:40:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![BlackCat\_Ruelle](https://discourse.cmake.org/user_avatar/discourse.cmake.org/blackcat_ruelle/32/3214_2.png) [@BlackCat\_Ruelle](https://discourse.cmake.org/u/BlackCat_Ruelle)
#### Post date: [March 7, 2023, 2:40am UTC](https://discourse.cmake.org/t/fetchcontent-itk-gives-strange-error-include-include-called-with-wrong-number-of-arguments/7613/1 "2023-03-07T02:40:19Z")

</div>

Hi,  
I’m trying to use FetchContent to download ITK and build my project. But I got this string error:

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

Does anybody know why I am getting the include error?

Here is my CMakeLists.txt file:

```cmake
cmake_minimum_required(VERSION 3.19.7 FATAL_ERROR)

project(nebula LANGUAGES CXX)

set(BUILD_TESTING OFF)
set(BUILD_EXAMPLES OFF)

include(FetchContent)
FetchContent_Declare(
  ITK
  GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITK.git
  GIT_TAG v5.3.0 
  FIND_PACKAGE_ARGS NAMES ITK
)
FetchContent_MakeAvailable(ITK)

find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

add_executable(nebula hello_world.cpp)
target_link_libraries(nebula ${ITK_LIBRARIES})

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [March 7, 2023, 10:05pm UTC](https://discourse.cmake.org/t/fetchcontent-itk-gives-strange-error-include-include-called-with-wrong-number-of-arguments/7613/2 "2023-03-07T22:05:32Z")

</div>

My guess is that `ITK_USE_FILE` is not set. Modern ITK might not provide this variable. You can guard it with an `if (ITK_USE_FILE)` check.
