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.

This commit is contained in:
jpekkila
2019-07-29 16:07:31 +03:00
parent a3359b0d04
commit d614a03653

View File

@@ -12,6 +12,8 @@
## CMake settings ## CMake settings
cmake_minimum_required (VERSION 3.5.1) # Need >= 3.8 for first-class CUDA support 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 settings
project(astaroth C CXX) project(astaroth C CXX)