Skip to content

Commit

Permalink
Mac compatibility and build scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
hsidky committed Feb 2, 2022
1 parent bb2a2a4 commit 44e4476
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,18 @@ target_compile_definitions(backend PRIVATE VERSION_INFO=${VERSION_INFO})

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_link_libraries(backend PRIVATE stdc++fs)
target_link_libraries(backend PRIVATE -static-libgcc -static-libstdc++)

if(BUILD_CLI)
target_link_libraries(nyxus PRIVATE -static-libgcc -static-libstdc++)
target_link_libraries(nyxus PRIVATE stdc++fs)
endif()
endif()

target_link_libraries(backend PRIVATE -static-libgcc -static-libstdc++)
target_link_libraries(backend PRIVATE ${Nyxus_LIBRARIES})
target_link_libraries(backend PRIVATE ${Python_LIBRARIES})

if(BUILD_CLI)
target_link_libraries(nyxus PRIVATE -static-libgcc -static-libstdc++)
target_link_libraries(nyxus PRIVATE ${Nyxus_LIBRARIES})
target_link_libraries(nyxus PRIVATE ${Python_LIBRARIES})
endif()
Expand Down
10 changes: 10 additions & 0 deletions build-wheels-mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

export MACOSX_DEPLOYMENT_TARGET=11.0

PYTHON_VERSIONS=("p3.6" "p3.7" "p3.8" "p3.9")

for PYTHON_VERSION in ${PYTHON_VERSIONS[@]}; do
source /Users/hsidky/miniconda/bin/activate ${PYTHON_VERSION}
env CMAKE_ARGS="-DPython_ROOT_DIR=/Users/hsidky/miniconda/envs/${PYTHON_VERSION}/" python setup.py bdist_wheel -d dist
done
2 changes: 1 addition & 1 deletion src/nyx/feature_method.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "feature_method.h"

FeatureMethod::FeatureMethod(const std::string& _featureinfo = __FILE__)
FeatureMethod::FeatureMethod(const std::string& _featureinfo)
{
feature_info = _featureinfo;
}
Expand Down
2 changes: 1 addition & 1 deletion src/nyx/feature_method.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FeatureMethod
/// @brief User-facing feature name info displayed by class FeatureManager in case of dependency errors
std::string feature_info;

FeatureMethod (const std::string& _featureinfo);
FeatureMethod (const std::string& _featureinfo = __FILE__);

//=== Trivial ROI
// Calculate the feature for one ROI using cached data and probably caching data
Expand Down

0 comments on commit 44e4476

Please sign in to comment.