Skip to content

Commit a6556a8

Browse files
authored
Create CMakeLists.txt
test for Visual Studio builds
1 parent a91eddd commit a6556a8

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

CMakeLists.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
cmake_minimum_required(VERSION 3.10)
2+
project(chess_engine)
3+
4+
# Use C++17
5+
set(CMAKE_CXX_STANDARD 17)
6+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
7+
8+
# Optional: enable warnings (MSVC specific flags)
9+
if (MSVC)
10+
add_compile_options(/W4 /permissive-)
11+
else()
12+
add_compile_options(-Wall -Wextra -pedantic)
13+
endif()
14+
15+
# Add the source files
16+
set(SOURCES
17+
main.cpp
18+
eval.cpp
19+
search.cpp
20+
tt.cpp
21+
move_ordering.cpp
22+
)
23+
24+
# Define the executable
25+
add_executable(${PROJECT_NAME} ${SOURCES})

0 commit comments

Comments
 (0)