From 565ca2005049f3266fe033260fbacf2f403b9c71 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 23 Jun 2023 18:05:19 +0200 Subject: [PATCH] Set compiler to clang in CMakeLists.txt --- CMakeLists.txt | 7 +++++-- flake.nix | 4 ---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a2a981..36fb051 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,9 @@ cmake_minimum_required(VERSION 3.20) +set(CMAKE_C_COMPILER "clang") +set(CMAKE_CXX_COMPILER "clang++") + project(BENCH6 LANGUAGES C CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") @@ -83,9 +86,9 @@ macro(mk_bench NAME) add_executable(${NAME}) get_property(BENCH6_LIST GLOBAL PROPERTY bench6_list) - message(STATUS "Before BENCH6_LIST=${BENCH6_LIST}") + #message(STATUS "Before BENCH6_LIST=${BENCH6_LIST}") list(APPEND BENCH6_LIST ${NAME}) - message(STATUS "After BENCH6_LIST=${BENCH6_LIST}") + #message(STATUS "After BENCH6_LIST=${BENCH6_LIST}") set_property(GLOBAL PROPERTY bench6_list "${BENCH6_LIST}") install(TARGETS ${NAME} RUNTIME DESTINATION bin) diff --git a/flake.nix b/flake.nix index a10d62e..db3b695 100644 --- a/flake.nix +++ b/flake.nix @@ -23,10 +23,6 @@ ]; enableParallelBuilding = false; - cmakeFlags = [ - "-DCMAKE_C_COMPILER=clang" - "-DCMAKE_CXX_COMPILER=clang++" - ]; hardeningDisable = [ "all" ]; dontStrip = true; };