Skip to content

Commit 772c4cb

Browse files
committed
Also run API tests with CMARK_SHARED=OFF
1 parent 736d8a3 commit 772c4cb

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ option(CMARK_SHARED "Build shared libcmark library" ON)
2727
option(CMARK_LIB_FUZZER "Build libFuzzer fuzzing harness" OFF)
2828

2929
add_subdirectory(src)
30-
if(CMARK_TESTS AND CMARK_SHARED)
30+
if(CMARK_TESTS AND (CMARK_SHARED OR CMARK_STATIC))
3131
add_subdirectory(api_test)
3232
endif()
3333
add_subdirectory(man)

api_test/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ include_directories(
88
${PROJECT_SOURCE_DIR}/src
99
${PROJECT_BINARY_DIR}/src
1010
)
11-
target_link_libraries(api_test libcmark)
11+
if(CMARK_SHARED)
12+
target_link_libraries(api_test libcmark)
13+
else()
14+
target_link_libraries(api_test libcmark_static)
15+
endif()
1216

1317
# Compiler flags
1418
if(MSVC)

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ else(SPEC_TESTS)
99
find_package(PythonInterp 3)
1010
endif(SPEC_TESTS)
1111

12-
if (CMARK_SHARED)
12+
if (CMARK_SHARED OR CMARK_STATIC)
1313
add_test(NAME api_test COMMAND api_test)
1414
endif()
1515

0 commit comments

Comments
 (0)