Skip to content

Commit

Permalink
Run pre-commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed Apr 29, 2022
1 parent 18d2ed0 commit c09887b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
3 changes: 1 addition & 2 deletions CMake/FindTBB.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
find_path(TBB_INCLUDE_DIR tbb/tbb.h HINTS $ENV{TBBROOT}/include
$ENV{TBB_INCLUDE_DIR})

find_library(TBB_LIBRARY tbb HINTS $ENV{TBBROOT}/lib
${TBB_INCLUDE_DIR}/../lib)
find_library(TBB_LIBRARY tbb HINTS $ENV{TBBROOT}/lib ${TBB_INCLUDE_DIR}/../lib)

if(TBB_INCLUDE_DIR AND EXISTS "${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h")
file(STRINGS "${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h" TBB_H
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_subdirectory(CMake)
find_package_config_first(TBB)

if (TBB_FOUND)
if(TBB_FOUND)
include(FindPackageMessage)
find_package_message(tbb "Found TBB: ${TBB_DIR} ${TBB_LIBRARY} ${TBB_INCLUDE_DIR}" "[${TBB_LIBRARY}][${TBB_INCLUDE_DIR}]")
find_package_message(
tbb "Found TBB: ${TBB_DIR} ${TBB_LIBRARY} ${TBB_INCLUDE_DIR}"
"[${TBB_LIBRARY}][${TBB_INCLUDE_DIR}]")
endif()

# Fail fast if users have not cloned submodules.
Expand Down
13 changes: 8 additions & 5 deletions freud/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Try alternate method for creating python extensions
function(make_python_extension_module _target)
set_target_properties(${_target} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
set_target_properties(${_target} PROPERTIES SUFFIX "${PYTHON_EXTENSION_MODULE_SUFFIX}")
set_target_properties(${_target}
PROPERTIES SUFFIX "${PYTHON_EXTENSION_MODULE_SUFFIX}")

target_include_directories(${_target} PRIVATE "${PYTHON_INCLUDE_DIRS}")
if (WIN32)
if(WIN32)
# Link to the Python libraries on windows
target_link_libraries(${_target} PRIVATE ${PYTHON_LIBRARIES})
else()
# Do not link to the Python libraries on Mac/Linux - symbols are provided
# by the `python` executable. "-undefined dynamic_lookup" is needed on Mac
target_link_options(${_target} PRIVATE "$<$<PLATFORM_ID:Darwin>:LINKER:-undefined,dynamic_lookup>")
# Do not link to the Python libraries on Mac/Linux - symbols are provided by
# the `python` executable. "-undefined dynamic_lookup" is needed on Mac
target_link_options(
${_target} PRIVATE
"$<$<PLATFORM_ID:Darwin>:LINKER:-undefined,dynamic_lookup>")
endif()
endfunction()

Expand Down

0 comments on commit c09887b

Please sign in to comment.