project(fastrng C) cmake_minimum_required(VERSION 2.4) add_definitions(-D_GNU_SOURCE) add_executable(fastrng main.c) set_target_properties(fastrng PROPERTIES COMPILE_FLAGS "-O2 -std=gnu99 -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wsuggest-attribute=noreturn -Wundef -Wpointer-arith -Wcast-qual -Wlogical-op -Wshadow" LINK_FLAGS "") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=address") target_link_libraries(fastrng -lpthread -lgsl -lgslcblas -lssl -lcrypto) install(TARGETS fastrng DESTINATION bin)