s/minimum_cmake_version/min_cmake_version/
This commit is contained in:
parent
ea694c0bdd
commit
ea650eace1
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[cc]
|
||||
source: ../../../modules/cc.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[cc]
|
||||
source: ../../../modules/cc.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[cxx]
|
||||
source: ../../../modules/cxx.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[cxx]
|
||||
source: ../../../modules/cxx.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[cxx]
|
||||
source: ../../../modules/cxx.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[fc]
|
||||
source: ../../../modules/fc.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[fc]
|
||||
source: ../../../modules/fc.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[fc]
|
||||
source: ../../../modules/fc.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[fc]
|
||||
source: ../../../modules/fc.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[fc]
|
||||
source: ../../../modules/fc.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[fc]
|
||||
source: ../../../modules/fc.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[fc]
|
||||
source: ../../../modules/fc.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[cxx]
|
||||
source: ../../../modules/cxx.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[cxx]
|
||||
source: ../../../modules/cxx.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[cxx]
|
||||
source: ../../../modules/cxx.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name: example
|
||||
minimum_cmake_version: 2.8
|
||||
min_cmake_version: 2.8
|
||||
|
||||
[cxx]
|
||||
source: ../../../modules/cxx.cmake
|
||||
|
12
update.py
12
update.py
@ -180,7 +180,7 @@ def gen_setup(config, relative_path):
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
def gen_cmakelists(project_name, minimum_cmake_version, relative_path, modules):
|
||||
def gen_cmakelists(project_name, min_cmake_version, relative_path, modules):
|
||||
"""
|
||||
Generate CMakeLists.txt.
|
||||
"""
|
||||
@ -189,7 +189,7 @@ def gen_cmakelists(project_name, minimum_cmake_version, relative_path, modules):
|
||||
s.append(autogenerated_notice())
|
||||
|
||||
s.append('\n# set minimum cmake version')
|
||||
s.append('cmake_minimum_required(VERSION %s FATAL_ERROR)' % minimum_cmake_version)
|
||||
s.append('cmake_minimum_required(VERSION %s FATAL_ERROR)' % min_cmake_version)
|
||||
|
||||
s.append('\n# project name')
|
||||
s.append('project(%s)' % project_name)
|
||||
@ -377,11 +377,11 @@ def main(argv):
|
||||
sys.exit(-1)
|
||||
project_name = config.get('project', 'name')
|
||||
|
||||
if not config.has_option('project', 'minimum_cmake_version'):
|
||||
sys.stderr.write("ERROR: you have to specify the minimum_cmake_version for CMake\n")
|
||||
if not config.has_option('project', 'min_cmake_version'):
|
||||
sys.stderr.write("ERROR: you have to specify the min_cmake_version for CMake\n")
|
||||
sys.stderr.write(" in autocmake.cfg under [project]\n")
|
||||
sys.exit(-1)
|
||||
minimum_cmake_version = config.get('project', 'minimum_cmake_version')
|
||||
min_cmake_version = config.get('project', 'min_cmake_version')
|
||||
|
||||
# get relative path from setup.py script to this directory
|
||||
relative_path = os.path.relpath(os.path.abspath('.'), project_root)
|
||||
@ -391,7 +391,7 @@ def main(argv):
|
||||
|
||||
# create CMakeLists.txt
|
||||
print('- generating CMakeLists.txt')
|
||||
s = gen_cmakelists(project_name, minimum_cmake_version, relative_path, modules)
|
||||
s = gen_cmakelists(project_name, min_cmake_version, relative_path, modules)
|
||||
with open(os.path.join(project_root, 'CMakeLists.txt'), 'w') as f:
|
||||
f.write('%s\n' % '\n'.join(s))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user