From 6cd4204ee30c9d3a1ae00ca4082bf4b5c7e3dd7d Mon Sep 17 00:00:00 2001 From: luau-project Date: Sun, 26 Jan 2025 16:50:39 -0300 Subject: [PATCH 1/2] CI: build with CMake on source directory with spaces to reproduce #4268 --- .github/workflows/dev-short-tests.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/dev-short-tests.yml b/.github/workflows/dev-short-tests.yml index dfe1bf584..8648d777e 100644 --- a/.github/workflows/dev-short-tests.yml +++ b/.github/workflows/dev-short-tests.yml @@ -92,6 +92,31 @@ jobs: sudo apt install liblzma-dev FUZZERTEST=-T1mn ZSTREAM_TESTTIME=-T1mn make cmakebuild V=1 + cmake-source-directory-with-spaces: + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-latest + generator: "Unix Makefiles" + - os: windows-latest + generator: "NMake Makefiles" + - os: macos-latest + generator: "Unix Makefiles" + env: + SRC_DIR: "source directory with spaces" + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1 + with: + path: "${{ env.SRC_DIR }}" + - uses: ilammy/msvc-dev-cmd@v1 + if: ${{ matrix.generator == 'NMake Makefiles' }} + - name: cmake build on a source directory with spaces + run: | + cmake -S "${{ env.SRC_DIR }}/build/cmake" -B build -DBUILD_TESTING=ON -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=Release --install-prefix "${{ runner.temp }}/install" + cmake --build build --config Release + cmake --install build --config Release + cpp-gnu90-c99-compatibility: runs-on: ubuntu-latest steps: From be1bf2469e44952efb318f80b781e82e8e9e5183 Mon Sep 17 00:00:00 2001 From: luau-project Date: Mon, 27 Jan 2025 15:18:55 -0300 Subject: [PATCH 2/2] fix: quote include directory for resource compiler --- build/cmake/lib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt index c02822296..2dcd249c6 100644 --- a/build/cmake/lib/CMakeLists.txt +++ b/build/cmake/lib/CMakeLists.txt @@ -118,7 +118,7 @@ endmacro () # Define directories containing the library's public headers set(PUBLIC_INCLUDE_DIRS ${LIBRARY_DIR}) -set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} /I ${LIBRARY_DIR}") +set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} /I \"${LIBRARY_DIR}\"") # Split project to static and shared libraries build set(library_targets) if (ZSTD_BUILD_SHARED)