github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/CMakeLists.txt (about) 1 cmake_minimum_required(VERSION 3.10) 2 3 project(sdk-go VERSION 1.0 DESCRIPTION "CGO Library" LANGUAGES CXX C) 4 5 if(NOT CMAKE_BUILD_TYPE) 6 set (CMAKE_BUILD_TYPE "Debug") 7 endif() 8 9 set(CXX_FLAGS 10 -g 11 -DCHECK_PTHREAD_RETURN_VALUE 12 -D_FILE_OFFSET_BITS=64 13 -Wall 14 -Wextra 15 -Werror 16 # -Wconversion 17 -Wno-unused-parameter 18 # -Wold-style-cast 19 -Woverloaded-virtual 20 -Wpointer-arith 21 -Wshadow 22 -Wwrite-strings 23 -march=native 24 -std=c++11 25 -rdynamic 26 ) 27 28 set(CMAKE_CXX_STANDARD 11) 29 30 set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) 31 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") 32 33 add_subdirectory(api/openapi-spec)