Просмотр исходного кода

Use 'REQUIRED' instead of custom error message when ccache is not found

Joakim Thorén 1 год назад
Родитель
Сommit
25be15a023
1 измененных файлов с 1 добавлено и 4 удалено
  1. 1 4
      CMakeLists.txt

+ 1 - 4
CMakeLists.txt

@@ -81,10 +81,7 @@ endif()
 
 option(ENABLE_CCACHE "Speed up recompilation by caching previous compilations" OFF)
 if(ENABLE_CCACHE)
-	find_program(CCACHE ccache)
-	if(CCACHE-NOTFOUND)
-		message(FATAL_ERROR "'ccache' could not be found; install it or set ENABLE_CCACHE=OFF.")
-	endif()
+	find_program(CCACHE ccache REQUIRED)
 endif()
 
 # On Linux, use ccache via CMAKE_CXX_COMPILER_LAUNCHER.