aboutsummaryrefslogtreecommitdiff
path: root/api_test/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'api_test/CMakeLists.txt')
-rw-r--r--api_test/CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/api_test/CMakeLists.txt b/api_test/CMakeLists.txt
new file mode 100644
index 0000000..b2ab2c8
--- /dev/null
+++ b/api_test/CMakeLists.txt
@@ -0,0 +1,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()