Skip to content

Commit 6326066

Browse files
committed
Create CMakeLists.txt
1 parent 3a96761 commit 6326066

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

LookupTable/CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
cmake_minimum_required(VERSION 3.20)
2+
3+
project(LookupTable
4+
VERSION 1.0
5+
DESCRIPTION "A modern C project using a lookup table"
6+
LANGUAGES C
7+
)
8+
9+
# Set C standard
10+
set(CMAKE_C_STANDARD 17)
11+
set(CMAKE_C_STANDARD_REQUIRED ON)
12+
set(CMAKE_C_EXTENSIONS OFF)
13+
14+
# Enable more warnings on MSVC or GCC/Clang
15+
if(MSVC)
16+
add_compile_options(/W4 /permissive-)
17+
else()
18+
add_compile_options(-Wall -Wextra -pedantic -Werror)
19+
endif()
20+
21+
# Define the executable
22+
add_executable(square_table square_table.c)
23+
add_executable(generate_cube generate_cube.c)

0 commit comments

Comments
 (0)