Skip to content

Commit ed97c59

Browse files
committed
cmake: fix windows compilation
1 parent 3627077 commit ed97c59

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ IF(MSVC)
103103
TARGET_COMPILE_OPTIONS(${PROJECT_NAME} PUBLIC "/bigobj")
104104
ENDIF()
105105

106+
# Do not report:
107+
# -Wconversion as the BOOST_PYTHON_FUNCTION_OVERLOADS implicitly converts.
108+
# -Wcomment as latex equations have multi-line comments.
109+
IF(NOT WIN32)
110+
TARGET_COMPILE_OPTIONS(${PROJECT_NAME} PRIVATE -Wno-conversion -Wno-comment)
111+
ENDIF(NOT WIN32)
112+
IF(WIN32)
113+
TARGET_COMPILE_DEFINITIONS(${PYWRAP} PRIVATE -DNOMINMAX)
114+
TARGET_LINK_LIBRARIES(${PYWRAP} PUBLIC ${PYTHON_LIBRARY})
115+
ENDIF(WIN32)
116+
106117
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME}
107118
SYSTEM PUBLIC
108119
${Boost_INCLUDE_DIRS}

0 commit comments

Comments
 (0)