mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: This introduces a few things: - It enables us to create Caffe2Config.cmake that can be used down the road for building dependent libraries, so they do not need to explicitly write FindCaffe2.cmake. - The config file will automatically figure out transitive dependency of Caffe2 as well as compiler flags. - This diff also disables the RPATH setting since it is kind of a mess right now. In principle, we should figure out a clearer rpath setting following the typical rpath setting choices (https://cmake.org/Wiki/CMake_RPATH_handling) - I can send a follow up PR to clean this up. - Minor: removed old gflags ang glog files. Closes https://github.com/caffe2/caffe2/pull/1354 Reviewed By: dzhulgakov Differential Revision: D6098014 Pulled By: Yangqing fbshipit-source-id: cb06c41a7ef60fddb78b24887b6b3e82684b7c6b
12 lines
379 B
CMake
12 lines
379 B
CMake
set(PACKAGE_VERSION "@CAFFE2_VERSION@")
|
|
|
|
# Check whether the requested PACKAGE_FIND_VERSION is compatible
|
|
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
|
|
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
|
else()
|
|
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
|
if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
|
|
set(PACKAGE_VERSION_EXACT TRUE)
|
|
endif()
|
|
endif()
|