Skip to content

Commit

Permalink
Remove dangling cmake check for long typemeta (pytorch#12356)
Browse files Browse the repository at this point in the history
Summary:
TSIA
Pull Request resolved: pytorch#12356

Differential Revision: D10212726

Pulled By: Yangqing

fbshipit-source-id: b9c2c778fb496278477ef323ecfefd5d19d1af3c
  • Loading branch information
Yangqing authored and facebook-github-bot committed Oct 5, 2018
1 parent 1e70500 commit 7788ec9
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions cmake/MiscCheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 7788ec9

Please sign in to comment.