eagler-teavm-fork/samples/pi/CMakeLists.txt

16 lines
419 B
CMake
Raw Permalink Normal View History

2023-01-03 06:29:13 -08:00
cmake_minimum_required(VERSION 3.9)
project(calc_pi C)
set(CMAKE_C_STANDARD 11)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/build/dist)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
add_executable(calc_pi build/generated/teavm/c/all.c)
target_link_libraries(calc_pi m rt)