From 455e507bef3c0f67521189c97facbe7fe8bac463 Mon Sep 17 00:00:00 2001
From: Y-Less <alex@y-less.com>
Date: Wed, 3 Jan 2024 19:23:03 +0100
Subject: [PATCH] cmake size configuration

Some cmake options back-ported from open.mp, plus `-DsNAMEMAX` and `-DPAWN_CELL_SIZE`.
---
 source/compiler/CMakeLists.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/source/compiler/CMakeLists.txt b/source/compiler/CMakeLists.txt
index aaac94ea..41beba7c 100644
--- a/source/compiler/CMakeLists.txt
+++ b/source/compiler/CMakeLists.txt
@@ -1,6 +1,11 @@
 project(pawnc C)
 cmake_minimum_required(VERSION 2.8)
 
+set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+
+set(sNAMEMAX 31 CACHE INT "The maximum length of function/symbol names")
+set(PAWN_CELL_SIZE 32 CACHE INT "The number of bits in a cell")
+
 list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake)
 
 set(VERSION_MAJOR 3)
@@ -62,6 +67,8 @@ if(APPLE)
   set(CMAKE_MACOSX_RPATH ON)
 endif()
 
+add_definitions(-DsNAMEMAX=${sNAMEMAX} -DPAWN_CELL_SIZE=${PAWN_CELL_SIZE})
+
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in
                ${CMAKE_CURRENT_BINARY_DIR}/version.h)
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
@@ -174,6 +181,7 @@ if(BUILD_TESTING)
     ../amx/amxaux.h
     ../amx/amxcons.c
     ../amx/amxcore.c
+    ../amx/amxstring.c
   )
   if(UNIX)
     set(PAWNRUNS_SRCS