Skip to content

Commit

Permalink
Merge pull request #200 from blade-lang/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
mcfriend99 authored Oct 18, 2024
2 parents 6757991 + 6e9a2d0 commit df5f591
Show file tree
Hide file tree
Showing 48 changed files with 12,127 additions and 1,075 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: CI

on:
push:
branches: [ dev, imagine ]
branches-ignore:
- main
pull_request:
branches: [ main ]

Expand All @@ -29,7 +30,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get remove libgd3
sudo apt-get install curl libcurl4-openssl-dev libgd-dev libavif-dev libffi-dev -y
sudo apt-get install curl libpthread-stubs0-dev libcurl4-openssl-dev libgd-dev libavif-dev libffi-dev -y
cmake -B .
cmake --build . -- -j 12
chmod +x blade/blade
Expand Down Expand Up @@ -99,7 +100,7 @@ jobs:
run: |
${{ env.VCPKG_ROOT }}/vcpkg update
${{ env.VCPKG_ROOT }}/vcpkg version
${{ env.VCPKG_ROOT }}/vcpkg install pkgconf curl:x64-windows libffi:x64-windows openssl:x64-windows libgd:x64-windows
${{ env.VCPKG_ROOT }}/vcpkg install pkgconf pthreads:x64-windows curl:x64-windows libffi:x64-windows openssl:x64-windows libgd:x64-windows
${{ env.VCPKG_ROOT }}/vcpkg list
- name: Save vcpkg dependencies cache
id: vcpkg-cache-save
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get remove libgd3
sudo apt-get install curl libcurl4-openssl-dev libgd-dev libavif-dev libffi-dev -y
sudo apt-get install curl libpthread-stubs0-dev libcurl4-openssl-dev libgd-dev libavif-dev libffi-dev -y
cmake -B .
cmake --build . -- -j 12
- name: Create ZIP Archive
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
run: |
${{ env.VCPKG_ROOT }}/vcpkg update
${{ env.VCPKG_ROOT }}/vcpkg version
${{ env.VCPKG_ROOT }}/vcpkg install pkgconf curl:x64-windows libffi:x64-windows openssl:x64-windows libgd:x64-windows
${{ env.VCPKG_ROOT }}/vcpkg install pkgconf pthreads:x64-windows curl:x64-windows libffi:x64-windows openssl:x64-windows libgd:x64-windows
${{ env.VCPKG_ROOT }}/vcpkg list
- name: Compile
run: |
Expand Down
15 changes: 12 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ set(BLADE_SOURCES
src/standard/process.c
src/standard/reflect.c
src/standard/struct.c
)
src/standard/thread.c)

add_definitions(-DEXPORT_LIBS)

Expand Down Expand Up @@ -131,7 +131,7 @@ check_function_exists("gettimeofday" HAVE_GETTIMEOFDAY)
if(NOT "${HAVE_GETTIMEOFDAY}")
target_link_libraries(libblade PRIVATE gettimeofday)
endif()
target_link_libraries(libblade PRIVATE threads)
check_function_exists("timespec_get" HAVE_TIMESPEC_GET)

check_function_exists("utime" HAVE_UTIME)
check_function_exists("basename" HAVE_BASENAME)
Expand Down Expand Up @@ -189,14 +189,23 @@ if(UNIX)

target_link_libraries(libblade PRIVATE m)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
target_link_libraries(libblade PRIVATE pthread)
target_link_libraries(libblade PRIVATE dl)
endif()

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(libblade PRIVATE Threads::Threads)
# target_link_libraries(libblade PRIVATE pthread)
endif(UNIX)

if(WIN32)
add_dependencies(libblade mman)
target_link_libraries(libblade PRIVATE mman)

find_package(PThreads4W REQUIRED)
target_link_libraries(libblade PRIVATE PThreads4W::PThreads4W)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-pragmas")
endif()

target_link_libraries(blade PRIVATE libblade)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[![Build Status](https://github.com/blade-lang/blade/actions/workflows/ci.yml/badge.svg)](https://github.com/blade-lang/blade/actions)
[![Gitter](https://badges.gitter.im/blade-lang/community.svg)](https://gitter.im/blade-lang/community)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/blade-lang/blade/blob/master/LICENSE)
[![License](https://img.shields.io/badge/License-BSDL-blue.svg)](https://github.com/blade-lang/blade/blob/master/LICENSE)
[![Coverage Status](https://coveralls.io/repos/github/blade-lang/blade/badge.svg?branch=main)](https://coveralls.io/github/blade-lang/blade?branch=main)
[![Version](https://img.shields.io/badge/version-0.0.86-green)](https://github.com/blade-lang/blade)

Expand Down
Loading

0 comments on commit df5f591

Please sign in to comment.