Skip to content

Commit

Permalink
Check MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 8, 2023
1 parent 64c38a8 commit 662007a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -926,10 +926,13 @@ if(CMAKE_AR)
list(APPEND EP_COMMON_TOOLCHAIN -DCMAKE_AR=${EP_CMAKE_AR})
endif()

if(CMAKE_RANLIB)
# Ensure using absolute path.
find_program(EP_CMAKE_RANLIB ${CMAKE_RANLIB} REQUIRED)
list(APPEND EP_COMMON_TOOLCHAIN -DCMAKE_RANLIB=${EP_CMAKE_RANLIB})
# RANLIB isn't used for MSVC
if(NOT MSVC)
if(CMAKE_RANLIB)
# Ensure using absolute path.
find_program(EP_CMAKE_RANLIB ${CMAKE_RANLIB} REQUIRED)
list(APPEND EP_COMMON_TOOLCHAIN -DCMAKE_RANLIB=${EP_CMAKE_RANLIB})
endif()
endif()

# External projects are still able to override the following declarations.
Expand Down

0 comments on commit 662007a

Please sign in to comment.