Consistently use TRUE/FALSE in CMakeLists.txt

Instead of ON/OFF and 1/0. TRUE/FALSE are the original Boolean classes:
https://cmake.org/pipermail/cmake/2007-December/018548.html

Bug: b/145758253
Change-Id: Ida6a0d81da37914a01d7da9ecf2bb2d2f840e369
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42148
Tested-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eff9c36..3d9e9f1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,9 +19,9 @@
 ###########################################################
 
 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
-    set(LINUX ON)
+    set(LINUX TRUE)
 elseif(CMAKE_SYSTEM_NAME MATCHES "Android")
-    set(ANDROID ON)
+    set(ANDROID TRUE)
     set(CMAKE_CXX_FLAGS "-DANDROID_NDK_BUILD")
 elseif(WIN32)
 elseif(APPLE)
@@ -55,7 +55,7 @@
     endif()
 endif()
 
-set(CMAKE_MACOSX_RPATH ON)
+set(CMAKE_MACOSX_RPATH TRUE)
 
 if ((CMAKE_GENERATOR MATCHES "Visual Studio") AND (CMAKE_GENERATOR_TOOLSET STREQUAL ""))
   message(WARNING "Visual Studio generators use the x86 host compiler by "
@@ -100,38 +100,38 @@
     endif()
 endfunction()
 
-option_if_not_defined(SWIFTSHADER_BUILD_EGL "Build the EGL library" 1)
-option_if_not_defined(SWIFTSHADER_BUILD_GLESv2 "Build the OpenGL ES 2 library" 1)
-option_if_not_defined(SWIFTSHADER_BUILD_GLES_CM "Build the OpenGL ES 1.1 library" 1)
-option_if_not_defined(SWIFTSHADER_BUILD_VULKAN "Build the Vulkan library" 1)
-option_if_not_defined(SWIFTSHADER_BUILD_PVR "Fetch and build the PowerVR examples" 0)
+option_if_not_defined(SWIFTSHADER_BUILD_EGL "Build the EGL library" TRUE)
+option_if_not_defined(SWIFTSHADER_BUILD_GLESv2 "Build the OpenGL ES 2 library" TRUE)
+option_if_not_defined(SWIFTSHADER_BUILD_GLES_CM "Build the OpenGL ES 1.1 library" TRUE)
+option_if_not_defined(SWIFTSHADER_BUILD_VULKAN "Build the Vulkan library" TRUE)
+option_if_not_defined(SWIFTSHADER_BUILD_PVR "Fetch and build the PowerVR examples" FALSE)
 
-option_if_not_defined(SWIFTSHADER_USE_GROUP_SOURCES "Group the source files in a folder tree for Visual Studio" 1)
+option_if_not_defined(SWIFTSHADER_USE_GROUP_SOURCES "Group the source files in a folder tree for Visual Studio" TRUE)
 
-option_if_not_defined(SWIFTSHADER_BUILD_SAMPLES "Build sample programs" 1)
-option_if_not_defined(SWIFTSHADER_BUILD_TESTS "Build test programs" 1)
-option_if_not_defined(SWIFTSHADER_BUILD_BENCHMARKS "Build benchmarks" 0)
+option_if_not_defined(SWIFTSHADER_BUILD_SAMPLES "Build sample programs" TRUE)
+option_if_not_defined(SWIFTSHADER_BUILD_TESTS "Build test programs" TRUE)
+option_if_not_defined(SWIFTSHADER_BUILD_BENCHMARKS "Build benchmarks" FALSE)
 
-option_if_not_defined(SWIFTSHADER_MSAN "Build with memory sanitizer" 0)
-option_if_not_defined(SWIFTSHADER_ASAN "Build with address sanitizer" 0)
-option_if_not_defined(SWIFTSHADER_TSAN "Build with thread sanitizer" 0)
-option_if_not_defined(SWIFTSHADER_UBSAN "Build with undefined behavior sanitizer" 0)
-option_if_not_defined(SWIFTSHADER_WARNINGS_AS_ERRORS "Treat all warnings as errors" 1)
-option_if_not_defined(SWIFTSHADER_DCHECK_ALWAYS_ON "Check validation macros even in release builds" 0)
-option_if_not_defined(REACTOR_EMIT_DEBUG_INFO "Emit debug info for JIT functions" 0)
-option_if_not_defined(REACTOR_EMIT_PRINT_LOCATION "Emit printing of location info for JIT functions" 0)
-option_if_not_defined(REACTOR_ENABLE_PRINT "Enable RR_PRINT macros" 0)
-option_if_not_defined(REACTOR_VERIFY_LLVM_IR "Check reactor-generated LLVM IR is valid even in release builds" 0)
-option_if_not_defined(SWIFTSHADER_LESS_DEBUG_INFO "Generate less debug info to reduce file size" 0)
-option_if_not_defined(SWIFTSHADER_ENABLE_VULKAN_DEBUGGER "Enable Vulkan debugger support" 0)
-option_if_not_defined(SWIFTSHADER_ENABLE_ASTC "Enable ASTC compressed textures support" 1)  # TODO(b/150130101)
+option_if_not_defined(SWIFTSHADER_MSAN "Build with memory sanitizer" FALSE)
+option_if_not_defined(SWIFTSHADER_ASAN "Build with address sanitizer" FALSE)
+option_if_not_defined(SWIFTSHADER_TSAN "Build with thread sanitizer" FALSE)
+option_if_not_defined(SWIFTSHADER_UBSAN "Build with undefined behavior sanitizer" FALSE)
+option_if_not_defined(SWIFTSHADER_WARNINGS_AS_ERRORS "Treat all warnings as errors" TRUE)
+option_if_not_defined(SWIFTSHADER_DCHECK_ALWAYS_ON "Check validation macros even in release builds" FALSE)
+option_if_not_defined(REACTOR_EMIT_DEBUG_INFO "Emit debug info for JIT functions" FALSE)
+option_if_not_defined(REACTOR_EMIT_PRINT_LOCATION "Emit printing of location info for JIT functions" FALSE)
+option_if_not_defined(REACTOR_ENABLE_PRINT "Enable RR_PRINT macros" FALSE)
+option_if_not_defined(REACTOR_VERIFY_LLVM_IR "Check reactor-generated LLVM IR is valid even in release builds" FALSE)
+option_if_not_defined(SWIFTSHADER_LESS_DEBUG_INFO "Generate less debug info to reduce file size" FALSE)
+option_if_not_defined(SWIFTSHADER_ENABLE_VULKAN_DEBUGGER "Enable Vulkan debugger support" FALSE)
+option_if_not_defined(SWIFTSHADER_ENABLE_ASTC "Enable ASTC compressed textures support" TRUE)  # TODO(b/150130101)
 
 set(BUILD_MARL ${SWIFTSHADER_BUILD_VULKAN})
 
 if(${SWIFTSHADER_BUILD_VULKAN} AND ${SWIFTSHADER_ENABLE_VULKAN_DEBUGGER})
-    set_if_not_defined(SWIFTSHADER_BUILD_CPPDAP 1)
+    set_if_not_defined(SWIFTSHADER_BUILD_CPPDAP TRUE)
 else()
-    set_if_not_defined(SWIFTSHADER_BUILD_CPPDAP 0)
+    set_if_not_defined(SWIFTSHADER_BUILD_CPPDAP FALSE)
 endif()
 
 set(DEFAULT_REACTOR_BACKEND "LLVM")
@@ -157,7 +157,7 @@
     message(FATAL_ERROR "In source builds are not allowed by LLVM, please create a build/ directory and build from there. You may have to delete the CMakeCache.txt file and CMakeFiles directory that are next to the CMakeLists.txt.")
 endif()
 
-set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+set_property(GLOBAL PROPERTY USE_FOLDERS TRUE)
 
 ###########################################################
 # Initialize submodules
@@ -251,7 +251,7 @@
 
         execute_process(COMMAND git submodule update --init ${CMAKE_CURRENT_SOURCE_DIR}/third_party/PowerVR_Examples)
     endif()
-    set(PVR_BUILD_EXAMPLES ON CACHE BOOL "Build the PowerVR SDK Examples" FORCE)
+    set(PVR_BUILD_EXAMPLES TRUE CACHE BOOL "Build the PowerVR SDK Examples" FORCE)
 endif()
 
 ###########################################################