diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeCXXCompiler.cmake.in | 2 | ||||
-rw-r--r-- | Modules/CMakeCXXCompilerId.cpp.in | 16 | ||||
-rw-r--r-- | Modules/CMakePlatformId.h.in | 3 | ||||
-rw-r--r-- | Modules/Compiler/IAR-ASM.cmake | 7 | ||||
-rw-r--r-- | Modules/Compiler/IAR-C.cmake | 5 | ||||
-rw-r--r-- | Modules/Compiler/IAR-CXX.cmake | 6 | ||||
-rw-r--r-- | Modules/Compiler/IAR-DetermineCompiler.cmake | 2 | ||||
-rw-r--r-- | Modules/Compiler/IAR-FindBinUtils.cmake | 3 | ||||
-rw-r--r-- | Modules/FindHDF5.cmake | 4 | ||||
-rw-r--r-- | Modules/FindOpenMP.cmake | 2 | ||||
-rw-r--r-- | Modules/FindPostgreSQL.cmake | 5 | ||||
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 7 |
12 files changed, 52 insertions, 10 deletions
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in index ef65021..efb8abf 100644 --- a/Modules/CMakeCXXCompiler.cmake.in +++ b/Modules/CMakeCXXCompiler.cmake.in @@ -45,7 +45,7 @@ set(CMAKE_CXX_COMPILER_ID_RUN 1) set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP) set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) -foreach (lang OBJC OBJCXX) +foreach (lang C OBJC OBJCXX) if (CMAKE_${lang}_COMPILER_ID_RUN) foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 34639b4..a743ce7 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -27,10 +27,20 @@ char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; @CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@ @CMAKE_CXX_COMPILER_ID_ERROR_FOR_TEST@ -#if defined(_MSC_VER) && defined(_MSVC_LANG) -#define CXX_STD _MSVC_LANG +#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L +# if defined(__INTEL_CXX11_MODE__) +# if defined(__cpp_aggregate_nsdmi) +# define CXX_STD 201402L +# else +# define CXX_STD 201103L +# endif +# else +# define CXX_STD 199711L +# endif +#elif defined(_MSC_VER) && defined(_MSVC_LANG) +# define CXX_STD _MSVC_LANG #else -#define CXX_STD __cplusplus +# define CXX_STD __cplusplus #endif const char* info_language_dialect_default = "INFO" ":" "dialect_default[" diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in index 95465ce..64a00b3 100644 --- a/Modules/CMakePlatformId.h.in +++ b/Modules/CMakePlatformId.h.in @@ -177,6 +177,9 @@ # elif defined(__ICCV850__) # define ARCHITECTURE_ID "V850" +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + # else /* unknown architecture */ # define ARCHITECTURE_ID "" # endif diff --git a/Modules/Compiler/IAR-ASM.cmake b/Modules/Compiler/IAR-ASM.cmake index 413d9e2..936d4ae 100644 --- a/Modules/Compiler/IAR-ASM.cmake +++ b/Modules/Compiler/IAR-ASM.cmake @@ -40,7 +40,12 @@ elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430") elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850") set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -S <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>") __compiler_iar_xlink(ASM) - set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS r85;asm;msa) + set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s85;asm;msa) + +elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051") + set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -S <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>") + __compiler_iar_xlink(ASM) + set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s51;asm;msa) else() message(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID not detected. This should be automatic.") diff --git a/Modules/Compiler/IAR-C.cmake b/Modules/Compiler/IAR-C.cmake index 9ad1ba0..e27fdfc 100644 --- a/Modules/Compiler/IAR-C.cmake +++ b/Modules/Compiler/IAR-C.cmake @@ -65,6 +65,11 @@ elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850") __compiler_check_default_language_standard(C 1.10 90 4.10 99) set(CMAKE_C_OUTPUT_EXTENSION ".r85") +elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051") + __compiler_iar_xlink(C) + __compiler_check_default_language_standard(C 6.10 90 8.10 99) + set(CMAKE_C_OUTPUT_EXTENSION ".r51") + else() message(FATAL_ERROR "CMAKE_C_COMPILER_ARCHITECTURE_ID not detected. This should be automatic.") endif() diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake index 549d242..eca89c5 100644 --- a/Modules/Compiler/IAR-CXX.cmake +++ b/Modules/Compiler/IAR-CXX.cmake @@ -72,6 +72,12 @@ elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850") __compiler_iar_xlink(CXX) __compiler_check_default_language_standard(CXX 1.10 98) set(CMAKE_C_OUTPUT_EXTENSION ".r85") + +elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051") + __compiler_iar_xlink(CXX) + __compiler_check_default_language_standard(CXX 6.10 98) + set(CMAKE_C_OUTPUT_EXTENSION ".r51") + else() message(FATAL_ERROR "CMAKE_CXX_COMPILER_ARCHITECTURE_ID not detected. This should be automatic." ) endif() diff --git a/Modules/Compiler/IAR-DetermineCompiler.cmake b/Modules/Compiler/IAR-DetermineCompiler.cmake index 7e17778..0a026b2 100644 --- a/Modules/Compiler/IAR-DetermineCompiler.cmake +++ b/Modules/Compiler/IAR-DetermineCompiler.cmake @@ -31,7 +31,7 @@ set(_compiler_id_version_compute " # define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(((__VER__) / 1000) % 1000) # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@((__VER__) % 1000) # define @PREFIX@COMPILER_VERSION_INTERNAL @MACRO_DEC@(__IAR_SYSTEMS_ICC__) -# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__)) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__)) # define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@((__VER__) / 100) # define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@((__VER__) - (((__VER__) / 100)*100)) # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__SUBVERSION__) diff --git a/Modules/Compiler/IAR-FindBinUtils.cmake b/Modules/Compiler/IAR-FindBinUtils.cmake index 6258cf3..6ef3759 100644 --- a/Modules/Compiler/IAR-FindBinUtils.cmake +++ b/Modules/Compiler/IAR-FindBinUtils.cmake @@ -46,7 +46,8 @@ set(CMAKE_IAR_LINKER \"${CMAKE_IAR_LINKER}\") elseif("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR" OR "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430" OR - "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850") + "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850" OR + "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051") # Find the "xlink" linker and "xar" archiver: find_program(CMAKE_IAR_LINKER xlink HINTS ${__iar_hints} diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 08863c8..b488418 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -761,7 +761,7 @@ mark_as_advanced( HDF5_DIFF_EXECUTABLE ) if( NOT HDF5_FOUND ) # seed the initial lists of libraries to find with items we know we need set(HDF5_C_LIBRARY_NAMES hdf5) - set(HDF5_C_HL_LIBRARY_NAMES hdf5_hl) + set(HDF5_C_HL_LIBRARY_NAMES hdf5_hl ${HDF5_C_LIBRARY_NAMES} ) set(HDF5_CXX_LIBRARY_NAMES hdf5_cpp ${HDF5_C_LIBRARY_NAMES}) set(HDF5_CXX_HL_LIBRARY_NAMES hdf5_hl_cpp ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_CXX_LIBRARY_NAMES}) @@ -772,7 +772,7 @@ if( NOT HDF5_FOUND ) foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS) # find the HDF5 include directories if("${__lang}" STREQUAL "Fortran") - set(HDF5_INCLUDE_FILENAME hdf5.mod) + set(HDF5_INCLUDE_FILENAME hdf5.mod HDF5.mod) elseif("${__lang}" STREQUAL "CXX") set(HDF5_INCLUDE_FILENAME H5Cpp.h) else() diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index def23bb..ab9d73a 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -128,6 +128,8 @@ int main(void) { #ifdef _OPENMP omp_get_max_threads(); return 0; +#elif defined(__HIP_DEVICE_COMPILE__) + return 0; #else breaks_on_purpose #endif diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake index dfece22..cfa4ebc 100644 --- a/Modules/FindPostgreSQL.cmake +++ b/Modules/FindPostgreSQL.cmake @@ -87,7 +87,7 @@ set(PostgreSQL_ROOT_DIR_MESSAGE "Set the PostgreSQL_ROOT system variable to wher set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS} - "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") + "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") # Define additional search paths for root directories. set( PostgreSQL_ROOT_DIRECTORIES @@ -107,8 +107,11 @@ foreach(suffix ${PostgreSQL_KNOWN_VERSIONS}) list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES "pgsql-${suffix}/lib") list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES + "postgresql${suffix}" + "postgresql/${suffix}" "pgsql-${suffix}/include") list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES + "postgresql${suffix}/server" "postgresql/${suffix}/server" "pgsql-${suffix}/include/server") endif() diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index e3eeea4..0e1429d 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -258,6 +258,7 @@ if(MSVC) cmake_host_system_information(RESULT _vs_dir QUERY VS_${_vs_ver}_DIR) # undocumented query if(IS_DIRECTORY "${_vs_dir}") file(GLOB _vs_glob_redist_paths "${_vs_dir}/VC/Redist/MSVC/*") + list(REVERSE _vs_glob_redist_paths) list(APPEND _vs_redist_paths ${_vs_glob_redist_paths}) endif() unset(_vs_glob_redist_paths) @@ -287,6 +288,9 @@ if(MSVC) "${MSVC_CRT_DIR}/msvcp${v}.dll" ) if(NOT vs VERSION_LESS 14) + if(EXISTS "${MSVC_CRT_DIR}/vcruntime${v}_1.dll") + list(APPEND __install__libs "${MSVC_CRT_DIR}/vcruntime${v}_1.dll") + endif() list(APPEND __install__libs "${MSVC_CRT_DIR}/vcruntime${v}.dll" "${MSVC_CRT_DIR}/concrt${v}.dll" @@ -305,6 +309,9 @@ if(MSVC) "${MSVC_CRT_DIR}/msvcp${v}d.dll" ) if(NOT vs VERSION_LESS 14) + if(EXISTS "${MSVC_CRT_DIR}/vcruntime${v}_1d.dll") + list(APPEND __install__libs "${MSVC_CRT_DIR}/vcruntime${v}_1d.dll") + endif() list(APPEND __install__libs "${MSVC_CRT_DIR}/vcruntime${v}d.dll" "${MSVC_CRT_DIR}/concrt${v}d.dll" |