Skip to content

Commit

Permalink
set TARGET_OS_OSX=1 for macOS conda-forge builds
Browse files Browse the repository at this point in the history
  • Loading branch information
RSchwan committed Aug 3, 2023
1 parent 98bafb5 commit 392c3ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ if (ENABLE_SANITIZERS)
endif ()

if (BUILD_PYTHON_INTERFACE OR BUILD_MATLAB_INTERFACE)
# building for conda-forge, TARGET_OS_OSX is not properly set, i.e., macOS is not correctly detected
if (DEFINED ENV{CONDA_TOOLCHAIN_BUILD} AND APPLE)
add_definitions(-DTARGET_OS_OSX=1)
endif ()

# Find cpu_features
include(FetchContent)
FetchContent_Declare(
Expand Down
5 changes: 0 additions & 5 deletions interfaces/python/src/instruction_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@

#include <pybind11/pybind11.h>

// building for conda-forge, TARGET_OS_OSX is not properly set, i.e., macOS is not correctly detected
#if defined(TARGET_OS_MAC)
#define TARGET_OS_OSX 1
#endif

#if defined(CPU_FEATURES_AVAILABLE)
#include "cpu_features_macros.h"
#endif
Expand Down

0 comments on commit 392c3ed

Please sign in to comment.