Make compiler feature testing more reliable.
* Make compiler feature testing more reliable. - Fixes testsuite failure on alpha. (Closes: #789807) - Features_Extract_strings_from_test_binary_more_reliably.patch
This commit is contained in:
		
							parent
							
								
									db2c55b506
								
							
						
					
					
						commit
						80d095468a
					
				
							
								
								
									
										3
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							@ -2,6 +2,9 @@ cmake (3.3.2-1) UNRELEASED; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * New upstream release.
 | 
			
		||||
  * Drop Debian menu entries.
 | 
			
		||||
  * Make compiler feature testing more reliable.
 | 
			
		||||
    - Fixes testsuite failure on alpha. (Closes: #789807)
 | 
			
		||||
    - Features_Extract_strings_from_test_binary_more_reliably.patch
 | 
			
		||||
 | 
			
		||||
 -- Felix Geyer <fgeyer@debian.org>  Fri, 04 Sep 2015 17:12:34 +0200
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										32
									
								
								debian/patches/Features_Extract_strings_from_test_binary_more_reliably.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								debian/patches/Features_Extract_strings_from_test_binary_more_reliably.patch
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,32 @@
 | 
			
		||||
From 150e1b27c54cf4e19e19ad7836e6bbfb9fbb5266 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Brad King <brad.king@kitware.com>
 | 
			
		||||
Date: Thu, 10 Sep 2015 14:37:20 -0400
 | 
			
		||||
Subject: [PATCH] Features: Extract strings from test binary more reliably
 | 
			
		||||
 (#15736)
 | 
			
		||||
 | 
			
		||||
Since commit v3.1.0-rc1~635^2~7 (project: Add infrastructure for
 | 
			
		||||
recording CXX compiler features, 2013-10-17) we compile a test source to
 | 
			
		||||
a binary and then extract "<LANG>_FEATURES:..." strings from the binary
 | 
			
		||||
with the file(STRINGS) command.  Add a newline at the beginning of the
 | 
			
		||||
string literal to be sure file(STRINGS) can extract the first entry as a
 | 
			
		||||
string independent of whatever else the compiler may put before the
 | 
			
		||||
storage it allocates for the literal within the binary.
 | 
			
		||||
---
 | 
			
		||||
 Modules/Internal/FeatureTesting.cmake |    2 +-
 | 
			
		||||
 1 file changed, 1 insertion(+), 1 deletion(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/Modules/Internal/FeatureTesting.cmake b/Modules/Internal/FeatureTesting.cmake
 | 
			
		||||
index abd9a26..86b89b2 100644
 | 
			
		||||
--- a/Modules/Internal/FeatureTesting.cmake
 | 
			
		||||
+++ b/Modules/Internal/FeatureTesting.cmake
 | 
			
		||||
@@ -5,7 +5,7 @@ macro(record_compiler_features lang compile_flags feature_list)
 | 
			
		||||
   string(TOLOWER ${lang} lang_lc)
 | 
			
		||||
   file(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/feature_tests.bin")
 | 
			
		||||
   file(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/feature_tests.${lang_lc}" "
 | 
			
		||||
-  const char features[] = {\"\"\n")
 | 
			
		||||
+  const char features[] = {\"\\n\"\n")
 | 
			
		||||
 
 | 
			
		||||
   get_property(known_features GLOBAL PROPERTY CMAKE_${lang}_KNOWN_FEATURES)
 | 
			
		||||
 
 | 
			
		||||
-- 
 | 
			
		||||
1.7.10.4
 | 
			
		||||
							
								
								
									
										1
									
								
								debian/patches/series
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								debian/patches/series
									
									
									
									
										vendored
									
									
								
							@ -4,3 +4,4 @@ fix-ftbfs-on-kfreebsd.patch
 | 
			
		||||
FindJNI.cmake.mips.patch
 | 
			
		||||
fix-hdf5-hl.patch
 | 
			
		||||
FindJNI-Add-support-for-x32-architecture-on-Linux.patch
 | 
			
		||||
Features_Extract_strings_from_test_binary_more_reliably.patch
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user