Fixes setting CMAKE_C_COMPILER flag being ignored
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2019-09-19 12:29:56 +02:00
parent 4eea5a7007
commit 454c0c581d
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 9 additions and 7 deletions

View File

@ -1,12 +1,14 @@
cmake_minimum_required(VERSION 3.10)
if (GCC AND (NOT CMAKE_C_COMPILER))
set(CMAKE_C_COMPILER "gcc")
set(CMAKE_CXX_COMPILER "g++")
else()
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
endif(GCC AND (NOT CMAKE_C_COMPILER))
if (NOT CMAKE_C_COMPILER)
if (GCC)
set(CMAKE_C_COMPILER "gcc")
set(CMAKE_CXX_COMPILER "g++")
else()
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
endif(GCC)
endif(NOT CMAKE_C_COMPILER)
project(PorygonLang)