diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCSharpCompiler.cmake | 2 | ||||
-rw-r--r-- | Modules/CMakeParseImplicitLinkInfo.cmake | 2 | ||||
-rw-r--r-- | Modules/FindHDF5.cmake | 2 | ||||
-rw-r--r-- | Modules/FindOpenGL.cmake | 45 | ||||
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 8 |
5 files changed, 33 insertions, 26 deletions
diff --git a/Modules/CMakeDetermineCSharpCompiler.cmake b/Modules/CMakeDetermineCSharpCompiler.cmake index 55b2fb3..eb825a5 100644 --- a/Modules/CMakeDetermineCSharpCompiler.cmake +++ b/Modules/CMakeDetermineCSharpCompiler.cmake @@ -23,7 +23,7 @@ if(NOT CMAKE_CSharp_COMPILER_ID_RUN) include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake) CMAKE_DETERMINE_COMPILER_ID(CSharp CSFLAGS CMakeCSharpCompilerId.cs) - execute_process(COMMAND "${CMAKE_CSharp_COMPILER}" "/help" OUTPUT_VARIABLE output) + execute_process(COMMAND "${CMAKE_CSharp_COMPILER}" "/help /preferreduilang:en-US" OUTPUT_VARIABLE output) string(REPLACE "\n" ";" output "${output}") foreach(line ${output}) string(TOUPPER ${line} line) diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index 3b77278..63d18ab 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -142,7 +142,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj # We remove items that are not language-specific. set(implicit_libs "") foreach(lib IN LISTS implicit_libs_tmp) - if("x${lib}" MATCHES "^x(crt.*\\.o|System.*|.*libclang_rt.*|msvcrt.*|libvcruntime.*|libucrt.*|libcmt.*)$") + if("x${lib}" MATCHES "^x(crt.*\\.o|gcc_eh.*|System.*|.*libclang_rt.*|msvcrt.*|libvcruntime.*|libucrt.*|libcmt.*)$") string(APPEND log " remove lib [${lib}]\n") elseif(IS_ABSOLUTE "${lib}") get_filename_component(abs "${lib}" ABSOLUTE) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index de20049..3279bf2 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -214,7 +214,7 @@ function(_HDF5_test_regular_compiler_C success version is_parallel) ) set(${version} ${CMAKE_MATCH_1}) if(CMAKE_MATCH_3) - set(${version} ${HDF5_CXX_VERSION}.${CMAKE_MATCH_3}) + set(${version} ${HDF5_C_VERSION}.${CMAKE_MATCH_3}) endif() set(${version} ${${version}} PARENT_SCOPE) diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index 59bee41..11843ef 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -53,7 +53,7 @@ # Path to the EGL include directory. # ``OPENGL_LIBRARIES`` # Paths to the OpenGL library, windowing system libraries, and GLU libraries. -# On Linux, this assumes glX and is never correct for EGL-based targets. +# On Linux, this assumes GLX and is never correct for EGL-based targets. # Clients are encouraged to use the ``OpenGL::*`` import targets instead. # # Cache variables @@ -80,12 +80,14 @@ # context libraries from OpenGL itself; OpenGL lives in "libOpenGL", and # contexts are defined in "libGLX" or "libEGL". GLVND is currently the only way # to get OpenGL 3+ functionality via EGL in a manner portable across vendors. +# Projects may use GLVND explicitly with target ``OpenGL::OpenGL`` and either +# ``OpenGL::GLX`` or ``OpenGL::EGL``. # -# On Linux systems FindOpenGL defaults to using GLVND if available. Users can -# utilize GLVND explicitly with targets ``OpenGL::OpenGL``, ``OpenGL::GLX``, and -# ``OpenGL::EGL``. Additionally, when GLVND is available the ``OpenGL::GL`` -# target is equivalent to ``OpenGL::OpenGL OpenGL::GLX``. When the system is -# not GLVND-based, ``OpenGL::GL`` expands to libGL as it has historically done. +# Projects may use the ``OpenGL::GL`` target (or ``OPENGL_LIBRARIES`` variable) +# to use legacy GL. By default, these will use the legacy libGL library file. +# If ``OPENGL_gl_LIBRARY`` is empty or not found and GLVND is available, the +# ``OpenGL::GL`` target will use GLVND ``OpenGL::OpenGL`` and ``OpenGL::GLX`` +# (and the ``OPENGL_LIBRARIES`` variable will use the corresponding libraries). # Thus, for non-EGL-based Linux targets, the ``OpenGL::GL`` target is most # portable. # @@ -360,18 +362,8 @@ if(OPENGL_FOUND) "${OPENGL_GLX_INCLUDE_DIR}") endif() - if(TARGET OpenGL::OpenGL AND TARGET OpenGL::GLX AND NOT TARGET OpenGL::GL) - # if GLVND with GLX is available, make ::GL a synonym for 'OpenGL::OpenGL - # OpenGL::GLX'. - add_library(OpenGL::GL INTERFACE IMPORTED) - set_target_properties(OpenGL::GL PROPERTIES INTERFACE_LINK_LIBRARIES - OpenGL::OpenGL) - set_property(TARGET OpenGL::GL APPEND PROPERTY INTERFACE_LINK_LIBRARIES - OpenGL::GLX) - set_target_properties(OpenGL::GL PROPERTIES INTERFACE_INCLUDE_DIRECTORIES - "${OPENGL_INCLUDE_DIR}") - - elseif(NOT TARGET OpenGL::GL) + if(OPENGL_gl_LIBRARY AND NOT TARGET OpenGL::GL) + # A legacy GL library is available, so use it for the legacy GL target. if(IS_ABSOLUTE "${OPENGL_gl_LIBRARY}") add_library(OpenGL::GL UNKNOWN IMPORTED) if(OPENGL_gl_LIBRARY MATCHES "/([^/]+)\\.framework$") @@ -392,6 +384,16 @@ if(OPENGL_FOUND) endif() set_target_properties(OpenGL::GL PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${OPENGL_INCLUDE_DIR}") + elseif(NOT TARGET OpenGL::GL AND TARGET OpenGL::OpenGL AND TARGET OpenGL::GLX) + # A legacy GL library is not available, but we can provide the legacy GL + # target using GLVND OpenGL+GLX. + add_library(OpenGL::GL INTERFACE IMPORTED) + set_target_properties(OpenGL::GL PROPERTIES INTERFACE_LINK_LIBRARIES + OpenGL::OpenGL) + set_property(TARGET OpenGL::GL APPEND PROPERTY INTERFACE_LINK_LIBRARIES + OpenGL::GLX) + set_target_properties(OpenGL::GL PROPERTIES INTERFACE_INCLUDE_DIRECTORIES + "${OPENGL_INCLUDE_DIR}") endif() # ::EGL is a GLVND library, and thus Linux-only: we don't bother checking @@ -440,9 +442,12 @@ if(OPENGL_FOUND) endif() # OPENGL_LIBRARIES mirrors OpenGL::GL's logic ... - set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY}) - if(TARGET OpenGL::GLX AND TARGET OpenGL::OpenGL) + if(OPENGL_gl_LIBRARY) + set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY}) + elseif(TARGET OpenGL::OpenGL AND TARGET OpenGL::GLX) set(OPENGL_LIBRARIES ${OPENGL_opengl_LIBRARY} ${OPENGL_glx_LIBRARY}) + else() + set(OPENGL_LIBRARIES "") endif() # ... and also includes GLU, if available. if(TARGET OpenGL::GLU) diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index ac8c20b..1ba4877 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -593,15 +593,17 @@ if(_IRSL_HAVE_Intel) endif() endif() if(WIN32) - set(__install_dirs "${_Intel_redistdir}/irml" "${_Intel_redistdir}/irml_c" - "${_Intel_redistdir}/1033" "${_Intel_redistdir}/1041") + set(__install_dirs "${_Intel_redistdir}/1033") + if(_Intel_compiler_ver VERSION_LESS 18) + list(APPEND __install_dirs "${_Intel_redistdir}/irml" "${_Intel_redistdir}/irml_c" "${_Intel_redistdir}/1041") + endif() foreach(__Intel_lib IN ITEMS cilkrts20.dll libchkp.dll libgfxoffload.dll libioffload_host.dll libirngmd.dll libmmd.dll libmmdd.dll libmpx.dll liboffload.dll svml_dispmd.dll) list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") endforeach() if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel) - foreach(__Intel_lib IN ITEMS libicaf.dll libifcoremd.dll libifcoremdd.dll libifcorert.dll libifcorertd.dll libifportmd.dll) + foreach(__Intel_lib IN ITEMS ifdlg100.dll libicaf.dll libifcoremd.dll libifcoremdd.dll libifcorert.dll libifcorertd.dll libifportmd.dll) list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}") endforeach() |