summaryrefslogtreecommitdiff
path: root/simclist-1.5/CMakeLists.txt
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-08-03 19:22:36 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-08-03 19:22:36 +0200
commit853bbb3752a5fa2f58ef456ffb6e3a552e13cb11 (patch)
treece49a533f82a42a65fa6a4771a7b8fbfe33798cf /simclist-1.5/CMakeLists.txt
initial commit
Diffstat (limited to 'simclist-1.5/CMakeLists.txt')
-rw-r--r--simclist-1.5/CMakeLists.txt39
1 files changed, 39 insertions, 0 deletions
diff --git a/simclist-1.5/CMakeLists.txt b/simclist-1.5/CMakeLists.txt
new file mode 100644
index 0000000..28f3474
--- /dev/null
+++ b/simclist-1.5/CMakeLists.txt
@@ -0,0 +1,39 @@
+cmake_minimum_required(VERSION 2.6)
+PROJECT(simclist)
+
+# simclist options
+OPTION(SIMCLIST_DEBUG
+ "Build with debug code and debug symbols enabled"
+ OFF)
+OPTION(SIMCLIST_THREADING
+ "Build with simclist threading enable"
+ OFF)
+OPTION(SIMCLIST_NO_DUMPRESTORE
+ "Disable building of dump & restore functionalities"
+ OFF)
+OPTION(SIMCLIST_ALLOW_LOCATIONBASED_HASHES
+ "Allow list_hash() to work exclusively on memory locations"
+ OFF)
+
+# expand selected options
+SET(SIMCCFLAGS "")
+# build with debug?
+IF(SIMCLIST_DEBUG)
+ SET(SIMCCFLAGS "${SIMCCFLAGS} -DSIMCLIST_DEBUG")
+ENDIF(SIMCLIST_DEBUG)
+# build with threading?
+IF(SIMCLIST_THREADING)
+ SET(SIMCCFLAGS "${SIMCCFLAGS} -DSIMCLIST_WITH_THREADS")
+ENDIF(SIMCLIST_THREADING)
+# build without dump/restore functionalities?
+IF(SIMCLIST_NO_DUMPRESTORE)
+ SET(SIMCCFLAGS "${SIMCCFLAGS} -DSIMCLIST_NO_DUMPRESTORE")
+ENDIF(SIMCLIST_NO_DUMPRESTORE)
+IF(SIMCLIST_ALLOW_LOCATIONBASED_HASHES)
+ SET(SIMCCFLAGS "${SIMCCFLAGS} -DSIMCLIST_ALLOW_LOCATIONBASED_HASHES")
+ENDIF(SIMCLIST_ALLOW_LOCATIONBASED_HASHES)
+SET_SOURCE_FILES_PROPERTIES(simclist.c COMPILE_FLAGS "${SIMCCFLAGS}")
+
+# main building stuff
+ADD_LIBRARY(simclist SHARED simclist.c)
+SET(CMAKE_C_FLAGS "-O2 -Wall -std=c99")