Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c10c2da1 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1342 CMake script: add a mechanism to point out missing keys in original pre-cache file.

parent 6d5a7b73
No related branches found
No related tags found
No related merge requests found
......@@ -129,6 +129,7 @@ If you need to change a value which is not provided in this script input, you ma
'BOOST_INCL_DIR', 'BOOST_LIB_DIR',
'LUA_INCL_DIR', 'LUA_LIB_DIR',
'PARMETIS_INCL_DIR', 'PARMETIS_LIB_DIR',
'CMAKE_BUILD_TYPE'
)
with open(self.__command_line_args.cache_file) as stream:
......@@ -172,7 +173,12 @@ If you need to change a value which is not provided in this script input, you ma
if command_line_entry_value:
value = command_line_entry_value
else:
value = self.__pre_cache_dict[entry_name]
try:
value = self.__pre_cache_dict[entry_name]
except KeyError:
raise Exception("Entry name {} was not provided in PreCache file {}".format(entry_name, \
self.__command_line_args.cache_file))
entry = 'set({0} {1} CACHE {2} "{3}")'.format(entry_name, value, cmake_type, cmake_comment)
......@@ -204,6 +210,11 @@ If you need to change a value which is not provided in this script input, you ma
"BOOL",
"If true address sanitizer is enabled.",
args.use_sanitizer)
self._cache_entry("CMAKE_BUILD_TYPE", \
"STRING",
"Either 'Debug' or 'Release'",
args.use_sanitizer)
self._cache_entry("CMAKE_CXX_STANDARD",
"STRING",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment