From 83b4eae3236c165bd8f0adb6be974df83358249a Mon Sep 17 00:00:00 2001
From: Paul Harris <paulharris@computer.org>
Date: Sat, 9 Jun 2012 16:55:24 +0800
Subject: [PATCH] Added clang to list of compilers to ask about exceptions
---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a2ae51..84c6dbb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,12 +58,12 @@ option(DEVPAK "Create DevPackage" NO)
# and you want your error-callback to throw an exception,
# you will need to enable this for the exception to be
# able to throw through the libharu callstack).
-if (CMAKE_COMPILER_IS_GNUCC)
+if (CMAKE_COMPILER_IS_GNUCC OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang"))
option (LIBHPDF_ENABLE_EXCEPTIONS "Enable exceptions" NO)
if (LIBHPDF_ENABLE_EXCEPTIONS)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions")
endif (LIBHPDF_ENABLE_EXCEPTIONS)
-endif (CMAKE_COMPILER_IS_GNUCC)
+endif ()
if(DEVPAK AND NOT WIN32)
message( STATUS "DevPackage only available for Win32. Set DEVPAK to OFF." )
--
2.21.1 (Apple Git-122.3)