From 39d8b029db7a0d065f9c3cdedf3823b858267244 Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Sat, 20 Jun 2015 15:49:13 +0200 Subject: [PATCH] do not require python by default --- modules/build_info.cmake | 2 ++ update.py | 20 +++++--------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/modules/build_info.cmake b/modules/build_info.cmake index 41f4ff0..4aa117a 100644 --- a/modules/build_info.cmake +++ b/modules/build_info.cmake @@ -3,6 +3,8 @@ # Generates source code that echoes configuration and build # information to the program output. +find_package(PythonInterp REQUIRED) + # generated cmake files will be written to this path # only build info is generated # everything else is static for the user diff --git a/update.py b/update.py index 012e090..cd687ff 100755 --- a/update.py +++ b/update.py @@ -159,30 +159,20 @@ def gen_cmakelists(config, relative_path, list_of_modules): s.append('# set minimum cmake version') s.append('cmake_minimum_required(VERSION 2.8 FATAL_ERROR)') - s.append('\n') - s.append('project(%s)' % project_name) + s.append('\nproject(%s)' % project_name) - s.append('\n') - s.append('# do not rebuild if rules (compiler flags) change') + s.append('\n# do not rebuild if rules (compiler flags) change') s.append('set(CMAKE_SKIP_RULE_DEPENDENCY TRUE)') - s.append('\n') - s.append('if(NOT CMAKE_BUILD_TYPE)') + s.append('\nif(NOT CMAKE_BUILD_TYPE)') s.append(' set(CMAKE_BUILD_TYPE "Debug")') s.append('endif()') - s.append('\n') - s.append('# python interpreter is required at many') - s.append('# places during configuration and build') - s.append('find_package(PythonInterp REQUIRED)') - - s.append('\n') - s.append('# directory which holds enabled cmake modules') + s.append('\n# directory which holds enabled cmake modules') s.append('set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}') s.append(' ${PROJECT_SOURCE_DIR}/%s)' % os.path.join(relative_path, 'modules')) - s.append('\n') - s.append('# included cmake modules') + s.append('\n# included cmake modules') for m in list_of_modules: s.append('include(autocmake_%s)' % os.path.splitext(m)[0])