File tree Expand file tree Collapse file tree 3 files changed +14
-19
lines changed
Expand file tree Collapse file tree 3 files changed +14
-19
lines changed Original file line number Diff line number Diff line change 2828 strategy :
2929 fail-fast : false
3030 matrix :
31- cxx :
32- - g++-9
33- - clang++-11
31+ build :
32+ - compiler : g++-9
33+ linker : GOLD
34+ - compiler : clang++-11
35+ linker : LLD
3436 config :
3537 # Release build
3638 - build_type : Release
@@ -44,11 +46,11 @@ jobs:
4446 - uses : actions/checkout@v4
4547
4648 - name : Install GCC
47- if : ${{matrix.cxx == 'g++-9'}}
49+ if : ${{matrix.build.compiler == 'g++-9'}}
4850 run : sudo apt-get install -y g++-9
4951
5052 - name : Install Clang
51- if : ${{matrix.cxx == 'clang++-11'}}
53+ if : ${{matrix.build.compiler == 'clang++-11'}}
5254 run : sudo apt-get install -y clang-11 lld-11
5355
5456 - name : Install Valgrind
@@ -58,15 +60,16 @@ jobs:
5860 - name : Configure CMake
5961 working-directory : ${{runner.workspace}}
6062 env :
61- CXX : ${{matrix.cxx }}
63+ CXX : ${{matrix.build.compiler }}
6264 run : |
63- cmake -H ${{github.event.repository.name}} -Bbuild \
65+ cmake -S ${{github.event.repository.name}} -B build \
6466 -DCMAKE_CONFIGURATION_TYPES=${{matrix.config.build_type}} \
6567 -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} \
68+ -DCMAKE_LINKER_TYPE=${{matrix.build.linker}} \
6669 -DCPPSORT_SANITIZE=${{matrix.config.sanitize}} \
6770 -DCPPSORT_USE_VALGRIND=${{matrix.config.valgrind}} \
68- -G"Unix Makefiles" \
69- -DCPPSORT_BUILD_EXAMPLES=ON
71+ -DCPPSORT_BUILD_EXAMPLES=ON \
72+ -G"Unix Makefiles"
7073
7174 - name : Build the test suite
7275 shell : bash
Original file line number Diff line number Diff line change 3232 shell : bash
3333 working-directory : ${{runner.workspace}}
3434 run : >
35- cmake -H ${{github.event.repository.name}} -Bbuild
35+ cmake -S ${{github.event.repository.name}} -B build
3636 -DCMAKE_BUILD_TYPE=Debug
37+ -DCMAKE_LINKER_TYPE=GOLD
3738 -DCPPSORT_ENABLE_COVERAGE=ON
3839 -DGENINFO_EXTRA_FLAGS="--ignore-errors mismatch,mismatch"
3940 -DLCOV_EXTRA_FLAGS="--ignore-errors unused"
Original file line number Diff line number Diff line change @@ -110,15 +110,6 @@ macro(configure_tests target)
110110 $<$<AND :$<CONFIG:Debug>,$<CXX_COMPILER_ID:GNU>>:-Og>
111111 )
112112
113- # Use lld or the gold linker if possible
114- if (UNIX AND NOT APPLE )
115- if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
116- set_property (TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " -fuse-ld=lld" )
117- else ()
118- set_property (TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " -fuse-ld=gold" )
119- endif ()
120- endif ()
121-
122113 # Optionally enable sanitizers
123114 if (UNIX AND CPPSORT_SANITIZE)
124115 target_compile_options (${target} PRIVATE
You can’t perform that action at this time.
0 commit comments