From 2d6c8eda1bfa290feed06e1f9577264243389379 Mon Sep 17 00:00:00 2001 From: Luthaf Date: Mon, 19 Feb 2024 15:20:19 +0100 Subject: [PATCH] Try to run CI on windows --- .github/workflows/tests.yml | 1 + mops/CMakeLists.txt | 10 ++++++++-- pyproject.toml | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1e94ba3..ae1412a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,6 +15,7 @@ jobs: include: - os: ubuntu-20.04 - os: macos-11 + - os: windows-2019 steps: - uses: actions/checkout@v3 diff --git a/mops/CMakeLists.txt b/mops/CMakeLists.txt index e6967ca..98c3de5 100644 --- a/mops/CMakeLists.txt +++ b/mops/CMakeLists.txt @@ -139,8 +139,14 @@ check_cxx_compiler_flag("-Wunknown-pragmas" COMPILER_SUPPORTS_WPRAGMAS) if (MOPS_OPENMP) find_package(OpenMP) if(OpenMP_CXX_FOUND) - message(STATUS "OpenMP is enabled") - target_link_libraries(mops PUBLIC OpenMP::OpenMP_CXX) + if (MSVC) + # MSVC only supports an old version of OpenMP, let's disable it + # until we change the code to work with this version + message(STATUS "OpenMP was found, but is disabled on MSVC") + else() + message(STATUS "OpenMP is enabled") + target_link_libraries(mops PUBLIC OpenMP::OpenMP_CXX) + endif() else() message(WARNING "Could not find OpenMP") if(COMPILER_SUPPORTS_WPRAGMAS) diff --git a/pyproject.toml b/pyproject.toml index 730c0fb..4c81fbd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ repository = "https://github.com/lab-cosmo/mops" [build-system] requires = [ "setuptools >=68", - "cmake <3.28", # this should be changed once cmake 3.28.1 is on PyPI + "cmake", ] build-backend = "setuptools.build_meta" @@ -51,7 +51,7 @@ build-backend = "setuptools.build_meta" zip-safe = false [tool.setuptools.packages.find] -where = ["python/mops/src/"] +where = ["python/mops/src"] ### ======================================================================== ### [tool.pytest.ini_options]