File tree Expand file tree Collapse file tree 4 files changed +4
-9
lines changed Expand file tree Collapse file tree 4 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.0 )
1+ cmake_minimum_required (VERSION 3.12 )
22project (cmark-gfm)
33
44set (PROJECT_VERSION_MAJOR 0)
2828endif ()
2929set (CMAKE_C_STANDARD_REQUIRED YES )
3030
31+ # Use CMake's generated headers instead of the Swift package prebuilt ones
32+ add_compile_definitions (CMARK_USE_CMAKE_HEADERS)
33+
3134add_subdirectory (src)
3235add_subdirectory (extensions)
3336if (CMARK_TESTS AND (CMARK_SHARED OR CMARK_STATIC))
Original file line number Diff line number Diff line change @@ -29,5 +29,3 @@ if(MSVC)
2929elseif (CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID} " STREQUAL "Clang" )
3030 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=c99 -pedantic" )
3131endif ()
32-
33- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCMARK_USE_CMAKE_HEADERS" )
Original file line number Diff line number Diff line change @@ -103,9 +103,6 @@ CHECK_C_SOURCE_COMPILES(
103103 "int main() { __builtin_expect(0,0); return 0; }"
104104 HAVE___BUILTIN_EXPECT)
105105
106- # Use CMake's generated headers instead of the Swift package prebuilt ones
107- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCMARK_USE_CMAKE_HEADERS" )
108-
109106# Always compile with warnings
110107if (MSVC )
111108 # Force to always compile with W4
Original file line number Diff line number Diff line change @@ -187,9 +187,6 @@ CONFIGURE_FILE(
187187 ${CMAKE_CURRENT_SOURCE_DIR} /config.h.in
188188 ${CMAKE_CURRENT_BINARY_DIR} /config.h)
189189
190- # Use CMake's generated headers instead of the Swift package prebuilt ones
191- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCMARK_USE_CMAKE_HEADERS" )
192-
193190# Always compile with warnings
194191if (MSVC )
195192 # Force to always compile with W4
You can’t perform that action at this time.
0 commit comments