From 5e9bb789fb5e88172d3e008b1b7aa65e3e78f319 Mon Sep 17 00:00:00 2001
From: Marco Biasini <marco.biasini@unibas.ch>
Date: Fri, 22 Oct 2010 14:27:07 +0200
Subject: [PATCH] added shortcuts to change compiler from the command line

---
 CMakeLists.txt | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 08575372b..9410ed5fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,6 +30,19 @@ option(STATIC_PROPERTY_WORKAROUND "workaround for static property bug with some
 option(DEPLOYMENT "switch on deployment settings" OFF)
 option(COMPILE_TESTS "wheter unit tests should be compiled by default" OFF)
 
+if (CXX)
+  set(CMAKE_CXX_COMPILER ${CXX})
+endif()
+
+if (CC)
+  set(CMAKE_C_COMPILER ${CC})
+endif()
+
+if (FORTRAN_COMPILER)
+  set(CMAKE_FORTRAN_COMPILER ${FORTRAN_COMPILER})
+endif()
+
+
 if (PREFIX)
   set(CMAKE_INSTALL_PREFIX ${PREFIX})
 endif()
-- 
GitLab