Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
robomics committed Feb 6, 2024
1 parent dbc1fe2 commit eed35de
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
13 changes: 13 additions & 0 deletions run_conan.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def find_conan():


def run_conan_profile_detect(conan):

sp.run([conan, "profile", "detect"], stderr=sp.DEVNULL, stdout=sp.DEVNULL)


Expand All @@ -42,6 +43,18 @@ def main():
if conan_home is not None:
os.makedirs(conan_home, exist_ok=True)

cc = os.getenv("CC")
if cc is not None:
new_cc = os.path.join(conan_home, "gcc")
os.symlink(cc, new_cc)
os.environ["CC"] = new_cc

cxx = os.getenv("CXX")
if cxx is not None:
new_cxx = os.path.join(conan_home, "g++")
os.symlink(cc, new_cxx)
os.environ["CC"] = new_cxx

run_conan_profile_detect(conan)
run_conan_install(conan)
print(conandeps_mk)
Expand Down
10 changes: 2 additions & 8 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
PWD := $(shell pwd)
export CONAN_HOME := $(PWD)\conan-staging\.conan2
CC := "$(shell "$(R_HOME)\bin\Rscript" -e 'Sys.which("gcc")')"
CXX := "$(shell "$(R_HOME)\bin\Rscript" -e 'Sys.which("g++")')"

SYMLINK_CC := $(shell ln -s "$CC" $(CONAN_HOME)/gcc)
SYMLINK_CXX := $(shell ln -s "$CXX" $(CONAN_HOME)/g++)

export CC := $(CONAN_HOME)/gcc
export CXX := $(CONAN_HOME)g++
export CC := "$(shell "$(R_HOME)\bin\Rscript" -e 'Sys.which("gcc")')"
export CXX := "$(shell "$(R_HOME)\bin\Rscript" -e 'Sys.which("g++")')"

CONANDEPS_MK := $(shell ..\run_conan.py)
include $(CONANDEPS_MK)
Expand Down

0 comments on commit eed35de

Please sign in to comment.