-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
30 lines (26 loc) · 873 Bytes
/
CMakeLists.txt
File metadata and controls
30 lines (26 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(cdecl LANGUAGES C)
# Binaries will be under 'bin' directory.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(SOURCES
src/acl_stack.c
src/main.c)
add_executable(${PROJECT_NAME} ${SOURCES})
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src)
if (UNIX)
# Compiling under Cygwin, Linux
# Assumes GCC
target_compile_options(${PROJECT_NAME}
PRIVATE
-Wall
-Wextra
-std=c99
-Wpedantic
-Werror)
elseif(WIN32)
# Compiling under Win32 and Win64
# Assumes Microsoft Visual C++
target_compile_options(${PROJECT_NAME}
PRIVATE
/TP)
endif()