[flang] Fix file path in cmake (flang-compiler/f18#844)

Original-commit: flang-compiler/f18@4771f8cb78
Reviewed-on: https://github.com/flang-compiler/f18/pull/844
This commit is contained in:
arjunsuresh1987 2019-12-11 03:37:56 +05:30 committed by Steve Scalpone
parent 84c0faa5b6
commit 562b067439
1 changed files with 3 additions and 2 deletions

View File

@ -24,8 +24,9 @@ if( GCC )
set(CMAKE_INSTALL_RPATH "${GCC}/lib64")
endif()
if(BUILD_WITH_CLANG)
set(CMAKE_CXX_COMPILER "${BUILD_WITH_CLANG}/bin/clang++")
set(CMAKE_CC_COMPILER "${BUILD_WITH_CLANG}/bin/clang")
file(TO_CMAKE_PATH "${BUILD_WITH_CLANG}" CLANG_PATH)
set(CMAKE_CXX_COMPILER "${CLANG_PATH}/bin/clang++")
set(CMAKE_CC_COMPILER "${CLANG_PATH}/bin/clang")
if(GCC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --gcc-toolchain=${GCC}")
endif()