summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2017-11-18 16:08:55 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2017-11-18 16:16:01 +0100
commit772c4cbde52f1f295f66bb80a55d3db446742094 (patch)
treebd9c7a8837538412f99877147c4d3e11d61ac2e6
parent736d8a3d81ab2ac8e5556f2dd5f6fed9d9137d18 (diff)
Also run API tests with CMARK_SHARED=OFF
-rwxr-xr-xCMakeLists.txt2
-rw-r--r--api_test/CMakeLists.txt6
-rwxr-xr-xtest/CMakeLists.txt2
3 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4eb0541..a25b269 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,7 +27,7 @@ option(CMARK_SHARED "Build shared libcmark library" ON)
option(CMARK_LIB_FUZZER "Build libFuzzer fuzzing harness" OFF)
add_subdirectory(src)
-if(CMARK_TESTS AND CMARK_SHARED)
+if(CMARK_TESTS AND (CMARK_SHARED OR CMARK_STATIC))
add_subdirectory(api_test)
endif()
add_subdirectory(man)
diff --git a/api_test/CMakeLists.txt b/api_test/CMakeLists.txt
index 3151ccc..2701abb 100644
--- a/api_test/CMakeLists.txt
+++ b/api_test/CMakeLists.txt
@@ -8,7 +8,11 @@ include_directories(
${PROJECT_SOURCE_DIR}/src
${PROJECT_BINARY_DIR}/src
)
-target_link_libraries(api_test libcmark)
+if(CMARK_SHARED)
+ target_link_libraries(api_test libcmark)
+else()
+ target_link_libraries(api_test libcmark_static)
+endif()
# Compiler flags
if(MSVC)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index ae7d10d..5c07fb7 100755
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -9,7 +9,7 @@ else(SPEC_TESTS)
find_package(PythonInterp 3)
endif(SPEC_TESTS)
-if (CMARK_SHARED)
+if (CMARK_SHARED OR CMARK_STATIC)
add_test(NAME api_test COMMAND api_test)
endif()