cmark

My personal build of CMark ✏️

Commit
78168bfef1fa508b5c37220d068d8835184a0404
Parent
b6ffaca93e2b539ec407aeb4fd588c7f9441e7a9
Author
Saleem Abdulrasool <compnerd@compnerd.org>
Date

build: replace `add_compile_definitions` (#321)

Replace `add_compile_definitions` with `add_compile_options` since the former was introduced in 3.12.

Diffstat

1 file changed, 2 insertions, 2 deletions

Status File Name N° Changes Insertions Deletions
Modified CMakeLists.txt 4 2 2
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -35,7 +35,7 @@ if(MSVC)
   add_compile_options($<$<COMPILE_LANGUAGE:C>:/W4>)
   add_compile_options($<$<COMPILE_LANGUAGE:C>:/wd4706>)
   add_compile_options($<$<COMPILE_LANGUAGE:C>:/TP>)
-  add_compile_definitions($<$<COMPILE_LANGUAGE:C>:/D_CRT_SECURE_NO_WARNINGS>)
+  add_compile_options($<$<COMPILE_LANGUAGE:C>:/D_CRT_SECURE_NO_WARNINGS>)
 elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES Clang)
   add_compile_options($<$<COMPILE_LANGUAGE:C>:-Wall>)
   add_compile_options($<$<COMPILE_LANGUAGE:C>:-Wextra>)
@@ -43,7 +43,7 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES Clang)
 endif()
 
 # Check integrity of node structure when compiled as debug
-add_compile_definitions($<$<CONFIG:Debug>:CMARK_DEBUG_NODES>)
+add_compile_options($<$<CONFIG:Debug>:-DCMARK_DEBUG_NODES>)
 
 add_compile_options($<$<AND:$<CONFIG:PROFILE>,$<COMPILE_LANGUAGE:C>>:-pg>)