From e8871e5ba82959438f17aee43bd66061190b7653 Mon Sep 17 00:00:00 2001
From: Ansgar Philippsen <ansgar.philippsen@gmail.com>
Date: Mon, 9 Jul 2012 17:07:10 -0400
Subject: [PATCH] fixed bug in CMakeList what would trigger rebuilds whenever
 cmake was re-run

---
 CMakeLists.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7b8f348b2..7f190fe37 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -246,7 +246,10 @@ else()
 endif()
 
 if (CMAKE_COMPILER_IS_GNUCXX)
-  set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-strict-aliasing" CACHE STRING "" FORCE)
+  # do not write back into cache, otherwise the compile command line gets expanded
+  # with multiple -fno-strict-aliasing flags, triggering a complete rebuild whenever
+  # cmake is run
+  set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-strict-aliasing")
 endif()
 
 
-- 
GitLab