Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite1ea0e7

Browse files
committed
Adding workaround for define in Python.h
1 parent2c7df32 commite1ea0e7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ foreach(ver ${xtensor_python_version_defines})
2525
set(XTENSOR_PYTHON_VERSION_${CMAKE_MATCH_1}"${CMAKE_MATCH_2}"CACHEINTERNAL"")
2626
endif()
2727
endforeach()
28-
set(${PROJECT_NAME}_VERSION
28+
set(${PROJECT_NAME}_VERSION
2929
${XTENSOR_PYTHON_VERSION_MAJOR}.${XTENSOR_PYTHON_VERSION_MINOR}.${XTENSOR_PYTHON_VERSION_PATCH})
3030
message(STATUS"xtensor-python v${${PROJECT_NAME}_VERSION}")
3131

@@ -45,7 +45,7 @@ else()
4545
find_package(xtensor${xtensor_REQUIRED_VERSION} REQUIRED)
4646
message(STATUS"Found xtensor:${xtensor_INCLUDE_DIRS}/xtensor")
4747
endif()
48-
48+
4949
# Currently no required version for pybind11
5050
if(TARGET pybind11ORTARGET pybind11::headers)
5151
# pybind11 has a variable that indicates its version already, so use that
@@ -80,6 +80,10 @@ target_include_directories(xtensor-python INTERFACE
8080
target_link_libraries(xtensor-pythonINTERFACE xtensor)
8181
get_target_property(inc_dir xtensor-pythonINTERFACE_INCLUDE_DIRECTORIES)
8282

83+
if(MSVC)
84+
set_property(TARGET xtensor-python PROPERTY /DHAVE_SNPRINTF)
85+
else()
86+
8387
OPTION(BUILD_TESTS"xtensor test suite"OFF)
8488
OPTION(DOWNLOAD_GTEST"build gtest from downloaded sources"OFF)
8589

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp