Skip to content

Commit

Permalink
Merge pull request #10 from ke6jjj/patch-1
Browse files Browse the repository at this point in the history
Don't invoke make directly; use CMAKE_BUILD_TOOL
  • Loading branch information
JayKickliter authored Feb 23, 2021
2 parents 6220931 + 4974e4a commit f8f9a80
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
9 changes: 9 additions & 0 deletions c_src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ include(ASan)
IF (APPLE)
set(CMAKE_MODULE_LINKER_FLAGS "-flat_namespace -undefined suppress")
set(CMAKE_MACOSX_RPATH 1)
if (NOT DEFINED ENV{SDKROOT})
execute_process(COMMAND
xcrun --show-sdk-path
OUTPUT_VARIABLE APPLE_SDK_ROOT
)
else()
set(APPLE_SDK_ROOT $ENV{SDKROOT})
endif()
set(GF_APPLE_ENV "SDKROOT=${APPLE_SDK_ROOT}")
ENDIF()

#
Expand Down
5 changes: 3 additions & 2 deletions c_src/cmake/FindGFComplete.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ ExternalProject_Add(gf-complete
$ENV{CONFIGURE_ARGS}
CC=${CMAKE_C_COMPILER}
CFLAGS=${CMAKE_C_FLAGS_${BUILD_TYPE_UC}}
BUILD_COMMAND make -j
${GF_APPLE_ENV}
BUILD_COMMAND ${CMAKE_BUILD_TOOL} -j ${GF_APPLE_ENV}
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/lib/libgf_complete.a
INSTALL_COMMAND make install
INSTALL_COMMAND ${CMAKE_BUILD_TOOL} install
)

add_library(GFComplete::GFComplete STATIC IMPORTED)
Expand Down
5 changes: 3 additions & 2 deletions c_src/cmake/FindJerasure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ ExternalProject_Add(jerasure
CC=${CMAKE_C_COMPILER}
"CFLAGS=-I${CMAKE_CURRENT_BINARY_DIR}/include ${CMAKE_C_FLAGS_${BUILD_TYPE_UC}}"
LDFLAGS=-L${CMAKE_CURRENT_BINARY_DIR}/lib
BUILD_COMMAND make -j
${GF_APPLE_ENV}
BUILD_COMMAND ${CMAKE_BUILD_TOOL} -j ${GF_APPLE_ENV}
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/lib/libJerasure.a
INSTALL_COMMAND make install
INSTALL_COMMAND ${CMAKE_BUILD_TOOL} install
)
ExternalProject_Add_StepDependencies(jerasure build gf-complete)

Expand Down

0 comments on commit f8f9a80

Please sign in to comment.