023d887d9f
The `COMPILE_LANGUAGE` generator expression was introduced in CMake 3.3. Debian Jessie has an older CMake version bundled, which prevents building on that platform without manually building CMake. This uses a more error-prone mechanism of requiring the commonmark developer to explicitly invoke `cmark_add_compile_options` on the target to ensure that the flags are propagated for the targets without using the generator expression. Adding the options unconditionally prevents using CMark in a build with a non-C programming language. Fixes: #384
13 lines
230 B
CMake
13 lines
230 B
CMake
add_executable(api_test
|
|
cplusplus.cpp
|
|
harness.c
|
|
harness.h
|
|
main.c
|
|
)
|
|
cmark_add_compile_options(api_test)
|
|
if(CMARK_SHARED)
|
|
target_link_libraries(api_test cmark)
|
|
else()
|
|
target_link_libraries(api_test cmark_static)
|
|
endif()
|