Skip to content

Commit 02e2364

Browse files
committed
use with older ubuntu 20.04
1 parent 2da61b0 commit 02e2364

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

.github/workflows/cmake.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ jobs:
3131
#
3232
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
3333
matrix:
34-
os: [ubuntu-22.04, windows-latest, macOS-latest]
34+
os: [ubuntu-20.04, windows-latest, macOS-latest]
3535
build_type: ${{ fromJSON(format('[{0}]', inputs.build_type || '"Debug","Release"')) }}
3636
c_compiler: [gcc, clang, cl]
3737
include:
3838
- os: windows-latest
3939
c_compiler: cl
4040
cpp_compiler: cl
41-
- os: ubuntu-22.04
41+
- os: ubuntu-20.04
4242
c_compiler: gcc
4343
cpp_compiler: g++
44-
- os: ubuntu-22.04
44+
- os: ubuntu-20.04
4545
c_compiler: clang
4646
cpp_compiler: clang++
4747
- os: macOS-latest
@@ -52,7 +52,7 @@ jobs:
5252
c_compiler: gcc
5353
- os: windows-latest
5454
c_compiler: clang
55-
- os: ubuntu-22.04
55+
- os: ubuntu-20.04
5656
c_compiler: cl
5757
- os: macOS-latest
5858
c_compiler: cl
@@ -71,16 +71,8 @@ jobs:
7171
run: |
7272
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
7373
74-
- name: Set Clang 16 as Default
75-
if: matrix.os == 'ubuntu-24.04' && matrix.c_compiler == 'clang'
76-
run: |
77-
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100
78-
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100
79-
sudo update-alternatives --set clang /usr/bin/clang-16
80-
sudo update-alternatives --set clang++ /usr/bin/clang++-16
81-
8274
- name: Check Clang Settings
83-
if: matrix.os == 'ubuntu-22.04' && matrix.c_compiler == 'clang'
75+
if: matrix.os == 'ubuntu-20.04' && matrix.c_compiler == 'clang'
8476
run: |
8577
clang --version
8678
clang++ --version

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ if(${GA_BUILD_SAMPLE})
210210
endif()
211211

212212
add_library(GameAnalytics ${LIB_TYPE} ${CPP_SOURCES})
213-
target_link_libraries(GameAnalytics PRIVATE ${LIBS} PUBLIC ${PUBLIC_LIBS} -lc)
213+
target_link_libraries(GameAnalytics PRIVATE ${LIBS} PUBLIC ${PUBLIC_LIBS})
214214
message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
215215
message(STATUS "CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}")
216216
message(STATUS "CMAKE_SHARED_LINKER_FLAGS: ${CMAKE_SHARED_LINKER_FLAGS}")
@@ -240,7 +240,7 @@ add_executable(${UT_PROJECT_NAME} ${TEST_SRC_FILES})
240240
########################################
241241
# Standard linking to gtest and gmock components
242242
########################################
243-
target_link_libraries(${UT_PROJECT_NAME} gtest gtest_main gmock_main -lc)
243+
target_link_libraries(${UT_PROJECT_NAME} gtest gtest_main gmock_main)
244244

245245
########################################
246246
# Linking to GA SDK

0 commit comments

Comments
 (0)