mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-13 11:45:45 +03:00
26 lines
740 B
CMake
26 lines
740 B
CMake
add_executable(api_test
|
|
cplusplus.cpp
|
|
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(MSVC)
|
|
# Force to always compile with W4
|
|
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
|
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
|
else()
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
|
|
endif()
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127 /wd4244 /wd4267 /wd4706 /wd4800 /D_CRT_SECURE_NO_WARNINGS")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /TP")
|
|
elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=c99 -pedantic")
|
|
endif()
|