Skip to content

Commit

Permalink
Add logic to handle special python linking on manylinux
Browse files Browse the repository at this point in the history
  • Loading branch information
austinschneider committed Jan 12, 2024
1 parent a71ddbc commit 13ca6b6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
12 changes: 10 additions & 2 deletions cmake/Packages/Python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@ ELSE()
MESSAGE(WARNING "PYTHON_EXECUTABLE is set but will be ignored by this version of CMake; set Python_ROOT_DIR instead")
ENDIF(PYTHON_EXECUTABLE)
IF(PYTHON_VERSION)
FIND_PACKAGE(Python ${PYTHON_VERSION} COMPONENTS Interpreter Development)
IF(${CIBUILDWHEEL})
FIND_PACKAGE(Python ${PYTHON_VERSION} COMPONENTS Interpreter Development.Module)
ELSE(${CIBUILDWHEEL})
FIND_PACKAGE(Python ${PYTHON_VERSION} COMPONENTS Interpreter Development)
ENDIF(${CIBUILDWHEEL})
ELSE(PYTHON_VERSION)
FIND_PACKAGE(Python COMPONENTS Interpreter Development)
IF(${CIBUILDWHEEL})
FIND_PACKAGE(Python COMPONENTS Interpreter Development.Module)
ELSE(${CIBUILDWHEEL})
FIND_PACKAGE(Python COMPONENTS Interpreter Development)
ENDIF(${CIBUILDWHEEL})
ENDIF(PYTHON_VERSION)
SET(PYTHON_FOUND "${Python_FOUND}")
SET(PYTHON_EXECUTABLE "${Python_EXECUTABLE}")
Expand Down
21 changes: 13 additions & 8 deletions cmake/testing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ set_target_properties(gtest_main PROPERTIES FOLDER extern)
set_target_properties(gmock PROPERTIES FOLDER extern)
set_target_properties(gmock_main PROPERTIES FOLDER extern)

macro(package_add_test TESTNAME)
add_executable(${TESTNAME} ${ARGN})
target_link_libraries(${TESTNAME} gtest gmock gtest_main LeptonInjector)
add_dependencies(${TESTNAME} rk_static)
add_test(NAME ${TESTNAME} COMMAND ${TESTNAME} WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
set_target_properties(${TESTNAME} PROPERTIES FOLDER tests)
endmacro()
if(${CIBUILDWHEEL})
macro(package_add_test TESTNAME)
endmacro()
else()
macro(package_add_test TESTNAME)
add_executable(${TESTNAME} ${ARGN})
target_link_libraries(${TESTNAME} gtest gmock gtest_main LeptonInjector)
add_dependencies(${TESTNAME} rk_static)
add_test(NAME ${TESTNAME} COMMAND ${TESTNAME} WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
set_target_properties(${TESTNAME} PROPERTIES FOLDER tests)
endmacro()

ENABLE_TESTING()
ENABLE_TESTING()
endif()

##package_add_test(UnitTest_Medium Medium_TEST.cxx)
#package_add_test(UnitTest_Axis Axis_TEST.cxx)
Expand Down
Empty file removed plz_run
Empty file.
2 changes: 1 addition & 1 deletion vendor/pybind11
Submodule pybind11 updated 113 files

0 comments on commit 13ca6b6

Please sign in to comment.