Skip to content

Commit

Permalink
osqp: do not validate shared lib build on winodws
Browse files Browse the repository at this point in the history
No symbols are exported so the DLL cannot be linked against. Leaving the switches in package() method as this should be fixed in future versions
  • Loading branch information
tkhyn committed Apr 18, 2024
1 parent a73cb57 commit 6271304
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion recipes/osqp/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import os

from conan import ConanFile
from conan.tools.files import get, copy, rm, rmdir, apply_conandata_patches, export_conandata_patches
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
import os
from conan.errors import ConanInvalidConfiguration

required_conan_version = ">=1.53.0"

Expand Down Expand Up @@ -51,6 +53,10 @@ def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC

def validate(self):
if self.info.settings.os == "Windows" and self.info.options.shared:
raise ConanInvalidConfiguration("Building ahared OSQP library is not supported on Windows")

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
Expand Down

0 comments on commit 6271304

Please sign in to comment.