libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

commit dc16d1bd2e3ee3e7e8f9127e4ac5d9b5c61645df
parent 323bd261915b9f632f962f19aa86d2f51f2a2341
Author: Frederic Cambus <fred@statdns.com>
Date:   Mon, 18 Oct 2021 22:04:06 +0200

Use CMAKE_C_STANDARD instead of hardcoding compiler flags.

Diffstat:
MCMakeLists.txt | 8++++++--
Mexample/CMakeLists.txt | 8++++++--
Mfuzz/CMakeLists.txt | 8++++++--
3 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -1,10 +1,14 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.1) set(LIB_VERSION_MAJOR 1) set(LIB_VERSION_MINOR 2) set(LIB_VERSION_PATCH 8) set(LIB_VERSION_STRING ${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH}) +set(CMAKE_C_STANDARD 99) +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_C_EXTENSIONS OFF) + project(ansilove C) include(CheckFunctionExists) @@ -33,7 +37,7 @@ if(NOT HAVE_REALLOCARRAY) set(SRC ${SRC} compat/reallocarray.c) endif() -add_definitions(-D_GNU_SOURCE -Wall -Wextra -std=c99 -pedantic) +add_definitions(-D_GNU_SOURCE -Wall -Wextra -pedantic) add_library(ansilove SHARED ${SRC} ${LOADERS}) target_link_libraries(ansilove ${GD_LIBRARIES} m) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt @@ -1,4 +1,8 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.1) + +set(CMAKE_C_STANDARD 99) +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_C_EXTENSIONS OFF) project(example C) @@ -9,7 +13,7 @@ include_directories(${ANSILOVE_INCLUDE_DIRS}) set(SRC example.c) -add_definitions(-Wall -Wextra -std=c99 -pedantic) +add_definitions(-Wall -Wextra -pedantic) add_executable(example ${SRC}) target_link_libraries(example ${ANSILOVE_LIBRARIES}) diff --git a/fuzz/CMakeLists.txt b/fuzz/CMakeLists.txt @@ -1,7 +1,11 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.1) set(CMAKE_C_COMPILER clang) +set(CMAKE_C_STANDARD 99) +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_C_EXTENSIONS OFF) + project(fuzz C) # Ansilove library @@ -17,7 +21,7 @@ set(SRC_PCBOARD pcboard.c) set(SRC_TUNDRA tundra.c) set(SRC_XBIN xbin.c) -add_definitions(-Wall -Wextra -std=c99 -pedantic -fsanitize=fuzzer) +add_definitions(-Wall -Wextra -pedantic -fsanitize=fuzzer) add_executable(ansi ${SRC_ANSI}) add_executable(artworx ${SRC_ANSI}) add_executable(binary ${SRC_BINARY})