leopard/CMakeLists.txt

38 lines
858 B
CMake

cmake_minimum_required(VERSION 3.7)
project(leopard)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
set(CMAKE_CXX_STANDARD 11)
set(LIB_SOURCE_FILES
leopard.cpp
leopard.h
LeopardCommon.cpp
LeopardCommon.h
LeopardFF16.cpp
LeopardFF16.h
LeopardFF8.cpp
LeopardFF8.h)
set(BENCH_SOURCE_FILES
tests/benchmark.cpp)
set(EXPERIMENT_SOURCE_FILES
tests/experiments.cpp)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
add_library(libleopard STATIC ${LIB_SOURCE_FILES})
add_executable(bench_leopard ${BENCH_SOURCE_FILES})
target_link_libraries(bench_leopard libleopard)
add_executable(experiment_leopard ${EXPERIMENT_SOURCE_FILES})