Skip to content

Commit 9b78051

Browse files
set CMARK_USE_CMAKE_HEADERS at the top level
1 parent 2eac3ff commit 9b78051

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.0)
1+
cmake_minimum_required(VERSION 3.12)
22
project(cmark-gfm)
33

44
set(PROJECT_VERSION_MAJOR 0)
@@ -28,6 +28,9 @@ else()
2828
endif()
2929
set(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+
3134
add_subdirectory(src)
3235
add_subdirectory(extensions)
3336
if(CMARK_TESTS AND (CMARK_SHARED OR CMARK_STATIC))

api_test/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,3 @@ if(MSVC)
2929
elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
3030
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=c99 -pedantic")
3131
endif()
32-
33-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCMARK_USE_CMAKE_HEADERS")

extensions/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff 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
110107
if(MSVC)
111108
# Force to always compile with W4

src/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff 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
194191
if(MSVC)
195192
# Force to always compile with W4

0 commit comments

Comments
 (0)