Skip to content

Commit 973eb90

Browse files
fix: add vla to be an error
1 parent 153a0dc commit 973eb90

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ project(Algorithms_in_C++
99
set(CMAKE_CXX_STANDARD 17)
1010
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1111

12-
1312
# Additional warnings and errors
14-
set(EXTRA_COMPILE_FLAGS_CXX "-Wno-register -Werror=vla")
15-
1613
if(MSVC)
1714
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
18-
endif(MSVC)
15+
else()
16+
set(EXTRA_COMPILE_FLAGS_CXX "-Wno-register -Werror=vla")
17+
endif()
1918

2019
option(USE_OPENMP "flag to use OpenMP for multithreading" ON)
2120
if(USE_OPENMP)

0 commit comments

Comments
 (0)