Skip to content

Commit 8946267

Browse files
committed
Create CMakeLists.txt
1 parent a12020d commit 8946267

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Tree/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
cmake_minimum_required ( VERSION 3.20 )
2+
3+
project ( "Tree"
4+
VERSION 1.0.0
5+
DESCRIPTION "Tree Data Structure"
6+
LANGUAGES C CXX
7+
)
8+
9+
set ( CMAKE_C_STANDARD 17 )
10+
set ( CMAKE_C_STANDARD_REQUIRED ON )
11+
set ( CMAKE_C_EXTENSIONS OFF )
12+
13+
set ( CMAKE_CXX_STANDARD 23 )
14+
set ( CMAKE_CXX_STANDARD_REQUIRED ON )
15+
16+
add_executable ( binary_search_tree "search_tree.c" )
17+
18+
if ( MSVC )
19+
target_compile_options ( binary_search_tree PRIVATE /W4 /permissive- /Zc:__cplusplus /EHsc /std:c++latest /experimental:module )
20+
else ()
21+
target_compile_options ( binary_search_tree PRIVATE -Wall -Wextra -pedantic -Werror )
22+
endif ()

0 commit comments

Comments
 (0)