Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 751cc9f

Browse files
committedJul 17, 2023
build: duktape needs to be installed
fix cppalliance#405
1 parent ca3bbb6 commit 751cc9f

File tree

1,008 files changed

+99
-501371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,008 files changed

+99
-501371
lines changed
 

Diff for: ‎.github/workflows/ci.yml

+15-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,20 @@ jobs:
7676
substring="C:/Program Files/Microsoft Visual Studio/2022/Community/DIA SDK/lib/amd64/diaguids.lib;"
7777
sed -i "s|$substring||g" "$llvm_dir/RelWithDebInfo/lib/cmake/llvm/LLVMExports.cmake"
7878
echo "llvm_dir=$llvm_dir"
79-
find "$llvm_dir" -type f
79+
# find "$llvm_dir" -type f
80+
81+
- name: Install Duktape
82+
id: duktape-install
83+
shell: bash
84+
run: |
85+
set -xe
86+
curl -L -o "duktape-2.7.0.tar.xz" "https://github.com/svaarala/duktape/releases/download/v2.7.0/duktape-2.7.0.tar.xz"
87+
duktape_dir="${{runner.tool_cache}}/duktape"
88+
duktape_dir=$(echo "$duktape_dir" | sed 's/\\/\//g')
89+
mkdir -p "$duktape_dir"
90+
tar -xvf "duktape-2.7.0.tar.xz" -C "$duktape_dir"
91+
echo "duktape-dir=$duktape_dir/duktape-2.7.0" >> $GITHUB_OUTPUT
92+
echo "duktape_dir=$duktape_dir/duktape-2.7.0"
8093
8194
- name: Install Node.js
8295
uses: actions/setup-node@v3
@@ -115,7 +128,7 @@ jobs:
115128
cxx: ${{ steps.setup-cpp.outputs.cxx || matrix.cxx }}
116129
cxxflags: ${{ matrix.cxxflags }}${{ ( matrix.compiler == 'gcc' && ' -static-libstdc++') || '' }}${{ ( matrix.asan && ' -static-libasan') || '' }}${{ ( matrix.tsan && ' -static-libtsan') || '' }}
117130
install-prefix: .local
118-
extra-args: ${{ format('-D LLVM_ROOT="{0}" -D Clang_ROOT="{0}" -D CMAKE_EXPORT_COMPILE_COMMANDS=ON', steps.llvm-install.outputs.llvm-dir || '/usr/local') }}
131+
extra-args: ${{ format('-D LLVM_ROOT="{0}" -D Clang_ROOT="{0}" -D DUKTAPE_SOURCE_ROOT="{1}" -D CMAKE_EXPORT_COMPILE_COMMANDS=ON', steps.llvm-install.outputs.llvm-dir || '/usr/local', steps.duktape-install.outputs.duktape-dir) }}
119132
export-compile-commands: ${{ matrix.time-trace }}
120133
package: ${{ matrix.is-main }}
121134
package-dir: packages

Diff for: ‎CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,13 @@ string(REGEX REPLACE " /W[0-4]" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
7575
string(REGEX REPLACE " /W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
7676

7777
# Duktape
78-
set(DUKTAPE_SOURCE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third-party/duktape)
78+
set(DUKTAPE_SOURCE_ROOT "" CACHE STRING "Root of the Duktape source tree")
79+
if (NOT DUKTAPE_SOURCE_ROOT)
80+
message(FATAL_ERROR
81+
"Duktape source root not found.\n"
82+
"Please set DUKTAPE_SOURCE_ROOT to the root of the Duktape source tree.\n"
83+
"https://github.com/svaarala/duktape/releases/download/v2.7.0/duktape-2.7.0.tar.xz\n")
84+
endif()
7985
add_library(duktape ${DUKTAPE_SOURCE_ROOT}/src/duktape.c ${DUKTAPE_SOURCE_ROOT}/src/duktape.h)
8086
target_include_directories(
8187
duktape PUBLIC

0 commit comments

Comments
 (0)