title: Cmake throws error during generation when building openpose library
body: <p>I am very new to cmake and I am using Cmake Gui for compiling the openpose library <a href="https://github.com/CMU-Perceptual-Computing-Lab/openpose" rel="nofollow noreferrer">https://github.com/CMU-Perceptual-Computing-Lab/openpose</a>. When I configure it, it configures successfully but when I click generate, it throws error but still generates compiled files. I am following <a href="https://www.youtube.com/watch?v=QC9GTb6Wsb4" rel="nofollow noreferrer">https://www.youtube.com/watch?v=QC9GTb6Wsb4</a> this tutorial, but when I try to build the program using visual studio, I get error. </p>
  
  <p>I have installed Visual studio 2017 in windows 10 with Nvidia Geforce 940M.<a href="https://i.stack.imgur.com/laUXA.png" rel="nofollow noreferrer">Visual Studio screenshot after build</a>    </p>
  
  <pre><code>  Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18362.
  CMAKE_VERSION = 3.17.0-rc1
  Building with CUDA.
  Downloading windows dependencies...
  opencv_411_v14_15_2019_09_24.zip already exists.
  caffe3rdparty_15_2019_03_14.zip already exists.
  caffe_15_2019_05_16.zip already exists.
  Windows dependencies downloaded.
  Adding Example Calibration
  Adding Example OpenPoseDemo
  Adding Example 1_custom_post_processing
  Adding Example 01_body_from_image_default
  Adding Example 02_whole_body_from_image_default
  Adding Example 03_keypoints_from_image
  Adding Example 04_keypoints_from_images
  Adding Example 05_keypoints_from_images_multi_gpu
  Adding Example 06_face_from_image
  Adding Example 07_hand_from_image
  Adding Example 08_heatmaps_from_image
  Adding Example 09_keypoints_from_heatmaps
  Adding Example 10_asynchronous_custom_input
  Adding Example 11_asynchronous_custom_output
  Adding Example 12_asynchronous_custom_input_output_and_datum
  Adding Example 13_synchronous_custom_input
  Adding Example 14_synchronous_custom_preprocessing
  Adding Example 15_synchronous_custom_postprocessing
  Adding Example 16_synchronous_custom_output
  Adding Example 17_synchronous_custom_all_and_datum
  Adding Example 1_thread_user_processing_function
  Adding Example 2_thread_user_input_processing_output_and_datum
  Download the models.
  Downloading BODY_25 model...
  Model already exists.
  Not downloading body (COCO) model
  Not downloading body (MPI) model
  Downloading face model...
  Model already exists.
  Downloading hand model...
  Model already exists.
  Models Downloaded.
  fatal: not a git repository (or any of the parent directories): .git
  
  pybind11 v2.4.dev4
  Configuring done
  CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindCUDA.cmake:1833 (add_library):
    Target "openpose" links to target "Threads::Threads" but the target was not
    found.  Perhaps a find_package() call is missing for an IMPORTED target, or
    an ALIAS target is missing?
  Call Stack (most recent call first):
    src/openpose/CMakeLists.txt:21 (cuda_add_library)
  
  
  CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindCUDA.cmake:1833 (add_library):
    Target "openpose" links to target "Threads::Threads" but the target was not
    found.  Perhaps a find_package() call is missing for an IMPORTED target, or
    an ALIAS target is missing?
  Call Stack (most recent call first):
    src/openpose/CMakeLists.txt:21 (cuda_add_library)
  
  
  CMake Error at examples/calibration/CMakeLists.txt:15 (add_executable):
    Target "Calibration" links to target "Threads::Threads" but the target was
    not found.  Perhaps a find_package() call is missing for an IMPORTED
    target, or an ALIAS target is missing?
  
  
  CMake Error at examples/calibration/CMakeLists.txt:15 (add_executable):
    Target "Calibration" links to target "Threads::Threads" but the target was
    not found.  Perhaps a find_package() call is missing for an IMPORTED
    target, or an ALIAS target is missing?
  
  
  CMake Error at examples/openpose/CMakeLists.txt:15 (add_executable):
    Target "OpenPoseDemo" links to target "Threads::Threads" but the target was
    not found.  Perhaps a find_package() call is missing for an IMPORTED
    target, or an ALIAS target is missing?
  
  
  CMake Error at examples/openpose/CMakeLists.txt:15 (add_executable):
    Target "OpenPoseDemo" links to target "Threads::Threads" but the target was
    not found.  Perhaps a find_package() call is missing for an IMPORTED
    target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_add_module/CMakeLists.txt:17 (add_executable):
    Target "1_custom_post_processing" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_add_module/CMakeLists.txt:17 (add_executable):
    Target "1_custom_post_processing" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "01_body_from_image_default" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "01_body_from_image_default" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "02_whole_body_from_image_default" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "02_whole_body_from_image_default" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "08_heatmaps_from_image" links to target "Threads::Threads" but the
    target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "08_heatmaps_from_image" links to target "Threads::Threads" but the
    target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "03_keypoints_from_image" links to target "Threads::Threads" but the
    target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "03_keypoints_from_image" links to target "Threads::Threads" but the
    target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "12_asynchronous_custom_input_output_and_datum" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "12_asynchronous_custom_input_output_and_datum" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "05_keypoints_from_images_multi_gpu" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "05_keypoints_from_images_multi_gpu" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "04_keypoints_from_images" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "04_keypoints_from_images" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "06_face_from_image" links to target "Threads::Threads" but the
    target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "06_face_from_image" links to target "Threads::Threads" but the
    target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "07_hand_from_image" links to target "Threads::Threads" but the
    target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "07_hand_from_image" links to target "Threads::Threads" but the
    target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "09_keypoints_from_heatmaps" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "09_keypoints_from_heatmaps" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "10_asynchronous_custom_input" links to target "Threads::Threads"
    but the target was not found.  Perhaps a find_package() call is missing for
    an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "10_asynchronous_custom_input" links to target "Threads::Threads"
    but the target was not found.  Perhaps a find_package() call is missing for
    an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "11_asynchronous_custom_output" links to target "Threads::Threads"
    but the target was not found.  Perhaps a find_package() call is missing for
    an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "11_asynchronous_custom_output" links to target "Threads::Threads"
    but the target was not found.  Perhaps a find_package() call is missing for
    an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "13_synchronous_custom_input" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "13_synchronous_custom_input" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "17_synchronous_custom_all_and_datum" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "17_synchronous_custom_all_and_datum" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "14_synchronous_custom_preprocessing" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "14_synchronous_custom_preprocessing" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "15_synchronous_custom_postprocessing" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "15_synchronous_custom_postprocessing" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "16_synchronous_custom_output" links to target "Threads::Threads"
    but the target was not found.  Perhaps a find_package() call is missing for
    an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "16_synchronous_custom_output" links to target "Threads::Threads"
    but the target was not found.  Perhaps a find_package() call is missing for
    an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_thread/CMakeLists.txt:16 (add_executable):
    Target "1_thread_user_processing_function" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_thread/CMakeLists.txt:16 (add_executable):
    Target "1_thread_user_processing_function" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_thread/CMakeLists.txt:16 (add_executable):
    Target "2_thread_user_input_processing_output_and_datum" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_thread/CMakeLists.txt:16 (add_executable):
    Target "2_thread_user_input_processing_output_and_datum" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at 3rdparty/pybind11/tools/pybind11Tools.cmake:131 (add_library):
    Target "pyopenpose" links to target "Threads::Threads" but the target was
    not found.  Perhaps a find_package() call is missing for an IMPORTED
    target, or an ALIAS target is missing?
  Call Stack (most recent call first):
    python/openpose/CMakeLists.txt:6 (pybind11_add_module)
  
  
  CMake Error at 3rdparty/pybind11/tools/pybind11Tools.cmake:131 (add_library):
    Target "pyopenpose" links to target "Threads::Threads" but the target was
    not found.  Perhaps a find_package() call is missing for an IMPORTED
    target, or an ALIAS target is missing?
  Call Stack (most recent call first):
    python/openpose/CMakeLists.txt:6 (pybind11_add_module)
  
  
  CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindCUDA.cmake:1833 (add_library):
    Target "openpose" links to target "Threads::Threads" but the target was not
    found.  Perhaps a find_package() call is missing for an IMPORTED target, or
    an ALIAS target is missing?
  Call Stack (most recent call first):
    src/openpose/CMakeLists.txt:21 (cuda_add_library)
  
  
  CMake Error at examples/calibration/CMakeLists.txt:15 (add_executable):
    Target "Calibration" links to target "Threads::Threads" but the target was
    not found.  Perhaps a find_package() call is missing for an IMPORTED
    target, or an ALIAS target is missing?
  
  
  CMake Error at examples/openpose/CMakeLists.txt:15 (add_executable):
    Target "OpenPoseDemo" links to target "Threads::Threads" but the target was
    not found.  Perhaps a find_package() call is missing for an IMPORTED
    target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_add_module/CMakeLists.txt:17 (add_executable):
    Target "1_custom_post_processing" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "01_body_from_image_default" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "02_whole_body_from_image_default" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "08_heatmaps_from_image" links to target "Threads::Threads" but the
    target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "03_keypoints_from_image" links to target "Threads::Threads" but the
    target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "12_asynchronous_custom_input_output_and_datum" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "05_keypoints_from_images_multi_gpu" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "04_keypoints_from_images" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "06_face_from_image" links to target "Threads::Threads" but the
    target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "07_hand_from_image" links to target "Threads::Threads" but the
    target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "09_keypoints_from_heatmaps" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "10_asynchronous_custom_input" links to target "Threads::Threads"
    but the target was not found.  Perhaps a find_package() call is missing for
    an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "11_asynchronous_custom_output" links to target "Threads::Threads"
    but the target was not found.  Perhaps a find_package() call is missing for
    an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "13_synchronous_custom_input" links to target "Threads::Threads" but
    the target was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "17_synchronous_custom_all_and_datum" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "14_synchronous_custom_preprocessing" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "15_synchronous_custom_postprocessing" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_cpp/CMakeLists.txt:33 (add_executable):
    Target "16_synchronous_custom_output" links to target "Threads::Threads"
    but the target was not found.  Perhaps a find_package() call is missing for
    an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_thread/CMakeLists.txt:16 (add_executable):
    Target "1_thread_user_processing_function" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at examples/tutorial_api_thread/CMakeLists.txt:16 (add_executable):
    Target "2_thread_user_input_processing_output_and_datum" links to target
    "Threads::Threads" but the target was not found.  Perhaps a find_package()
    call is missing for an IMPORTED target, or an ALIAS target is missing?
  
  
  CMake Error at 3rdparty/pybind11/tools/pybind11Tools.cmake:131 (add_library):
    Target "pyopenpose" links to target "Threads::Threads" but the target was
    not found.  Perhaps a find_package() call is missing for an IMPORTED
    target, or an ALIAS target is missing?
  Call Stack (most recent call first):
    python/openpose/CMakeLists.txt:6 (pybind11_add_module)
  
  
  Generating done
  </code></pre>
  
  <p>This is the log of cmake when I configure and generate.</p>
  
  <p>Would appreciate some help.</p>