cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(ssd-app)
set(LIB_PATH "E:/software")
set (Torch_DIR "${LIB_PATH}/libtorch/share/cmake/Torch")
find_package(Torch REQUIRED)
include_directories(${Torch_INCLUDE_DIRS})
message("Torch_INCLUDE_DIRS " ${Torch_INCLUDE_DIRS})
set(OpenCV_DIR "D:/OpenCV/opencv")
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
message("OpenCV_DIR " ${OpenCV_INCLUDE_DIRS})
set(SSDInclude ./)
include_directories(${SSDInclude})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")
add_executable(ssd-app main.cpp ssd.cpp)
target_link_libraries(ssd-app "${TORCH_LIBRARIES}" "${OpenCV_LIBRARIES}")
set_property(TARGET ssd-app PROPERTY CXX_STANDARD 11)
1> 命令行: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\lenovo\CMakeBuilds\99c0723b-17c2-d53e-a5c7-572ff5621d8e\install\x64-Debug (默认值)" -DCMAKE_CXX_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe" -DCMAKE_C_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "D:\100\libtorch-SSD-master"
1> 工作目录: C:\Users\lenovo\CMakeBuilds\99c0723b-17c2-d53e-a5c7-572ff5621d8e\build\x64-Debug (默认值)
1> CMake Warning (dev) at E:/software/libtorch/share/cmake/Caffe2/Modules_CUDA_fix/upstream/FindCUDA.cmake:547 (if):
1> Policy CMP0054 is not set: Only interpret if() arguments as variables or
1> keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
1> details. Use the cmake_policy command to set the policy and suppress this
1> warning.
1>
1> Quoted variables like "MSVC" will no longer be dereferenced when the policy
1> is set to NEW. Since the policy is not set the OLD behavior will be used.
1> Call Stack (most recent call first):
1> E:/software/libtorch/share/cmake/Caffe2/Modules_CUDA_fix/FindCUDA.cmake(11): (include)
1> E:/software/libtorch/share/cmake/Caffe2/public/cuda.cmake(29): (find_package)
1> E:/software/libtorch/share/cmake/Caffe2/Caffe2Config.cmake(88): (include)
1> E:/software/libtorch/share/cmake/Torch/TorchConfig.cmake(40): (find_package)
1> D:\100\libtorch-SSD-master\CMakeLists.txt(7): (find_package)
1> This warning is for project developers. Use -Wno-dev to suppress it.
1>
1> -- Caffe2: CUDA detected: 10.1
1> -- Caffe2: CUDA nvcc is: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/bin/nvcc.exe
1> -- Caffe2: CUDA toolkit directory: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1
1> -- Caffe2: Header version is: 10.1
1> -- Found cuDNN: v7.6.5 (include: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/include, library: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64/cudnn.lib)
1> -- Autodetected CUDA architecture(s): 7.5
1> -- Added CUDA NVCC flags for: -gencode;arch=compute_75,code=sm_75
1> CMake Warning (dev) at E:/software/libtorch/share/cmake/Caffe2/public/cuda.cmake:480 (if):
1> Policy CMP0054 is not set: Only interpret if() arguments as variables or
1> keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
1> details. Use the cmake_policy command to set the policy and suppress this
1> warning.
1>
1> Quoted variables like "MSVC" will no longer be dereferenced when the policy
1> is set to NEW. Since the policy is not set the OLD behavior will be used.
1> Call Stack (most recent call first):
1> E:/software/libtorch/share/cmake/Caffe2/Caffe2Config.cmake(88): (include)
1> E:/software/libtorch/share/cmake/Torch/TorchConfig.cmake(40): (find_package)
1> D:\100\libtorch-SSD-master\CMakeLists.txt(7): (find_package)
1> This warning is for project developers. Use -Wno-dev to suppress it.
1>
1> CMake Warning (dev) at E:/software/libtorch/share/cmake/Torch/TorchConfig.cmake:121 (if):
1> Policy CMP0054 is not set: Only interpret if() arguments as variables or
1> keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
1> details. Use the cmake_policy command to set the policy and suppress this
1> warning.
1>
1> Quoted variables like "MSVC" will no longer be dereferenced when the policy
1> is set to NEW. Since the policy is not set the OLD behavior will be used.
1> Call Stack (most recent call first):
1> D:\100\libtorch-SSD-master\CMakeLists.txt(7): (find_package)
1> This warning is for project developers. Use -Wno-dev to suppress it.
1>
1> Torch_INCLUDE_DIRS
1> CMake Warning (dev) at C:/OpenCV2.1/OpenCVConfig.cmake:39:
1> Syntax Warning in cmake code at column 20
1>
1> Argument not separated from preceding token by whitespace.
1> Call Stack (most recent call first):
1> D:\100\libtorch-SSD-master\CMakeLists.txt(12): (find_package)
1> This warning is for project developers. Use -Wno-dev to suppress it.
1>
1> CMake Warning (dev) at C:/OpenCV2.1/OpenCVConfig.cmake:41:
1> Syntax Warning in cmake code at column 22
1>
1> Argument not separated from preceding token by whitespace.
1> Call Stack (most recent call first):
1> D:\100\libtorch-SSD-master\CMakeLists.txt(12): (find_package)
1> This warning is for project developers. Use -Wno-dev to suppress it.
1>
1> OpenCV_DIR C:/OpenCV2.1/includeC:/OpenCV2.1/include/opencv
1> -- Configuring done
1> -- Generating done
1> -- Build files have been written to: C:/Users/lenovo/CMakeBuilds/99c0723b-17c2-d53e-a5c7-572ff5621d8e/build/x64-Debug (默认值)
1> 正在启动 CMake 目标信息提取...
1> 已建立 CMake 服务器连接。
1> 已提取包含路径。
1> 已提取 CMake 变量。
1> 已提取源文件和标头。
1> 已提取全局设置。
1> 已提取代码模型。
1> 已提取 CTest 信息。
1> 正在校对数据...
1> 目标信息提取完成。