Remove dangling cmake check for long typemeta (#12356)

Summary:
TSIA
Pull Request resolved: https://github.com/pytorch/pytorch/pull/12356

Differential Revision: D10212726

Pulled By: Yangqing

fbshipit-source-id: b9c2c778fb496278477ef323ecfefd5d19d1af3c
This commit is contained in:
Yangqing Jia 2018-10-05 09:32:20 -07:00 committed by Facebook Github Bot
parent 1e7050072b
commit 7788ec9dd1

View File

@ -37,28 +37,6 @@ if(EXISTS "/etc/os-release")
endif()
endif()
# ---[ Check if the data type long and int32_t/int64_t overlap.
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_FLAGS "-std=c++11")
CHECK_CXX_SOURCE_COMPILES(
"#include <cstdint>
template <typename T> void Foo();
template<> void Foo<int32_t>() {}
template<> void Foo<int64_t>() {}
int main(int argc, char** argv) {
Foo<long>();
return 0;
}" CAFFE2_LONG_IS_INT32_OR_64)
if (CAFFE2_LONG_IS_INT32_OR_64)
message(STATUS "Does not need to define long separately.")
else()
message(STATUS "Need to define long as a separate typeid.")
set(CAFFE2_UNIQUE_LONG_TYPEMETA 1)
endif()
cmake_pop_check_state()
# ---[ Check if std::exception_ptr is supported.
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_FLAGS "-std=c++11")