1
0
Fork 0

Better RelWithDebInfo flags for CL.exe

This commit is contained in:
James Turner 2020-05-08 14:32:40 +01:00
parent 6b41eb69eb
commit fe16551cf6
2 changed files with 6 additions and 5 deletions

View file

@ -1,5 +1,5 @@
add_definitions(-DSQLITE_OMIT_LOAD_EXTENSION)
add_definitions(-DNDEBUG)
add_library(fgsqlite3 sqlite3.c)
add_library(fgsqlite3 STATIC sqlite3.c)
target_compile_definitions(fgsqlite3 PRIVATE "SQLITE_OMIT_LOAD_EXTENSION NDEBUG")
set_target_properties(fgsqlite3 PROPERTIES COMPILE_FLAGS "-fpic -fno-fast-math")

View file

@ -494,9 +494,10 @@ if(WIN32)
if(MSVC)
# override CMake default RelWithDebInfo flags. This is important to ensure
# good performance
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob2 /D NDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Zi /O2 /Ob2 /D NDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "/Zi /O2 /Ob2 /D NDEBUG")
set(MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /MP /O2")
set(MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS")
if(ENABLE_SIMD)
if (X86)
SET(CMAKE_C_FLAGS_RELEASE "/O2 /arch:SSE /arch:SSE2")