From 0cbaaf2dc3e250fe0f4b056e229e3fcfbe6a8534 Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Thu, 1 Sep 2016 15:32:32 -0400
Subject: GenerateExportHeader: Fix add_compiler_export_flags regression

The mechanical conversion in commit 5d0d980d (Use string(APPEND) in
Modules, 2016-07-28) accidentally introduced use of

  string(APPEND ... PARENT_SCOPE)

Split that into the string(APPEND) and set(PARENT_SCOPE) pieces.
---
 Modules/GenerateExportHeader.cmake | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index 735a0d7..e33b927 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -415,6 +415,7 @@ function(add_compiler_export_flags)
   if(ARGC GREATER 0)
     set(${ARGV0} "${EXTRA_FLAGS}" PARENT_SCOPE)
   else()
-    string(APPEND CMAKE_CXX_FLAGS " ${EXTRA_FLAGS}" PARENT_SCOPE)
+    string(APPEND CMAKE_CXX_FLAGS " ${EXTRA_FLAGS}")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" PARENT_SCOPE)
   endif()
 endfunction()
-- 
cgit v0.12