Skip to content

Commit

Permalink
trying to fix osx problems
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Papior <[email protected]>
  • Loading branch information
zerothi committed Sep 21, 2023
1 parent 27ea5bc commit 5256d5a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
42 changes: 27 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,24 @@ if(SKBUILD)
endif()


# We need to check for fortran first since the project initialization sets
# specific variables depending on what languages are present.
# Therefore project(... LANGUAGES C) + enable_language(Fortran)
# is different from project(... LANGUAGES C Fortran)
# This is a bit surprising... :(
option(WITH_FORTRAN
"Whether to compile and ship fortran sources (default True)" TRUE)

set(_languages C CXX)
if( WITH_FORTRAN )
list(APPEND _languages Fortran)
endif()


project(sisl
DESCRIPTION "Cythonized or fortran codes"
HOMEPAGE_URL "https://github.com/zerothi/sisl"
LANGUAGES C CXX
LANGUAGES ${_languages}
# cmake requires a version of X.Y.Z or some other form, it does not accept setuptools_scm dirty tags
# VERSION "${SKBUILD_PROJECT_VERSION}"
)
Expand Down Expand Up @@ -40,17 +54,15 @@ set(CMAKE_SHARED_MODULE_PREFIX "")


# Define all options for the user

set(F2PY_REPORT_ON_ARRAY_COPY 10
CACHE STRING
"The minimum size of arrays before warning about copies")
option(WITH_F2PY_REPORT_COPY
"Add instructions to track f2py-copies on routine calls use -DF2PY_REPORT_ON_ARRAY_COPY=<int> as well" FALSE)#
option(WITH_F2PY_REPORT_EXIT
"Report timings on routine exits" FALSE)
option(WITH_FORTRAN
"Whether to compile and ship fortran sources (default True)" TRUE)

if( WITH_FORTRAN )
set(F2PY_REPORT_ON_ARRAY_COPY 10
CACHE STRING
"The minimum (element) size of arrays before warning about copies")
option(WITH_F2PY_REPORT_COPY
"Add instructions to track f2py-copies on routine calls use -DF2PY_REPORT_ON_ARRAY_COPY=<int> as well" FALSE)#
option(WITH_F2PY_REPORT_EXIT
"Report timings on routine exits" FALSE)
endif()

#option(WITH_COVERAGE
# "Add instructions for coverage in Cython files" FALSE)
Expand Down Expand Up @@ -87,6 +99,9 @@ if(WITH_FORTRAN)
endif()
set(ARCHFLAGS $ENV{ARCHFLAGS})
cmake_print_variables(ARCHFLAGS)
if( APPLE )
cmake_print_variables(CMAKE_OSX_ARCHITECTURES)
endif()

list(POP_BACK CMAKE_MESSAGE_INDENT)

Expand All @@ -106,9 +121,6 @@ endif()
# Decide for fortran stuff
if(WITH_FORTRAN)

# add the language
enable_language(Fortran)

# Retrieve header information
# Define f2py executable
set(F2PY_EXECUTABLE "${PYTHON_EXECUTABLE}" -m numpy.f2py)
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ archs = [
"x86_64",
# "aarch64",
]
skip = [
"*musllinux*",
]

[tool.cibuildwheel.windows]
archs = [
Expand Down

0 comments on commit 5256d5a

Please sign in to comment.