Skip to content

Commit

Permalink
Add compiler executable name into toolchain file (#14269)
Browse files Browse the repository at this point in the history
  • Loading branch information
longnguyen2004 committed Oct 30, 2020
1 parent eb8094d commit 6edef9f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/toolchains/mingw.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ foreach(lang C CXX)
set(CMAKE_${lang}_COMPILER_TARGET "${CMAKE_SYSTEM_PROCESSOR}-windows-gnu" CACHE STRING "")
endforeach()

set(CMAKE_C_COMPILER "${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-gcc.exe" CACHE STRING "")
set(CMAKE_CXX_COMPILER "${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-g++.exe" CACHE STRING "")
set(CMAKE_RC_COMPILER "${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32-windres.exe" CACHE STRING "")

get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
if(NOT _CMAKE_IN_TRY_COMPILE)
string(APPEND CMAKE_C_FLAGS_INIT " ${VCPKG_C_FLAGS} ")
Expand Down

0 comments on commit 6edef9f

Please sign in to comment.