浏览代码

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

Joakim Thorén 1 年之前
父节点
当前提交
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.