From a2e5b3be3263499d624b9dfdef32e9f078f6d72a Mon Sep 17 00:00:00 2001 From: Patrick Brosi Date: Mon, 1 Apr 2019 21:56:52 +0200 Subject: [PATCH] only cpplint in debug builds to avoid python2 dependency --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3163cf4..5016463 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,8 +2,13 @@ cmake_minimum_required (VERSION 2.8) project (pfaedle) -set(CPPLINT "${CMAKE_SOURCE_DIR}/cpplint.py") -include(cmake/cpplint.cmake) +if (CMAKE_BUILD_TYPE) + string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE) +endif() +if (CMAKE_BUILD_TYPE STREQUAL "DEBUG") + set(CPPLINT "${CMAKE_SOURCE_DIR}/cpplint.py") + include(cmake/cpplint.cmake) +endif() set(CPPLINT_PROJECT_ROOT "src")