Skip to content

Commit

Permalink
Add windows support (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin authored Feb 23, 2025
1 parent 397a880 commit 9accbe4
Show file tree
Hide file tree
Showing 7 changed files with 237 additions and 18 deletions.
38 changes: 38 additions & 0 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .ci_support/win_64_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ace:
- 8.0.2
c_compiler:
- vs2019
c_stdlib:
- vs
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- vs2019
target_platform:
- win-64
146 changes: 146 additions & 0 deletions .scripts/run_win_build.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion azure-pipelines.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cmake %CMAKE_ARGS% -S . -B build -DBUILD_SHARED_LIBS=On -DCMAKE_PREFIX_PATH=%PREFIX%
cmake --build build --config Release --target install
45 changes: 28 additions & 17 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ source:
sha256: 0068942b3aa3b0733d29f7ea1daa615bc5a943a411c148e5089609a0e3fe7e98

build:
number: 0
skip: true # [win]
number: 1

run_exports:
- {{ pin_subpackage('cpptrace', max_pin='x.x.x') }}
Expand All @@ -22,30 +21,42 @@ requirements:
- {{ stdlib("c") }}
- {{ compiler("cxx") }}
- cmake
- ninja
- pkg-config
- ninja # [unix]
- pkg-config # [unix]
host:
- libdwarf
- libdwarf-dev
- zlib
- libdwarf # [unix]
- libdwarf-dev # [unix]
- zlib # [unix]

test:
requires:
- cmake
- {{ compiler("cxx") }}
- ninja
- ninja # [unix]
files:
- test
commands:
- test -f $PREFIX/lib/libcpptrace${SHLIB_EXT}
- test -f $PREFIX/include/cpptrace/cpptrace.hpp
- test -f $PREFIX/include/cpptrace/basic.hpp
- test -f $PREFIX/include/cpptrace/version.hpp
- test -f $PREFIX/lib/cmake/cpptrace/cpptrace-targets.cmake
- cd test
- cmake . -GNinja -DCMAKE_BUILD_TYPE=Debug
- cmake --build . --config Debug
- ./program
- test -f $PREFIX/lib/libcpptrace${SHLIB_EXT} # [unix]
- test -f $PREFIX/include/cpptrace/cpptrace.hpp # [unix]
- test -f $PREFIX/include/cpptrace/basic.hpp # [unix]
- test -f $PREFIX/include/cpptrace/version.hpp # [unix]
- test -f $PREFIX/lib/cmake/cpptrace/cpptrace-targets.cmake # [unix]
- cd test # [unix]
- cmake . -GNinja -DCMAKE_BUILD_TYPE=Debug # [unix]
- cmake --build . --config Debug # [unix]
- ./program # [unix]


- "if not exist %LIBRARY_PREFIX%\\lib\\cpptrace.lib (echo Not found: %LIBRARY_PREFIX%\\lib\\cpptrace.lib & exit 1)" # [win]
- "if not exist %LIBRARY_PREFIX%\\bin\\cpptrace.dll (echo Not found: %LIBRARY_PREFIX%\\bin\\cpptrace.dll & exit 1)" # [win]
- "if not exist %LIBRARY_PREFIX%\\include\\cpptrace\\cpptrace.hpp (echo Not found: %LIBRARY_PREFIX%\\include\\cpptrace\\cpptrace.hpp & exit 1)" # [win]
- "if not exist %LIBRARY_PREFIX%\\include\\cpptrace\\basic.hpp (echo Not found: %LIBRARY_PREFIX%\\include\\cpptrace\\basic.hpp & exit 1)" # [win]
- "if not exist %LIBRARY_PREFIX%\\include\\cpptrace\\version.hpp (echo Not found: %LIBRARY_PREFIX%\\include\\cpptrace\\version.hpp & exit 1)" # [win]
- "if not exist %LIBRARY_PREFIX%\\lib\\cmake\\cpptrace\\cpptrace-targets.cmake (echo Not found: %LIBRARY_PREFIX%\\lib\\cmake\\cpptrace\\cpptrace-targets.cmake & exit 1)" # [win]
- cd test # [win]
- cmake . # [win]
- cmake --build . --config Debug # [win]
- .\\Debug\\program.exe # [win]

about:
home: https://github.com/jeremy-rifkin/cpptrace
Expand Down

0 comments on commit 9accbe4

Please sign in to comment.