Skip to content

Commit 6b6155d

Browse files
committed
Merge branch 'release/6.7.0'
2 parents a7feea6 + 65d60ff commit 6b6155d

File tree

114 files changed

+96467
-179194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+96467
-179194
lines changed

.astylerc

+8-13
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,22 @@
2828
--lineend=linux
2929

3030

31-
# Add brackets to one-liners
32-
--add-brackets
31+
# Add braces to one-liners
32+
--add-braces
3333

3434

3535
# Pad with blank lines
3636
--break-blocks
3737

3838

3939
# Pad with spaces
40+
--pad-comma
4041
--pad-oper
4142
--pad-header
43+
--pad-method-prefix
44+
--pad-method-colon=none
45+
--pad-return-type
46+
--unpad-param-type
4247

4348

4449
# Pointers/References
@@ -51,16 +56,6 @@
5156

5257

5358
# Excludes
54-
--exclude="Sources/libMultiMarkdown/scanners.c"
55-
--exclude="Sources/libMultiMarkdown/parser.c"
56-
--exclude="Sources/libMultiMarkdown/lexer.c"
57-
58-
--exclude="Sources/libMultiMarkdown/i18n.h"
59-
--exclude="Sources/libMultiMarkdown/miniz.c"
60-
--exclude="Sources/libMultiMarkdown/miniz.h"
61-
--exclude="Sources/libMultiMarkdown/uthash.h"
62-
63-
--exclude="Sources/multimarkdown/argtable3.c"
64-
--exclude="Sources/multimarkdown/argtable3.h"
6559

6660
--ignore-exclude-errors
61+

.github/workflows/ci.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Makefile CI
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
9+
jobs:
10+
build:
11+
12+
strategy:
13+
matrix:
14+
platform: [ubuntu-latest, macos-latest]
15+
16+
runs-on: ${{ matrix.platform }}
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Configure make
22+
run: make release
23+
24+
- name: Test build
25+
run: cd build && make all
26+
27+
- name: Test install
28+
run: cd build && sudo make install
29+
30+
- name: Run tests
31+
run: cd build && ctest
32+
33+
build-windows:
34+
35+
strategy:
36+
matrix:
37+
platform: [windows-latest]
38+
39+
runs-on: ${{ matrix.platform }}
40+
41+
steps:
42+
- uses: actions/checkout@v3
43+
44+
- name: Configure make
45+
run: mkdir build && cd build && cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..
46+
47+
- name: Test build
48+
run: cd build && make
49+
50+
- name: Run tests
51+
run: cd build && ctest

CMakeLists.txt

+56-18
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# See the LICENSE file for copyright and licensing information.
77
#
88

9-
cmake_minimum_required(VERSION 2.6)
9+
cmake_minimum_required(VERSION 2.9)
1010

1111

1212
# ===================
@@ -18,16 +18,16 @@ cmake_minimum_required(VERSION 2.6)
1818
set (My_Project_Title "libMultiMarkdown")
1919
set (My_Project_Description "Lightweight markup processor to produce HTML, LaTeX, and more.")
2020
set (My_Project_Author "Fletcher T. Penney")
21-
set (My_Project_Revised_Date "2020-10-28")
21+
set (My_Project_Revised_Date "2023-06-10")
2222
set (My_Project_Version_Major 6)
23-
set (My_Project_Version_Minor 6)
23+
set (My_Project_Version_Minor 7)
2424
set (My_Project_Version_Patch 0)
2525

26-
set (My_Project_Copyright_Date "2016 - 2020")
26+
set (My_Project_Copyright_Date "2016 - 2023")
2727

2828
set (My_Project_Identifier "net.fletcherpenney.multimarkdown")
2929

30-
string(TIMESTAMP My_Build_Version "%Y.%m.%d.%H.%M")
30+
string(TIMESTAMP My_Build_Version "%Y.%m.%d.%H.%M" UTC)
3131

3232

3333
# Search for included files here
@@ -165,6 +165,19 @@ endif (POLICY CMP0048)
165165

166166
project (${My_Project_Title} VERSION "${My_Project_Version}")
167167

168+
# from http://stackoverflow.com/questions/25199677/how-to-detect-if-current-scope-has-a-parent-in-cmake
169+
get_directory_property(hasParent PARENT_DIRECTORY)
170+
171+
if (hasParent)
172+
else()
173+
# If building the framework independently, we canset a deployment target
174+
# set (CMAKE_OSX_DEPLOYMENT_TARGET "10.12")
175+
176+
if (CMAKE_GENERATOR MATCHES "Xcode")
177+
set (CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)")
178+
endif()
179+
endif()
180+
168181

169182
# Search source directory
170183
include_directories(${PROJECT_SOURCE_DIR}/src)
@@ -198,11 +211,27 @@ set_target_properties("${My_Project_Title}"
198211
XCODE_ATTRIBUTE_FRAMEWORK_SEARCH_PATHS "${XCODE_ATTRIBUTE_FRAMEWORK_SEARCH_PATHS} ${framework_search_paths_string}"
199212
PUBLIC_HEADER "${public_headers}"
200213
ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
214+
XCODE_ATTRIBUTE_DEFINES_MODULE YES
215+
XCODE_ATTRIBUTE_MODULEMAP_FILE "src/module.modulemap"
216+
# XCODE_ATTRIBUTE_CONFIGURATION_BUILD_DIR "$SYMROOT/$CONFIGURATION"
201217
)
202218

219+
if (hasParent)
220+
else()
221+
set_target_properties("${My_Project_Title}"
222+
PROPERTIES
223+
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH[variant=Debug] YES
224+
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH[variant=MinSizeRel] NO
225+
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH[variant=RelWithDebInfo] NO
226+
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH[variant=Release] NO
227+
XCODE_LINK_BUILD_PHASE_MODE "KNOWN_LOCATION"
228+
)
229+
endif()
230+
203231
# Link to other libraries
204232
target_link_libraries("${My_Project_Title}"
205233
${libraries_to_link}
234+
m
206235
)
207236

208237
# Link to Apple Cocoa Framework?
@@ -272,10 +301,6 @@ configure_file (
272301
# Build Test Suite with CuTest (unit testing)
273302
# ===========================================
274303

275-
# from http://stackoverflow.com/questions/25199677/how-to-detect-if-current-scope-has-a-parent-in-cmake
276-
get_directory_property(hasParent PARENT_DIRECTORY)
277-
278-
279304
set(test_files
280305
test/CuTest.c
281306
test/CuTest.h
@@ -343,17 +368,30 @@ endif()
343368
# Build MultiMarkdown app
344369
if (hasParent)
345370
else()
346-
add_executable(multimarkdown
347-
src/d_string.c
371+
if (DEFINED TEST)
372+
else ()
373+
add_executable(multimarkdown
374+
src/d_string.c
348375

349-
src/main.c
350-
src/argtable3.c
376+
src/main.c
377+
src/argtable3.c
351378

352-
${private_headers}
353-
${public_headers}
354-
)
379+
${private_headers}
380+
${public_headers}
381+
)
382+
383+
target_link_libraries(multimarkdown "${My_Project_Title}")
355384

356-
target_link_libraries(multimarkdown "${My_Project_Title}")
385+
set_target_properties(multimarkdown
386+
PROPERTIES
387+
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH[variant=Debug] YES
388+
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH[variant=MinSizeRel] NO
389+
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH[variant=RelWithDebInfo] NO
390+
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH[variant=Release] NO
391+
XCODE_LINK_BUILD_PHASE_MODE "KNOWN_LOCATION"
392+
)
393+
394+
endif()
357395
endif()
358396

359397

@@ -532,7 +570,7 @@ else (hasParent)
532570
"${PROJECT_BINARY_DIR}/LICENSE.txt"
533571
"${PROJECT_BINARY_DIR}/README.txt"
534572
COMPONENT Docs
535-
DESTINATION .
573+
DESTINATION share/doc/MultiMarkdown
536574
)
537575
set (CPACK_COMPONENT_DOCS_DISPLAY_NAME "Documentation")
538576
set (CPACK_COMPONENT_DOCS_DESCRIPTION "Install README and LICENSE.")
798 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)