Skip to content

Commit

Permalink
[DAPHNE-#830] Silence warning when using LLD
Browse files Browse the repository at this point in the history
With this new CMake configuration, we silence a lot of warnings when using the LLD linker in combination with clang:
``clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]``

A CMake version bump to 3.29 is necessary for this config option. Ubuntu 24 users need to switch to the snap version of CMake. The Docker images already provide CMake 3.30
  • Loading branch information
corepointer committed Oct 6, 2024
1 parent 84637f6 commit a12694e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 3.25.2)
cmake_minimum_required(VERSION 3.29)

# Build release version by default (override with -DCMAKE_BUILD_TYPE=Debug in your initial cmake invocation)
# This needs to be set *before* the project() command
Expand Down Expand Up @@ -153,9 +153,8 @@ endif()

find_program(LLD_PROGRAM lld)
if(LLD_PROGRAM)
message(STATUS "Using lld")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=lld")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=lld")
set(CMAKE_LINKER_TYPE LLD)
message(STATUS "Using lld - LINKER_TYPE: ${CMAKE_LINKER_TYPE}")
endif()

find_package(Arrow REQUIRED)
Expand Down

0 comments on commit a12694e

Please sign in to comment.