From cfbdcd288b6341c34a5a5e4970ff84fb4cbfed67 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 8 Oct 2014 15:22:48 +0200 Subject: [PATCH] build: check for clang --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index aec5757..83524f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,14 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING RelWithDebInfo MinSizeRel." FORCE) endif(NOT CMAKE_BUILD_TYPE) +# Check for clang, masquerade it as GNU +if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_COMPILER_IS_GNUCC true) +endif () +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_COMPILER_IS_GNUCXX true) +endif() + ## Command line options # # The set option will be converted to uppercase letters by cmake!! --> ON/OFF -- libgit2 0.26.0