-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PyIlmBase finished refactor, misc cleanup
- add extra dist to automake for make dist - finish numpy lookup - add sample vfx 15 toolchain file for doc purposes - merge cxx standard, pay attention to global setting if set - merge clang tidy option - add default build type if not set Signed-off-by: Kimball Thurston <[email protected]>
- Loading branch information
Showing
19 changed files
with
600 additions
and
352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,47 @@ | ||
if(TARGET Python2::Python AND | ||
TARGET Boost::${PYILMBASE_BOOST_PY2_COMPONENT} AND | ||
TARGET Python2::IlmBaseNumPy) | ||
|
||
# must be shared | ||
ADD_LIBRARY ( imathnumpymodule SHARED | ||
imathnumpymodule.cpp | ||
) | ||
set(moddeps_p2 PyIex PyImath) | ||
list(TRANSFORM moddeps_p2 APPEND ${PYILMBASE_LIB_PYTHONVER_ROOT}${Python2_VERSION_MAJOR}_${Python2_VERSION_MINOR}) | ||
|
||
IF (WIN32) | ||
SET_TARGET_PROPERTIES (imathnumpymodule | ||
PROPERTIES | ||
PREFIX "" | ||
OUTPUT_NAME "imathnumpy" | ||
SUFFIX ".pyd" | ||
) | ||
ELSE () | ||
SET_TARGET_PROPERTIES (imathnumpymodule | ||
PROPERTIES PREFIX "" SUFFIX ".so" BUILD_WITH_INSTALL_RPATH ON | ||
Python2_add_library(imathnumpy_python2 MODULE | ||
imathnumpymodule.cpp | ||
) | ||
target_link_libraries(imathnumpy_python2 | ||
PRIVATE | ||
IlmBase::Iex IlmBase::IexMath IlmBase::Imath | ||
${moddeps_p2} | ||
Python2::Python | ||
Boost::${PYILMBASE_BOOST_PY2_COMPONENT} | ||
Python2::IlmBaseNumPy | ||
) | ||
ENDIF () | ||
set_target_properties(imathnumpy_python2 PROPERTIES | ||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/python${Python2_VERSION_MAJOR}_${Python2_VERSION_MINOR}/" | ||
LIBRARY_OUTPUT_NAME "imathnumpy" | ||
) | ||
endif() | ||
|
||
INCLUDE_DIRECTORIES ( | ||
${NUMPY_INCLUDE_DIRS} | ||
) | ||
SET_ILMBASE_INCLUDE_DIRS( imathnumpymodule ) | ||
if(TARGET Python3::Python AND | ||
TARGET Boost::${PYILMBASE_BOOST_PY3_COMPONENT} AND | ||
TARGET Python3::IlmBaseNumPy) | ||
|
||
# IlmBase::Imath${OPENEXR_TARGET_SUFFIX} | ||
# IlmBase::Iex${OPENEXR_TARGET_SUFFIX} | ||
TARGET_LINK_LIBRARIES ( imathnumpymodule | ||
PyImath | ||
PyIex | ||
${Boost_LIBRARIES} | ||
) | ||
|
||
INSTALL ( TARGETS imathnumpymodule | ||
DESTINATION lib/python${OPENEXR_PYTHON_MAJOR}.${OPENEXR_PYTHON_MINOR}/site-packages | ||
) | ||
set(moddeps_p3 PyIex PyImath) | ||
list(TRANSFORM moddeps_p3 APPEND ${PYILMBASE_LIB_PYTHONVER_ROOT}${Python3_VERSION_MAJOR}_${Python3_VERSION_MINOR}) | ||
|
||
Python3_add_library(imathnumpy_python3 MODULE | ||
imathnumpymodule.cpp | ||
) | ||
target_link_libraries(imathnumpy_python3 | ||
PRIVATE | ||
IlmBase::Iex IlmBase::IexMath IlmBase::Imath | ||
${moddeps_p3} | ||
Python3::Python | ||
Boost::${PYILMBASE_BOOST_PY3_COMPONENT} | ||
Python3::IlmBaseNumPy | ||
) | ||
set_target_properties(imathnumpy_python3 PROPERTIES | ||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/python${Python3_VERSION_MAJOR}_${Python3_VERSION_MINOR}/" | ||
LIBRARY_OUTPUT_NAME "imathnumpy" | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
ADD_TEST ( PyImathNumpyTest | ||
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pyImathNumpyTest.in -nocuda | ||
) | ||
|
||
SET_TESTS_PROPERTIES ( PyImathNumpyTest PROPERTIES ENVIRONMENT "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/../PyIex:${CMAKE_CURRENT_BINARY_DIR}/../PyImath:${CMAKE_CURRENT_BINARY_DIR}/../PyImathNumpy;LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/../../IlmBase/Iex:${CMAKE_CURRENT_BINARY_DIR}/../../IlmBase/IexMath:${CMAKE_CURRENT_BINARY_DIR}/../../IlmBase/Imath:${CMAKE_CURRENT_BINARY_DIR}/../PyIex:${CMAKE_CURRENT_BINARY_DIR}/../PyImath:${CMAKE_CURRENT_BINARY_DIR}/../PyImathNumpy" ) | ||
if(TARGET Python2::Interpreter) | ||
add_test(PyIlmBase.PyImathNumpyTest_Python2 | ||
${Python2_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pyImathNumpyTest.in | ||
) | ||
set_tests_properties(PyIlmBase.PyImathNumpyTest_Python2 PROPERTIES | ||
ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/python${Python2_VERSION_MAJOR}_${Python2_VERSION_MINOR}" | ||
) | ||
endif() | ||
|
||
if(TARGET Python3::Interpreter) | ||
add_test(PyIlmBase.PyImathNumpyTest_Python3 | ||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pyImathNumpyTest.in | ||
) | ||
set_tests_properties(PyIlmBase.PyImathNumpyTest_Python3 PROPERTIES | ||
ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/python${Python3_VERSION_MAJOR}_${Python3_VERSION_MINOR}" | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
ADD_TEST ( PyImathTest | ||
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pyImathTest.in | ||
) | ||
if(TARGET Python2::Interpreter) | ||
add_test(PyIlmBase.PyImathTest_Python2 | ||
${Python2_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pyImathTest.in | ||
) | ||
set_tests_properties(PyIlmBase.PyImathTest_Python2 PROPERTIES | ||
ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/python${Python2_VERSION_MAJOR}_${Python2_VERSION_MINOR}" | ||
) | ||
endif() | ||
|
||
SET_TESTS_PROPERTIES ( PyImathTest PROPERTIES ENVIRONMENT "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/../PyIex:${CMAKE_CURRENT_BINARY_DIR}/../PyImath;LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/../../IlmBase/Iex:${CMAKE_CURRENT_BINARY_DIR}/../../IlmBase/IexMath:${CMAKE_CURRENT_BINARY_DIR}/../../IlmBase/Imath:${CMAKE_CURRENT_BINARY_DIR}/../PyIex:${CMAKE_CURRENT_BINARY_DIR}/../PyImath" ) | ||
if(TARGET Python3::Interpreter) | ||
add_test(PyIlmBase.PyImathTest_Python3 | ||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pyImathTest.in | ||
) | ||
set_tests_properties(PyIlmBase.PyImathTest_Python3 PROPERTIES | ||
ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/python${Python3_VERSION_MAJOR}_${Python3_VERSION_MINOR}" | ||
WILL_FAIL TRUE ###### TODO: Fix this once we officially support VFX platform 20 (currently broken) | ||
) | ||
endif() |
Oops, something went wrong.