From fc46123f0a527a364f9a0fb1e7b8b7448fd84b89 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Tue, 18 Nov 2014 21:34:29 +0100 Subject: Set compiler flags for api_test --- api_test/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'api_test/CMakeLists.txt') diff --git a/api_test/CMakeLists.txt b/api_test/CMakeLists.txt index 66629d8..b2ab2c8 100644 --- a/api_test/CMakeLists.txt +++ b/api_test/CMakeLists.txt @@ -9,3 +9,11 @@ include_directories( ) 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() -- cgit v1.2.3