[Piglit] [PATCH 3/4] cmake: Don't check WAFFLE_VERSION on Windows.

Jose Fonseca jfonseca at vmware.com
Mon Dec 15 04:19:17 PST 2014


From: José Fonseca <jfonseca at vmware.com>

The version number must be manually on command line, hence this
version check is just an hindrance for Windows.
---
 CMakeLists.txt | 28 ++++++++++++++--------------
 README         |  1 -
 2 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7be1bc4..2da7aae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,21 +51,21 @@ if(PIGLIT_USE_WAFFLE)
 			"it at http://www.waffle-gl.org."
 		)
 		endif()
-	endif ()
 
-	# Check the installed waffle version.
-	#
-	# We cannot reliably check the version with pkg_check_modules(), but
-	# instead must check the version manually as below. The problem is that,
-	# if one passes a required version to pkg_check_modules(), CMake
-	# validates the required version at most once for the lifetime of the
-	# source tree.  If someone changes the required version by editing the
-	# CMakeLists, CMake fails to detect the new requirement.
-	set(WAFFLE_REQUIRED_VERSION "1.5.0")
-	if(WAFFLE_VERSION VERSION_LESS WAFFLE_REQUIRED_VERSION)
-		message(FATAL_ERROR "Found waffle-${WAFFLE_VERSION}, but "
-		"piglit requires waffle-${WAFFLE_REQUIRED_VERSION}")
-	endif()
+		# Check the installed waffle version.
+		#
+		# We cannot reliably check the version with pkg_check_modules(), but
+		# instead must check the version manually as below. The problem is that,
+		# if one passes a required version to pkg_check_modules(), CMake
+		# validates the required version at most once for the lifetime of the
+		# source tree.  If someone changes the required version by editing the
+		# CMakeLists, CMake fails to detect the new requirement.
+		set(WAFFLE_REQUIRED_VERSION "1.5.0")
+		if(WAFFLE_VERSION VERSION_LESS WAFFLE_REQUIRED_VERSION)
+			message(FATAL_ERROR "Found waffle-${WAFFLE_VERSION}, but "
+			"piglit requires waffle-${WAFFLE_REQUIRED_VERSION}")
+		endif()
+	endif ()
 
 	add_definitions(-DPIGLIT_USE_WAFFLE)
 	add_definitions(-DWAFFLE_API_VERSION=0x0103)
diff --git a/README b/README
index b894db7..0bdf697 100644
--- a/README
+++ b/README
@@ -194,7 +194,6 @@ Configure
 Set these variables in the Advanced view.
 Note that the values provided are for reference purposed and may differ on your system.
   - PIGLIT_USE_WAFFLE, BOOL, TRUE
-  - WAFFLE_VERSION, STRING, "1.5.0"
   - WAFFLE_INCLUDE_DIRS, PATH, ${waffle_root}\include\waffle
   - WAFFLE_LDFLAGS, FILEPATH, ${waffle_root}\lib\waffle-1.lib
   - GLEXT_INCLUDE_DIR, PATH, C:\Program Files\Microsoft Visual Studio 12.0\VC\include\GL
-- 
2.1.0



More information about the Piglit mailing list