File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed
Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ language: c
88compiler :
99 - clang
1010 - gcc
11+ matrix :
12+ include :
13+ - os : linux
14+ compiler : gcc
15+ env : CMAKE_OPTIONS="-DCMARK_SHARED=OFF"
1116addons :
1217 apt :
1318 # we need a more recent cmake than travis/linux provides (at least 2.8.9):
@@ -26,7 +31,7 @@ before_install:
2631 fi
2732
2833script :
29- - make
34+ - (mkdir -p build && cd build && cmake $CMAKE_OPTIONS ..)
3035 - make test
3136 - |
3237 if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ]
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ option(CMARK_SHARED "Build shared libcmark library" ON)
2727option (CMARK_LIB_FUZZER "Build libFuzzer fuzzing harness" OFF )
2828
2929add_subdirectory (src)
30- if (CMARK_TESTS AND CMARK_SHARED)
30+ if (CMARK_TESTS AND ( CMARK_SHARED OR CMARK_STATIC) )
3131 add_subdirectory (api_test)
3232endif ()
3333add_subdirectory (man)
Original file line number Diff line number Diff 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
1418if (MSVC )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ else(SPEC_TESTS)
99 find_package (PythonInterp 3)
1010endif (SPEC_TESTS)
1111
12- if (CMARK_SHARED)
12+ if (CMARK_SHARED OR CMARK_STATIC )
1313 add_test (NAME api_test COMMAND api_test)
1414endif ()
1515
@@ -41,14 +41,14 @@ IF (PYTHONINTERP_FOUND)
4141 "--library-dir" "${CMAKE_CURRENT_BINARY_DIR} /../src"
4242 )
4343
44- add_test (roundtriptest_executable
44+ add_test (roundtriptest_library
4545 ${PYTHON_EXECUTABLE}
4646 "${CMAKE_CURRENT_SOURCE_DIR} /roundtrip_tests.py"
4747 "--spec" "${CMAKE_CURRENT_SOURCE_DIR} /spec.txt"
4848 "--library-dir" "${CMAKE_CURRENT_BINARY_DIR} /../src"
4949 )
5050
51- add_test (entity_executable
51+ add_test (entity_library
5252 ${PYTHON_EXECUTABLE}
5353 "${CMAKE_CURRENT_SOURCE_DIR} /entity_tests.py"
5454 "--library-dir" "${CMAKE_CURRENT_BINARY_DIR} /../src"
You can’t perform that action at this time.
0 commit comments