From 3076ccc127f8a957a0d2f00ee753bbd2ff8e8c33 Mon Sep 17 00:00:00 2001 From: Yong Gyu Lee Date: Fri, 14 Jun 2024 23:53:46 +0900 Subject: [PATCH] 1 --- .github/workflows/cmake-multi-platform.yml | 26 +++++++++------------- CMakeLists.txt | 6 +++++ 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index b3cbc3cb..3e31698f 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -119,7 +119,7 @@ jobs: working-directory: build run: ctest --build-config ${{ matrix.build_type }} - ubuntu-android-ndk: + android-ndk: runs-on: ${{ matrix.os }} concurrency: @@ -152,20 +152,16 @@ jobs: - run: | ls ${{ steps.setup-ndk.outputs.ndk-path }} -# - name: Configure CMake -# env: -# CC: ${{ matrix.cc_compiler }}-${{ matrix.compiler_version }} -# CXX: ${{ matrix.cxx_compiler }}-${{ matrix.compiler_version }} -# run: > -# cmake -B build -# -DCMAKE_CXX_COMPILER=${{ env.CXX }} -# -DCMAKE_C_COMPILER=${{ env.CC }} -# -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -# -DPREVIEW_TEST=ON -# -S ${{ github.workspace }} -# -# - name: Build -# run: cmake --build build --config ${{ matrix.build_type }} + - name: Configure CMake + run: > + cmake -B build + -DCMAKE_TOOLCHAIN_FILE=${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -DPREVIEW_TEST=ON + -S ${{ github.workspace }} + + - name: Build + run: cmake --build build --config ${{ matrix.build_type }} # # - name: Test # working-directory: build diff --git a/CMakeLists.txt b/CMakeLists.txt index d31818d5..d948b703 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,12 @@ option(PREVIEW_TEST "Build test" OFF) add_library(preview INTERFACE) target_include_directories(preview INTERFACE "${CMAKE_CURRENT_LIST_DIR}/include") +message("CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD}") +message("CMAKE_TOOLCHAIN_FILE: ${CMAKE_TOOLCHAIN_FILE}") + +message("CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") +message("CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") + if (MSVC) target_compile_options(preview INTERFACE /Zc:__cplusplus) target_compile_options(preview INTERFACE /Zc:ternary)