PC_graph/CMakeLists.txt
2024-11-25 13:26:54 +01:00

33 lines
760 B
CMake

# Minimum required CMake version
cmake_minimum_required(VERSION 3.10)
# Project name and version
project(Graph VERSION 1.0)
# Specify the C standard
set(CMAKE_C_STANDARD 90)
set(CMAKE_C_STANDARD_REQUIRED True)
# Add the executable target
add_executable(Graph
"main.c"
"lex.c"
"parser.c"
"tree.c"
"ps_graph.c"
)
# Optionally, you can set compiler warnings
if (MSVC)
target_compile_options(Graph PRIVATE /W4)
else()
target_compile_options(Graph PRIVATE -Wall -Wextra -pedantic)
endif()
# link math
target_link_libraries(Graph PRIVATE m)
# Optionally, set the output directory for the executable
# set_target_properties(Graph PROPERTIES
# RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
# )