From e56fbdb12d229ac44904a10c905873ab64b18cd5 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sun, 14 Oct 2012 05:50:34 +0000 Subject: [PATCH] Fix: Bug #857. Get CMake to compile with g++ instead of c++ (clang) compiler to eliminate warnings. --- CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f8fb58c..54f4cfee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,9 +6,13 @@ # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required -PROJECT( exiv2 ) -CMAKE_MINIMUM_REQUIRED( VERSION 2.6 ) +## +# Issue:#857. Use g++ instead of c++ (clang) compiler to eliminate warnings +if (APPLE) + set(CMAKE_C_COMPILER gcc) + set(CMAKE_CXX_COMPILER g++) +endif(APPLE) +## ## # Running cmake in a tree in which we have run ./configure ; make @@ -22,6 +26,11 @@ if( EXISTS ${CMAKE_SOURCE_DIR}/src/exv_conf.h ) endif() ## + +PROJECT( exiv2 ) +CMAKE_MINIMUM_REQUIRED( VERSION 2.6 ) +SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required + SET( PACKAGE_COPYRIGHT "Andreas Huggel" ) SET( PACKAGE_BUGREPORT "ahuggel@gmx.net" ) SET( PACKAGE "exiv2" )