- removal of -Werror is to quiet this warning promoted to error: - error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension] - 612 | int oppedArray[size][size]; - | ^~~~ --- CMakeLists.txt.orig 2023-04-09 05:04:30 UTC +++ CMakeLists.txt @@ -2,9 +2,9 @@ project(kplib) project(kplib) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror -fPIC") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -fPIC") set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") # Debug mode. -set(CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native") # Default optimization. +set(CMAKE_CXX_FLAGS_RELEASE "-O3") # Default optimization. if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif(NOT CMAKE_BUILD_TYPE)