Skip to content

Commit

Permalink
add a pixi file and split into two envs (host & build)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Jun 22, 2024
1 parent ecd26e2 commit 46915bc
Show file tree
Hide file tree
Showing 7 changed files with 1,536 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
**/*.py -text
# GitHub syntax highlighting
pixi.lock linguist-language=YAML

# GitHub syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,7 @@ integration_tests/expr_12.c

# Interactive Shell
input
# pixi environments
.pixi
*.egg-info

6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ include(CPack)
set(CPACK_PACKAGE_FILE_NAME lpython-${LFORTRAN_VERSION}-${CMAKE_SYSTEM_NAME})


if (NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17
CACHE STRING "C++ standard" FORCE)
endif ()
set(CMAKE_CXX_STANDARD 17
CACHE STRING "C++ standard" FORCE)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

Expand Down
13 changes: 9 additions & 4 deletions build1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@
set -e
set -x

cmake \
mkdir -p ./build
cd build

cmake .. \
-GNinja \
-DCMAKE_BUILD_TYPE=Debug \
-DWITH_LLVM=yes \
-DLPYTHON_BUILD_ALL=yes \
-DWITH_STACKTRACE=yes \
-DWITH_RUNTIME_STACKTRACE=yes \
-DWITH_INTRINSIC_MODULES=yes \
-DWITH_LSP=no \
-DWITH_LFORTRAN_BINARY_MODFILES=no \
-DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH_LPYTHON;$CONDA_PREFIX" \
-DCMAKE_PREFIX_PATH="$PIXI_PROJECT_ROOT/.pixi/envs/host/" \
-DCMAKE_INSTALL_PREFIX=`pwd`/inst \
.
cmake --build . -j16 --target install

cmake --build . --target install
Loading

0 comments on commit 46915bc

Please sign in to comment.