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
8
8
compiler :
9
9
- clang
10
10
- gcc
11
+ matrix :
12
+ include :
13
+ - os : linux
14
+ compiler : gcc
15
+ env : CMAKE_OPTIONS="-DCMARK_SHARED=OFF"
11
16
addons :
12
17
apt :
13
18
# we need a more recent cmake than travis/linux provides (at least 2.8.9):
@@ -26,7 +31,7 @@ before_install:
26
31
fi
27
32
28
33
script :
29
- - make
34
+ - (mkdir -p build && cd build && cmake $CMAKE_OPTIONS ..)
30
35
- make test
31
36
- |
32
37
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)
27
27
option (CMARK_LIB_FUZZER "Build libFuzzer fuzzing harness" OFF )
28
28
29
29
add_subdirectory (src )
30
- if (CMARK_TESTS AND CMARK_SHARED )
30
+ if (CMARK_TESTS AND ( CMARK_SHARED OR CMARK_STATIC ) )
31
31
add_subdirectory (api_test )
32
32
endif ()
33
33
add_subdirectory (man )
Original file line number Diff line number Diff line change @@ -8,7 +8,11 @@ include_directories(
8
8
${PROJECT_SOURCE_DIR} /src
9
9
${PROJECT_BINARY_DIR} /src
10
10
)
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 ()
12
16
13
17
# Compiler flags
14
18
if (MSVC )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ else(SPEC_TESTS)
9
9
find_package (PythonInterp 3 )
10
10
endif (SPEC_TESTS )
11
11
12
- if (CMARK_SHARED )
12
+ if (CMARK_SHARED OR CMARK_STATIC )
13
13
add_test (NAME api_test COMMAND api_test )
14
14
endif ()
15
15
@@ -41,14 +41,14 @@ IF (PYTHONINTERP_FOUND)
41
41
"--library-dir" "${CMAKE_CURRENT_BINARY_DIR} /../src"
42
42
)
43
43
44
- add_test (roundtriptest_executable
44
+ add_test (roundtriptest_library
45
45
${PYTHON_EXECUTABLE}
46
46
"${CMAKE_CURRENT_SOURCE_DIR} /roundtrip_tests.py"
47
47
"--spec" "${CMAKE_CURRENT_SOURCE_DIR} /spec.txt"
48
48
"--library-dir" "${CMAKE_CURRENT_BINARY_DIR} /../src"
49
49
)
50
50
51
- add_test (entity_executable
51
+ add_test (entity_library
52
52
${PYTHON_EXECUTABLE}
53
53
"${CMAKE_CURRENT_SOURCE_DIR} /entity_tests.py"
54
54
"--library-dir" "${CMAKE_CURRENT_BINARY_DIR} /../src"
You can’t perform that action at this time.
0 commit comments