mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
cmake: Include CheckCXXCompilerFlag where it is used (#113028)
Move the `include(CheckCXXCompilerFlag)` above the `append_cxx_flag_if_supported` function that uses it to avoid depending on the caller to have it already included. Pull Request resolved: https://github.com/pytorch/pytorch/pull/113028 Approved by: https://github.com/malfet
This commit is contained in:
parent
1badad9ce9
commit
78c3098470
|
|
@ -57,7 +57,6 @@ if(LINUX)
|
|||
else()
|
||||
# Please note this is required in order to ensure compatibility between gcc 9 and gcc 7
|
||||
# This could be removed when all Linux PyTorch binary builds are compiled by the same toolchain again
|
||||
include(CheckCXXCompilerFlag)
|
||||
append_cxx_flag_if_supported("-fabi-version=11" CMAKE_CXX_FLAGS)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -527,6 +527,8 @@ function(torch_update_find_cuda_flags)
|
|||
endif()
|
||||
endfunction()
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
##############################################################################
|
||||
# CHeck if given flag is supported and append it to provided outputvar
|
||||
# Also define HAS_UPPER_CASE_FLAG_NAME variable
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user