Skip to content

Commit

Permalink
Windows build fix. Part
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander.A.Utkin committed Aug 23, 2024
1 parent 1c1b12a commit 4e10bdc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
__pycache__
build/*
.idea/
build*/
dist/*
pyreindexer.egg-info/*
qa_test/logs/
12 changes: 8 additions & 4 deletions pyreindexer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.0..3.13)

project(pyreindexer)

Expand All @@ -23,9 +23,13 @@ set(LIBS_EXT ".so")
set(LIBSRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/src)
set(RESOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/include)

set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wall -Wextra -Werror -Wno-unused-parameter -fexceptions")
string (REPLACE "-O2" "-O3" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
if(MSVC)
add_compile_options(/WX /EHsc -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX)
else(MSVC)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wall -Wextra -Werror -Wno-unused-parameter -fexceptions")
string (REPLACE "-O2" "-O3" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endif(MSVC)

file(GLOB_RECURSE SRCS ${RESOURCES_DIR}/*.cc ${LIBSRC_DIR}/*.cc)

Expand Down

0 comments on commit 4e10bdc

Please sign in to comment.