Commit e93e908b authored by GILLES Sebastien's avatar GILLES Sebastien

#1342 CMake script: close the generated PreCache file before running the command.

parent c10c2da1
......@@ -8,6 +8,8 @@ set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard; at least 17 is expected.")
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE STRING "Leave this one active.")
set(CMAKE_CXX_EXTENSIONS OFF CACHE STRING "If ON you might be using gnu++17; with OFF you'll use c++17.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose either 'Debug' or 'Release'")
set(LIBRARY_TYPE STATIC CACHE BOOL "Choose either STATIC or SHARED.")
set(BUILD_MOREFEM_UNIQUE_LIBRARY True CACHE BOOL "Whether a unique library is built for MoReFEM core libraries or on the contrary if it is splitted in modules.")
......
......@@ -8,6 +8,8 @@ set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard; at least 17 is expected.")
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE STRING "Leave this one active.")
set(CMAKE_CXX_EXTENSIONS OFF CACHE STRING "If ON you might be using gnu++17; with OFF you'll use c++17.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose either 'Debug' or 'Release'")
set(LIBRARY_TYPE STATIC CACHE BOOL "Choose either STATIC or SHARED.")
set(BUILD_MOREFEM_UNIQUE_LIBRARY True CACHE BOOL "Whether a unique library is built for MoReFEM core libraries or on the contrary if it is splitted in modules.")
......
......@@ -25,7 +25,6 @@ If you need to change a value which is not provided in this script input, you ma
formatter_class=argparse.RawDescriptionHelpFormatter)
self.__command_line_args = self._interpret_command_line(parser)
output_file = open("PreCacheFile.cmake", "w")
self._parse_pre_cache_file()
self._generate_cache_file()
self._cmake_command()
......@@ -304,6 +303,7 @@ If you need to change a value which is not provided in this script input, you ma
"BOOL",
"If you want to couple Morefem with Phillips library. False in most of the cases! Beware: it is not put in MOREFEM_COMMON_DEP; if you need it you must add it in your add_executable command.")
self.__output_file.close()
def _cmake_command(self):
"""Generates the cmake command, and either run it or print it depending on no_run_command flag.
......@@ -315,6 +315,7 @@ If you need to change a value which is not provided in this script input, you ma
if args.no_run_command:
print("The generated CMake command is:\n\n\t{}".format(cmd))
else:
print("The generated CMake command is:\n\n\t{}".format(cmd))
subprocess.Popen(cmd, shell=True).communicate()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment