From 80e79e2fef63e2fc43641bd8eb0bd220af54fa4c Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 26 Feb 2011 09:30:42 -0800 Subject: [PATCH] Added support for tcc. --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fdd287910..5c5f3da6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,19 @@ cmake_minimum_required(VERSION 2.4) project (example C) +if (${CMAKE_C_COMPILER} MATCHES ".*tcc") + set(CMAKE_C_FLAGS "-Wall -g") + add_definitions(-DTINYCC) +endif(${CMAKE_C_COMPILER} MATCHES ".*tcc") + +if (${CMAKE_C_COMPILER} MATCHES ".*gcc") + set(CMAKE_C_FLAGS "-g -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts") +endif(${CMAKE_C_COMPILER} MATCHES ".*gcc") + if (WIN32) add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE) else (WIN32) include_directories (/usr/include/lua5.1/ /usr/include/libxml2) - set(CMAKE_C_FLAGS "-g -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts") endif (WIN32) include_directories (../external ../shared/src)