aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt17
-rw-r--r--README.md2
2 files changed, 9 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 009c937..7870a3a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,9 @@ cmake_minimum_required(VERSION 3.21)
include(FetchContent)
set(
- discount_patch patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/discount-update-cmake-version.patch
+ discount_patch
+ git reset --hard &&
+ git apply < ${CMAKE_CURRENT_SOURCE_DIR}/discount-update-cmake-version.patch
)
if (DEFINED DISCOUNT_SRC)
@@ -44,22 +46,17 @@ set(SRC
)
set(C_COMPILE_OPTIONS
- # -O3
- # -O0
-
-Wall
-Wextra
- # -Werror
-
- -g3
- -glldb
-std=c99
- -Wno-unused-result
- -Wno-unused-variable
+ -Wno-unused-command-line-argument
)
+set(CMAKE_C_FLAGS_DEBUG "-O0 -g3 -glldb")
+set(CMAKE_C_FLAGS_RELEASE "-s -O3 -Werror")
+
add_executable(msg ${SRC})
target_include_directories(msg PRIVATE include)
diff --git a/README.md b/README.md
index 0f46044..2ddc498 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,8 @@ Usage: ./msg [-h] [-w] [-v] [-o <output>] <directory>
<directory>: Working directory
```
+Here's the CMake command I usually use: `CC=clang cmake -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCMAKE_BUILD_TYPE=Debug ..`
+
### Site Structure
The site structure is actually fairly simple. `/config.cfg` describes the static directories, in this case only "assets." It could be any number of files & folders, though.