From d614a036531159753d6af02a320639efc3b2662a Mon Sep 17 00:00:00 2001 From: jpekkila Date: Mon, 29 Jul 2019 16:07:31 +0300 Subject: [PATCH] Made CMake to use the default compiler on system PATH. If the generic compiler names (cc, c++) point to some old version, then cmake would otherwise use those instead of the latest available compiler. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a82620a..04a73d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,8 @@ ## CMake settings cmake_minimum_required (VERSION 3.5.1) # Need >= 3.8 for first-class CUDA support +find_program(CMAKE_C_COMPILER NAMES $ENV{CC} gcc PATHS ENV PATH NO_DEFAULT_PATH) +find_program(CMAKE_CXX_COMPILER NAMES $ENV{CXX} g++ PATHS ENV PATH NO_DEFAULT_PATH) ## Project settings project(astaroth C CXX)