Commit 105574db authored by GILLES Sebastien's avatar GILLES Sebastien

#1462 Add CMAKE_C_COMPILER and CMAKE_CXX_COMPILER in generated CMake cache file.

parent c75b6622
......@@ -35,11 +35,6 @@ endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/cmake)
# ===================================================================================================================
# Set C and C++ compiler (or more exactly their mpi wrappers)
# ===================================================================================================================
set(CMAKE_C_COMPILER ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/bin/mpicc CACHE FILEPATH "C compiler. Prefer to use an openmpi wrapper.")
set(CMAKE_CXX_COMPILER ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/bin/mpic++ CACHE FILEPATH "C++ compiler. Prefer to use an openmpi wrapper.")
# ===================================================================================================================
# Set project.
......
......@@ -2,6 +2,9 @@ set(CMAKE_INSTALL_PREFIX /opt CACHE PATH "Installation directory for executables
set(MOREFEM_THIRD_PARTY_LIBRARIES_DIR /opt CACHE STRING "Path to third party directory")
set(CMAKE_C_COMPILER ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/bin/mpicc CACHE FILEPATH "C compiler. Prefer to use an openmpi wrapper.")
set(CMAKE_CXX_COMPILER ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/bin/mpic++ CACHE FILEPATH "C++ compiler. Prefer to use an openmpi wrapper.")
set(MOREFEM_ASAN False CACHE BOOL "If true address sanitizer is enabled.")
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard; at least 17 is expected.")
......
......@@ -2,6 +2,9 @@ set(CMAKE_INSTALL_PREFIX /placeholder_value CACHE PATH "Installation directory f
set(MOREFEM_THIRD_PARTY_LIBRARIES_DIR /Volumes/Data/opt/clang_debug CACHE STRING "Path to third party directory")
set(CMAKE_C_COMPILER ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/bin/mpicc CACHE FILEPATH "C compiler. Prefer to use an openmpi wrapper.")
set(CMAKE_CXX_COMPILER ${MOREFEM_THIRD_PARTY_LIBRARIES_DIR}/Openmpi/bin/mpic++ CACHE FILEPATH "C++ compiler. Prefer to use an openmpi wrapper.")
set(MOREFEM_ASAN False CACHE BOOL "If true address sanitizer is enabled.")
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard; at least 17 is expected.")
......
......@@ -141,6 +141,7 @@ If you need to change a value which is not provided in this script input, you ma
"""
possible_keys = ('CMAKE_INSTALL_PREFIX',
'MOREFEM_THIRD_PARTY_LIBRARIES_DIR',
'CMAKE_C_COMPILER', 'CMAKE_CXX_COMPILER',
'CMAKE_CXX_STANDARD', 'CMAKE_CXX_STANDARD_REQUIRED',
'CMAKE_CXX_EXTENSIONS', 'LIBRARY_TYPE',
'BUILD_MOREFEM_UNIQUE_LIBRARY',
......@@ -224,6 +225,7 @@ If you need to change a value which is not provided in this script input, you ma
output_file = self.__output_file
pre_cache_dict = self.__pre_cache_dict
self._cache_entry("CMAKE_INSTALL_PREFIX", \
"PATH",
"Installation directory for executables and libraries. A MoReFEM folder will be created there when install is invoked. This value should be overridden in command line!",
......@@ -234,6 +236,15 @@ If you need to change a value which is not provided in this script input, you ma
"Path to third party directory",
args.third_party_directory)
self._cache_entry("CMAKE_C_COMPILER", \
"STRING",
"C compiler. Prefer to use an openmpi wrapper.")
self._cache_entry("CMAKE_CXX_COMPILER", \
"PATH",
"C++ compiler. Prefer to use an openmpi wrapper.")
# self._cache_entry("MOREFEM_ASAN", \
# "BOOL",
# "If true address sanitizer is enabled.",
......
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