summaryrefslogtreecommitdiff
path: root/api_test/CMakeLists.txt
blob: b2ab2c86a2d186f1655f302852299ccc09527521 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
add_executable(api_test
  harness.c
  harness.h
  main.c
)
include_directories(
  ${PROJECT_SOURCE_DIR}/src
  ${PROJECT_BINARY_DIR}/src
)
target_link_libraries(api_test libcmark)

# Compiler flags
if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
  set_target_properties(api_test PROPERTIES COMPILE_FLAGS
    "-std=c99 -Wall -Wextra"
  )
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
  set_target_properties(api_test PROPERTIES COMPILE_FLAGS "/TP /W4")
endif()