Skip to content

Commit

Permalink
Call CMake properly on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
certik committed Sep 5, 2019
1 parent 1e52020 commit ffbd358
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ build.xsh:
stage: build
image: registry.gitlab.com/lfortran/ci-images:full2-1.7.0
script:
- export CONDA_PREFIX="$HOME/conda_root"
- export PATH="$HOME/conda_root/bin:$PATH"
- export LFORTRAN_CMAKE_GENERATOR="Unix Makefiles"
- export WIN=0
- xonsh ci/build.xsh

# Build and upload documentation
Expand Down
3 changes: 3 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ build_script:
- call conda info -a
- call conda update -q conda
- call conda install -c conda-forge python=3.7 re2c m2-bison xonsh cython scikit-build
- set CONDA_PREFIX=C:\\Miniconda37-x64
- set LFORTRAN_CMAKE_GENERATOR=Visual Studio 15 2017 Win64
- set WIN=1
- xonsh ci\build.xsh
3 changes: 3 additions & 0 deletions ci/azure_install_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ conda info -a
conda update -q conda
conda install -c conda-forge python=3.7 re2c bison m4 cython xonsh scikit-build
export MACOSX_DEPLOYMENT_TARGET="10.9"
export CONDA_PREFIX=/usr/local/miniconda
export LFORTRAN_CMAKE_GENERATOR="Unix Makefiles"
export WIN=0
xonsh ci/build.xsh
9 changes: 7 additions & 2 deletions ci/build.xsh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
$RAISE_SUBPROC_ERROR = True
trace on

echo "CONDA_PREFIX=$CONDA_PREFIX"

# Generate a Fortran AST from AST.asdl (Python)
python grammar/asdl_py.py
# Generate a Fortran AST from AST.asdl (C++)
Expand Down Expand Up @@ -51,8 +53,11 @@ cd lfortran-$lfortran_version

mkdir test-bld
cd test-bld
cmake ..
cmake --build .
cmake -G $LFORTRAN_CMAKE_GENERATOR -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release ..
if $WIN == "1":
cmake --build . --config Release
else:
cmake --build .
ctest --output-on-failure
cd ..

Expand Down

0 comments on commit ffbd358

Please sign in to comment.