Skip to content

Commit

Permalink
Remove unnecessary Ubuntu version checks (pytorch#61738)
Browse files Browse the repository at this point in the history
Summary:
PR pytorch#5401 missed another Ubuntu version check in `cmake/MiscCheck.cmake`.

The check for available functions added by pytorch#5401 are already present below the code snippet that this PR deletes.

Pull Request resolved: pytorch#61738

Reviewed By: mrshenli

Differential Revision: D29757525

Pulled By: ezyang

fbshipit-source-id: 7f5f9312284973481a8b8a2b9c51cc09774722e9
  • Loading branch information
xuhdev authored and facebook-github-bot committed Jul 19, 2021
1 parent 1b0a7f3 commit f912889
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions cmake/MiscCheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,6 @@ include(CheckCXXSourceCompiles)
include(CheckCXXCompilerFlag)
include(CMakePushCheckState)

# ---[ If running on Ubuntu, check system version and compiler version.
if(EXISTS "/etc/os-release")
execute_process(COMMAND
"sed" "-ne" "s/^ID=\\([a-z]\\+\\)$/\\1/p" "/etc/os-release"
OUTPUT_VARIABLE OS_RELEASE_ID
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(COMMAND
"sed" "-ne" "s/^VERSION_ID=\"\\([0-9\\.]\\+\\)\"$/\\1/p" "/etc/os-release"
OUTPUT_VARIABLE OS_RELEASE_VERSION_ID
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(OS_RELEASE_ID STREQUAL "ubuntu")
if(OS_RELEASE_VERSION_ID VERSION_GREATER "17.04")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0.0")
message(FATAL_ERROR
"Please use GCC 6 or higher on Ubuntu 17.04 and higher. "
"For more information, see: "
"https://github.com/caffe2/caffe2/issues/1633"
)
endif()
endif()
endif()
endif()
endif()

if(NOT INTERN_BUILD_MOBILE)
# ---[ Check that our programs run. This is different from the native CMake
# compiler check, which just tests if the program compiles and links. This is
Expand Down

0 comments on commit f912889

Please sign in to comment.