Browse Source

Update Cakelisp to remove comptime-only

This makes it less of a mental burden on importing.
zig-compilation
Macoy Madson 2 months ago
parent
commit
8573c94581
  1. 2
      src/Aubio.cake
  2. 2
      src/AutoTest.cake
  3. 2
      src/Dependencies.cake
  4. 4
      src/Dictionary.cake
  5. 4
      src/DynamicArray.cake
  6. 2
      src/ImGui.cake
  7. 2
      src/Image.cake
  8. 2
      src/Introspection.cake
  9. 2
      src/Math.cake
  10. 2
      src/Ogre.cake
  11. 2
      src/OgreInitialize.cake
  12. 2
      src/SDL.cake
  13. 3
      src/STB.cake
  14. 4
      src/TaskSystem.cake
  15. 2
      src/Tracy.cake
  16. 2
      test/src/GameLibTests.cake
  17. 2
      test/src/Loader.cake
  18. 2
      test/src/NoHotReload.cake
  19. 2
      test/src/OgreApp.cake
  20. 2
      test/src/TestAutoInstrument.cake
  21. 4
      test/src/VocalGame.cake

2
src/Aubio.cake

@ -80,7 +80,7 @@
;;
(set-cakelisp-option cakelisp-src-dir "Dependencies/cakelisp/src")
(add-cakelisp-search-directory "Dependencies/cakelisp/runtime")
(import &comptime-only "ComptimeHelpers.cake" "BuildTools.cake" "Dependencies.cake")
(import "ComptimeHelpers.cake" "BuildTools.cake" "Dependencies.cake")
(defun-comptime build-aubio (manager (& ModuleManager) module (* Module) &return bool)
(comptime-cond

2
src/AutoTest.cake

@ -3,7 +3,7 @@
;; e.g. (defun test--SDL (&return int) (return -1)) will show up as a failure
(add-cakelisp-search-directory "Dependencies/cakelisp/runtime")
(import &comptime-only "ComptimeHelpers.cake")
(import "ComptimeHelpers.cake")
(c-import "<stdio.h>")

2
src/Dependencies.cake

@ -1,7 +1,7 @@
(skip-build)
(set-cakelisp-option cakelisp-src-dir "Dependencies/cakelisp/src")
(add-cakelisp-search-directory "Dependencies/cakelisp/runtime")
(import &comptime-only "ComptimeHelpers.cake" "BuildTools.cake" "CHelpers.cake")
(import "ComptimeHelpers.cake" "BuildTools.cake" "CHelpers.cake")
;; Define 'Dependencies-Clone-Only to clone only - useful if you don't want to or cannot use git
;; submodules. For example, gamelib/test clones so I don't need to keep removing the test Dependencies.

4
src/Dictionary.cake

@ -1,10 +1,10 @@
(set-cakelisp-option cakelisp-src-dir "Dependencies/cakelisp/src")
(add-cakelisp-search-directory "Dependencies/cakelisp/runtime")
(import &comptime-only "CHelpers.cake")
(import "CHelpers.cake")
(export-and-evaluate (add-c-search-directory-module "Dependencies/stb"))
(import &comptime-only "STB.cake")
(import "STB.cake")
(use-stb-ds)
;;

4
src/DynamicArray.cake

@ -9,10 +9,10 @@
(set-cakelisp-option cakelisp-src-dir "Dependencies/cakelisp/src")
(add-cakelisp-search-directory "Dependencies/cakelisp/runtime")
(import "FileUtilities.cake" &comptime-only "CHelpers.cake")
(import "FileUtilities.cake" "CHelpers.cake")
(export-and-evaluate (add-c-search-directory-module "Dependencies/stb"))
(import &comptime-only "STB.cake")
(import "STB.cake")
(use-stb-ds)
;; For dynstring

2
src/ImGui.cake

@ -1,4 +1,4 @@
(import &comptime-only "Dependencies.cake" "CHelpers.cake")
(import "Dependencies.cake" "CHelpers.cake")
(c-import "imgui.h")

2
src/Image.cake

@ -2,7 +2,7 @@
;; Interface for loading images of various formats
;; Currently, stb_image.h does all the heavy lifting
(export-and-evaluate (add-c-search-directory-module "Dependencies/stb"))
(import &comptime-only "STB.cake")
(import "STB.cake")
(c-preprocessor-define STB_IMAGE_IMPLEMENTATION)
(c-preprocessor-define STBI_FAILURE_USERMSG)

2
src/Introspection.cake

@ -1,5 +1,5 @@
(import "FileUtilities.cake"
&comptime-only "CHelpers.cake" "ComptimeHelpers.cake")
"CHelpers.cake" "ComptimeHelpers.cake")
(c-import "<stdlib.h>" ;; atoi, atof
"<string.h>" ;; strcmp
"<ctype.h>" ;; For isspace

2
src/Math.cake

@ -9,7 +9,7 @@
(set-cakelisp-option cakelisp-src-dir "Dependencies/cakelisp/src")
(import &comptime-only "Dependencies.cake" "CHelpers.cake")
(import "Dependencies.cake" "CHelpers.cake")
(c-import "<stdio.h>")

2
src/Ogre.cake

@ -3,7 +3,7 @@
(import
"OgreInitialize.cake"
&comptime-only "CHelpers.cake" "BuildTools.cake" "Dependencies.cake")
"CHelpers.cake" "BuildTools.cake" "Dependencies.cake")
(c-import "<stdio.h>"
;; Ogre dependencies

2
src/OgreInitialize.cake

@ -1,7 +1,7 @@
;; Most of this file comes from the Ogre 2 basic project. It's customized now. Once I get more
;; familiar with Ogre, I'll probably try to move this file into Ogre.cake or something, which
;; currently acts as my "custom code"/integration file
(import &comptime-only "CHelpers.cake" "CppHelpers.cake")
(import "CHelpers.cake" "CppHelpers.cake")
(c-import
"OgreArchiveManager.h"

2
src/SDL.cake

@ -1,7 +1,7 @@
(set-cakelisp-option cakelisp-src-dir "Dependencies/cakelisp/src")
(add-cakelisp-search-directory "Dependencies/cakelisp/runtime")
(import &comptime-only "CHelpers.cake" "BuildTools.cake" "Dependencies.cake")
(import "CHelpers.cake" "BuildTools.cake" "Dependencies.cake")
(c-import "stdio.h"
"SDL.h"

3
src/STB.cake

@ -1,5 +1,4 @@
(skip-build)
(import &comptime-only "Dependencies.cake")
(import "Dependencies.cake")
;; Add all the necessary includes, defines, download the repo, etc.
(defmacro use-stb-ds ()

4
src/TaskSystem.cake

@ -1,5 +1,5 @@
;; TaskSystem.cake: Interface into task-based multithreading
(import &comptime-only "ComptimeHelpers.cake" "CHelpers.cake")
(import "ComptimeHelpers.cake" "CHelpers.cake")
(c-import "stdlib.h" ;; malloc, free
"string.h") ;; memset
@ -761,7 +761,7 @@
;;
(comptime-cond
('auto-test
(import &comptime-only "CHelpers.cake") ;; array-size
(import "CHelpers.cake") ;; array-size
(c-import "stdio.h" "stdlib.h")
;; Only used on hand-written enki calls

2
src/Tracy.cake

@ -1,7 +1,7 @@
(set-cakelisp-option cakelisp-src-dir "Dependencies/cakelisp/src")
(add-cakelisp-search-directory "Dependencies/cakelisp/runtime")
(import &comptime-only "ComptimeHelpers.cake" "Dependencies.cake" "BuildTools.cake")
(import "ComptimeHelpers.cake" "Dependencies.cake" "BuildTools.cake")
(c-import &with-decls "Tracy.hpp" "TracyC.h")

2
test/src/GameLibTests.cake

@ -3,7 +3,7 @@
(set-cakelisp-option cakelisp-src-dir "Dependencies/cakelisp/src")
(add-cakelisp-search-directory "Dependencies/cakelisp/runtime")
(import &comptime-only "BuildTools.cake" "ComptimeHelpers.cake" "CHelpers.cake" "Cakelisp.cake")
(import "BuildTools.cake" "ComptimeHelpers.cake" "CHelpers.cake" "Cakelisp.cake")
;; We don't actually test anything here; we use comptime to run the tests
(defun main (&return int)

2
test/src/Loader.cake

@ -19,7 +19,7 @@
;; "src/SDL.cake")
(add-cakelisp-search-directory "Dependencies/cakelisp/runtime")
(import &comptime-only "Options.cake")
(import "Options.cake")
;; TODO: Should this happen automatically, because import automatically adds current working dir?
;; Should it add working dir?
(add-c-search-directory-module ".")

2
test/src/NoHotReload.cake

@ -1,5 +1,5 @@
(add-cakelisp-search-directory "Dependencies/cakelisp/runtime")
(import &comptime-only "CHelpers.cake")
(import "CHelpers.cake")
(declare-extern-function
reloadableEntryPoint (&return bool))

2
test/src/OgreApp.cake

@ -1,6 +1,6 @@
(set-cakelisp-option cakelisp-src-dir "Dependencies/cakelisp/src")
(import "Ogre.cake" &comptime-only "AssetBuilder.cake")
(import "Ogre.cake" "AssetBuilder.cake")
;; TODO: Should this happen automatically, because import automatically adds current working dir?
;; Should it add working dir?
(add-c-search-directory-module ".")

2
test/src/TestAutoInstrument.cake

@ -1,6 +1,6 @@
;; This might not be strictly necessary because auto-instrument imports Tracy for us. For now I'll
;; keep it until I figure out a better way to have instrument handle profiler selection
(import &comptime-only "Tracy.cake")
(import "Tracy.cake")
(c-import "<stdio.h>")

4
test/src/VocalGame.cake

@ -1,6 +1,6 @@
(set-cakelisp-option executable-output "VocalGame")
(import &comptime-only "Options.cake" "ComptimeHelpers.cake" "AssetBuilder.cake")
(import "Options.cake" "ComptimeHelpers.cake" "AssetBuilder.cake")
(import "Ogre.cake" "OgreInitialize.cake" "SDL.cake" "Math.cake" "Tracy.cake" "Aubio.cake")
@ -688,4 +688,4 @@
(use-ogre-build-options) ;; Only needed for the dependency
(add-cpp-build-dependency "OgreHlms.cpp")
(import &comptime-only "Dependencies.cake")
(import "Dependencies.cake")

Loading…
Cancel
Save