Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

Michael Jackson

I’m having an issue configuring HDF5 1.8.19 and 1.8.20. My configuration environment is:

+ Visual Studio 14 2015 Win64

+ Intel Visual Fortran 17

+ CMake 3.8.x

+ NMake Makefiles

 

When I try the install the install script will complain that it cannot find a few files. After some debugging through the CMake code I have determined that the issue is in places like the hl/fortran/src/CMakeLists.txt

 

  if (WIN32)

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

 

That “WIN32” logic assumes a Visual Studio build. When using NMake (or most likely anything OTHER than Visual Studio) the trailing /${CMAKE_BUILD_TYPE} folder will NOT be present. The fix is to do:

 

  if (MSVC_IDE)

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

 

 

Which will ONLY use that subfolder logic for Visual Studio builds. Where is the Git repository for HDF5? I can get a patch together and submit a pull request with the full fixes. I have not had the time to try out the 1.10.x sources so I do NOT know if this was found and fixed for those releases.

 

Thanks

-- 

Michael A. Jackson                 400 S. Pioneer Blvd
Owner, President                   Springboro, Ohio 45066
BlueQuartz Software, LLC           EMail: [hidden email]
Voice: 937-790-1601                Web: http://www.bluequartz.net
Fax: 937-746-0783

 


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Re: Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

Elena Pourmal
Hi Mike and All,

Happy New Year!

HDF5 repository is https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse. You may also send the patch to [hidden email].

We will discuss the problem tomorrow during our developers meeting.

Thank you!

Elena



On Jan 7, 2018, at 2:58 PM, Michael Jackson <[hidden email]> wrote:

I’m having an issue configuring HDF5 1.8.19 and 1.8.20. My configuration environment is:
+ Visual Studio 14 2015 Win64
+ Intel Visual Fortran 17
+ CMake 3.8.x
+ NMake Makefiles
 
When I try the install the install script will complain that it cannot find a few files. After some debugging through the CMake code I have determined that the issue is in places like the hl/fortran/src/CMakeLists.txt
 
  if (WIN32)
    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})
  else ()
    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
  endif ()
 
That “WIN32” logic assumes a Visual Studio build. When using NMake (or most likely anything OTHER than Visual Studio) the trailing /${CMAKE_BUILD_TYPE} folder will NOT be present. The fix is to do:
 
  if (MSVC_IDE)
    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})
  else ()
    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
  endif ()
 
 
Which will ONLY use that subfolder logic for Visual Studio builds. Where is the Git repository for HDF5? I can get a patch together and submit a pull request with the full fixes. I have not had the time to try out the 1.10.x sources so I do NOT know if this was found and fixed for those releases.
 
Thanks
-- 
Michael A. Jackson                 400 S. Pioneer Blvd
Owner, President                   Springboro, Ohio 45066
BlueQuartz Software, LLC           EMail: [hidden email]
Voice: 937-790-1601                Web: http://www.bluequartz.net
Fax: 937-746-0783
 
_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Re: Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

Michael Jackson

Sorry, but I jumped too soon on sending that email. There is still an issue when trying to install with a Visual Studio built HDF5. Once I actually work it out I’ll post to the list.

 

--

Mike Jackson

BlueQuartz Software

[e]: [hidden email]

 

 

From: Hdf-forum <[hidden email]> on behalf of Elena Pourmal <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Sunday, January 7, 2018 at 5:22 PM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

 

Hi Mike and All,

 

Happy New Year!

 

HDF5 repository is https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse. You may also send the patch to [hidden email].

 

We will discuss the problem tomorrow during our developers meeting.

 

Thank you!

 

Elena

 

 

 

On Jan 7, 2018, at 2:58 PM, Michael Jackson <[hidden email]> wrote:

 

I’m having an issue configuring HDF5 1.8.19 and 1.8.20. My configuration environment is:

+ Visual Studio 14 2015 Win64

+ Intel Visual Fortran 17

+ CMake 3.8.x

+ NMake Makefiles

 

When I try the install the install script will complain that it cannot find a few files. After some debugging through the CMake code I have determined that the issue is in places like the hl/fortran/src/CMakeLists.txt

 

  if (WIN32)

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

 

That “WIN32” logic assumes a Visual Studio build. When using NMake (or most likely anything OTHER than Visual Studio) the trailing /${CMAKE_BUILD_TYPE} folder will NOT be present. The fix is to do:

 

  if (MSVC_IDE)

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

 

 

Which will ONLY use that subfolder logic for Visual Studio builds. Where is the Git repository for HDF5? I can get a patch together and submit a pull request with the full fixes. I have not had the time to try out the 1.10.x sources so I do NOT know if this was found and fixed for those releases.

 

Thanks

-- 

Michael A. Jackson                 400 S. Pioneer Blvd
Owner, President                   Springboro, Ohio 45066
BlueQuartz Software, LLC           EMail: [hidden email]
Voice: 937-790-1601                Web: http://www.bluequartz.net
Fax: 937-746-0783

 

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: 
https://twitter.com/hdf5

 

_______________________________________________ Hdf-forum is for HDF software users discussion. [hidden email] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Re: Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

Michael Jackson
In reply to this post by Elena Pourmal

These changes seem to work, at least on my Windows 10x64, Visual Studio 2015 configuration. I tested with Visual Fortran 17. I have Visual Fortran 18 at my disposal also but I have not tried it yet.

 

In fortran/src/CMakeLists.txt file:

 

if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)

  file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared")

  if (MSVC_IDE)

    set (MODSH_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${CMAKE_INSTALL_CONFIG_NAME}")

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

endif ()

if (MSVC_IDE)

  set (MOD_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${CMAKE_INSTALL_CONFIG_NAME}")

else ()

  set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)

endif ()

 

and in hl/fortran/src/CMakeLists.txt

 

if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)

  file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared")

  if (MSVC_IDE)

    set (MODSH_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${CMAKE_INSTALL_CONFIG_NAME}")

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

 endif ()

endif ()

if (MSVC_IDE)

  set (MOD_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${CMAKE_INSTALL_CONFIG_NAME}")

else ()

  set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)

endif ()

 

 

If you will notice the “\” in front of the $ which escapes that character effectively making ${CMAKE_INSTALL_CONFIG_NAME} just another string instead of an actual variable. We need this because the install rules are NOT evaluated at CMake time but at Build/Install time. With the escape in there that variable is passed into the actual cmake_install.cmake file that gets generated and run at Install time. In that file the escape character will no longer be present and it becomes an actual cmake variable that gets properly evaluated in that cmake file. This is needed for those generators like Visual Studio that do NOT have the notion of “CMAKE_BUILD_TYPE” like Ninja, JOM, NMake Makefiles do. If a developer is using one of those generators then the “else()” logic works just fine. I hope that was a reasonable explanation. I only tested on my configuration against the 1.8.20 git tag. I did look up the latest and the same code is in the 1.10.x codes.

 

--

Mike Jackson

BlueQuartz Software

[e]: [hidden email]

 

 

From: Hdf-forum <[hidden email]> on behalf of Elena Pourmal <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Sunday, January 7, 2018 at 5:22 PM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

 

Hi Mike and All,

 

Happy New Year!

 

HDF5 repository is https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse. You may also send the patch to [hidden email].

 

We will discuss the problem tomorrow during our developers meeting.

 

Thank you!

 

Elena

 

 

 

On Jan 7, 2018, at 2:58 PM, Michael Jackson <[hidden email]> wrote:

 

I’m having an issue configuring HDF5 1.8.19 and 1.8.20. My configuration environment is:

+ Visual Studio 14 2015 Win64

+ Intel Visual Fortran 17

+ CMake 3.8.x

+ NMake Makefiles

 

When I try the install the install script will complain that it cannot find a few files. After some debugging through the CMake code I have determined that the issue is in places like the hl/fortran/src/CMakeLists.txt

 

  if (WIN32)

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

 

That “WIN32” logic assumes a Visual Studio build. When using NMake (or most likely anything OTHER than Visual Studio) the trailing /${CMAKE_BUILD_TYPE} folder will NOT be present. The fix is to do:

 

  if (MSVC_IDE)

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

 

 

Which will ONLY use that subfolder logic for Visual Studio builds. Where is the Git repository for HDF5? I can get a patch together and submit a pull request with the full fixes. I have not had the time to try out the 1.10.x sources so I do NOT know if this was found and fixed for those releases.

 

Thanks

-- 

Michael A. Jackson                 400 S. Pioneer Blvd
Owner, President                   Springboro, Ohio 45066
BlueQuartz Software, LLC           EMail: [hidden email]
Voice: 937-790-1601                Web: http://www.bluequartz.net
Fax: 937-746-0783

 

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: 
https://twitter.com/hdf5

 

_______________________________________________ Hdf-forum is for HDF software users discussion. [hidden email] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Re: Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

Christian Oyarzun

This was previous reported in HDFFV-10296. Mike’s patch is more elegant as it uses the MSVC_IDE variable instead of CMAKE_GENERATOR and uses the escape character described in his email.

It would also be nice if HDFFV-10334 (fix to building static Fortran libraries on Windows with CMake 2.9 or greater) since both relate to Fortran CMAKE issues on Windows.

 

Thanks,

Christian Oyarzun

 

From: Hdf-forum <[hidden email]> on behalf of Michael Jackson <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Sunday, January 7, 2018 at 9:13 PM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

 

These changes seem to work, at least on my Windows 10x64, Visual Studio 2015 configuration. I tested with Visual Fortran 17. I have Visual Fortran 18 at my disposal also but I have not tried it yet.

 

In fortran/src/CMakeLists.txt file:

 

if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)

  file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared")

  if (MSVC_IDE)

    set (MODSH_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${CMAKE_INSTALL_CONFIG_NAME}")

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

endif ()

if (MSVC_IDE)

  set (MOD_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${CMAKE_INSTALL_CONFIG_NAME}")

else ()

  set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)

endif ()

 

and in hl/fortran/src/CMakeLists.txt

 

if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)

  file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared")

  if (MSVC_IDE)

    set (MODSH_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${CMAKE_INSTALL_CONFIG_NAME}")

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

 endif ()

endif ()

if (MSVC_IDE)

  set (MOD_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${CMAKE_INSTALL_CONFIG_NAME}")

else ()

  set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)

endif ()

 

 

If you will notice the “\” in front of the $ which escapes that character effectively making ${CMAKE_INSTALL_CONFIG_NAME} just another string instead of an actual variable. We need this because the install rules are NOT evaluated at CMake time but at Build/Install time. With the escape in there that variable is passed into the actual cmake_install.cmake file that gets generated and run at Install time. In that file the escape character will no longer be present and it becomes an actual cmake variable that gets properly evaluated in that cmake file. This is needed for those generators like Visual Studio that do NOT have the notion of “CMAKE_BUILD_TYPE” like Ninja, JOM, NMake Makefiles do. If a developer is using one of those generators then the “else()” logic works just fine. I hope that was a reasonable explanation. I only tested on my configuration against the 1.8.20 git tag. I did look up the latest and the same code is in the 1.10.x codes.

 

--

Mike Jackson

BlueQuartz Software

[e]: [hidden email]

 

 

From: Hdf-forum <[hidden email]> on behalf of Elena Pourmal <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Sunday, January 7, 2018 at 5:22 PM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

 

Hi Mike and All,

 

Happy New Year!

 

HDF5 repository is https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse. You may also send the patch to [hidden email].

 

We will discuss the problem tomorrow during our developers meeting.

 

Thank you!

 

Elena

 

 

 

On Jan 7, 2018, at 2:58 PM, Michael Jackson <[hidden email]> wrote:

 

I’m having an issue configuring HDF5 1.8.19 and 1.8.20. My configuration environment is:

+ Visual Studio 14 2015 Win64

+ Intel Visual Fortran 17

+ CMake 3.8.x

+ NMake Makefiles

 

When I try the install the install script will complain that it cannot find a few files. After some debugging through the CMake code I have determined that the issue is in places like the hl/fortran/src/CMakeLists.txt

 

  if (WIN32)

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

 

That “WIN32” logic assumes a Visual Studio build. When using NMake (or most likely anything OTHER than Visual Studio) the trailing /${CMAKE_BUILD_TYPE} folder will NOT be present. The fix is to do:

 

  if (MSVC_IDE)

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

 

 

Which will ONLY use that subfolder logic for Visual Studio builds. Where is the Git repository for HDF5? I can get a patch together and submit a pull request with the full fixes. I have not had the time to try out the 1.10.x sources so I do NOT know if this was found and fixed for those releases.

 

Thanks

-- 

Michael A. Jackson                 400 S. Pioneer Blvd
Owner, President                   Springboro, Ohio 45066
BlueQuartz Software, LLC           EMail: 
[hidden email]
Voice: 937-790-1601                Web: 
http://www.bluequartz.net
Fax: 937-746-0783

 

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: 
https://twitter.com/hdf5

 

_______________________________________________ Hdf-forum is for HDF software users discussion. [hidden email] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5




The information contained in this email message, including any attachments, contains or may contain proprietary and confidential information intended only for the addressee. It is furnished with the understanding that it is for the sole use of the addressee and may only be used for the purposes for which it has been delivered by Studsvik or its designee. The information contained herein shall not be copied, reproduced or transmitted to any other parties, nor shall it be used for any other purpose, without prior written consent of Studsvik. If you have received this email in error, please return it to the sender and destroy or otherwise permanently delete the copy received.

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Re: Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

Michael Jackson

I can't remember, is the HDF5 bug tracker publicly accessible?

--

Michael Jackson | Owner, President

      BlueQuartz Software

[e] [hidden email]

[w] www.bluequartz.net

 

From: Hdf-forum <[hidden email]> on behalf of Christian Oyarzun <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Monday, January 8, 2018 at 8:23 AM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

 

This was previous reported in HDFFV-10296. Mike’s patch is more elegant as it uses the MSVC_IDE variable instead of CMAKE_GENERATOR and uses the escape character described in his email.

It would also be nice if HDFFV-10334 (fix to building static Fortran libraries on Windows with CMake 2.9 or greater) since both relate to Fortran CMAKE issues on Windows.

 

Thanks,

Christian Oyarzun

 

From: Hdf-forum <[hidden email]> on behalf of Michael Jackson <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Sunday, January 7, 2018 at 9:13 PM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

 

These changes seem to work, at least on my Windows 10x64, Visual Studio 2015 configuration. I tested with Visual Fortran 17. I have Visual Fortran 18 at my disposal also but I have not tried it yet.

 

In fortran/src/CMakeLists.txt file:

 

if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)

  file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared")

  if (MSVC_IDE)

    set (MODSH_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${CMAKE_INSTALL_CONFIG_NAME}")

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

endif ()

if (MSVC_IDE)

  set (MOD_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${CMAKE_INSTALL_CONFIG_NAME}")

else ()

  set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)

endif ()

 

and in hl/fortran/src/CMakeLists.txt

 

if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)

  file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared")

  if (MSVC_IDE)

    set (MODSH_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${CMAKE_INSTALL_CONFIG_NAME}")

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

 endif ()

endif ()

if (MSVC_IDE)

  set (MOD_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${CMAKE_INSTALL_CONFIG_NAME}")

else ()

  set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)

endif ()

 

 

If you will notice the “\” in front of the $ which escapes that character effectively making ${CMAKE_INSTALL_CONFIG_NAME} just another string instead of an actual variable. We need this because the install rules are NOT evaluated at CMake time but at Build/Install time. With the escape in there that variable is passed into the actual cmake_install.cmake file that gets generated and run at Install time. In that file the escape character will no longer be present and it becomes an actual cmake variable that gets properly evaluated in that cmake file. This is needed for those generators like Visual Studio that do NOT have the notion of “CMAKE_BUILD_TYPE” like Ninja, JOM, NMake Makefiles do. If a developer is using one of those generators then the “else()” logic works just fine. I hope that was a reasonable explanation. I only tested on my configuration against the 1.8.20 git tag. I did look up the latest and the same code is in the 1.10.x codes.

 

--

Mike Jackson

BlueQuartz Software

[e]: [hidden email]

 

 

From: Hdf-forum <[hidden email]> on behalf of Elena Pourmal <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Sunday, January 7, 2018 at 5:22 PM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

 

Hi Mike and All,

 

Happy New Year!

 

HDF5 repository is https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse. You may also send the patch to [hidden email].

 

We will discuss the problem tomorrow during our developers meeting.

 

Thank you!

 

Elena

 

 

 

On Jan 7, 2018, at 2:58 PM, Michael Jackson <[hidden email]> wrote:

 

I’m having an issue configuring HDF5 1.8.19 and 1.8.20. My configuration environment is:

+ Visual Studio 14 2015 Win64

+ Intel Visual Fortran 17

+ CMake 3.8.x

+ NMake Makefiles

 

When I try the install the install script will complain that it cannot find a few files. After some debugging through the CMake code I have determined that the issue is in places like the hl/fortran/src/CMakeLists.txt

 

  if (WIN32)

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

 

That “WIN32” logic assumes a Visual Studio build. When using NMake (or most likely anything OTHER than Visual Studio) the trailing /${CMAKE_BUILD_TYPE} folder will NOT be present. The fix is to do:

 

  if (MSVC_IDE)

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

 

 

Which will ONLY use that subfolder logic for Visual Studio builds. Where is the Git repository for HDF5? I can get a patch together and submit a pull request with the full fixes. I have not had the time to try out the 1.10.x sources so I do NOT know if this was found and fixed for those releases.

 

Thanks

-- 

Michael A. Jackson                 400 S. Pioneer Blvd
Owner, President                   Springboro, Ohio 45066
BlueQuartz Software, LLC           EMail: [hidden email]
Voice: 937-790-1601                Web: http://www.bluequartz.net
Fax: 937-746-0783

 

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: 
https://twitter.com/hdf5

 

_______________________________________________ Hdf-forum is for HDF software users discussion. [hidden email] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5

 



The information contained in this email message, including any attachments, contains or may contain proprietary and confidential information intended only for the addressee. It is furnished with the understanding that it is for the sole use of the addressee and may only be used for the purposes for which it has been delivered by Studsvik or its designee. The information contained herein shall not be copied, reproduced or transmitted to any other parties, nor shall it be used for any other purpose, without prior written consent of Studsvik. If you have received this email in error, please return it to the sender and destroy or otherwise permanently delete the copy received.
_______________________________________________ Hdf-forum is for HDF software users discussion. [hidden email] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Re: Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

Christian Oyarzun

Mike,

 

It is not currently open to the public, but I believe it will be in the future via a link on https://confluence.hdfgroup.org/display/support

 

 

Ooops! I should clarify that what you see now under "E-mail Support" will go 

away. It will be replaced with JIRA Helpdesk, from where you can access your 

issues. Right now we do not use JIRA Helpdesk (though we use JIRA for helpdesk

issues).

 

-Barbara

 

 

On Tue, 5 Dec 2017, [hidden email] wrote:

 

Hi Christian,

 

Yes, we definitely should add the md5 files to the table!

 

.. and yes, JIRA access will be open to the community. Once you are logged 

in,

you can access your issues from "E-mail Support". We may change one of the

big buttons on the main page to clarify how to use it (for example, the 

HDF-EOS or

Licenses button).

 

Thank you for your input! :)

 

-Barbara

 

 

From: Hdf-forum <[hidden email]> on behalf of Michael Jackson <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Monday, January 8, 2018 at 8:35 AM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

 

I can't remember, is the HDF5 bug tracker publicly accessible?

--

Michael Jackson | Owner, President

      BlueQuartz Software

[e] [hidden email]

[w] www.bluequartz.net

 

From: Hdf-forum <[hidden email]> on behalf of Christian Oyarzun <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Monday, January 8, 2018 at 8:23 AM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

 

This was previous reported in HDFFV-10296. Mike’s patch is more elegant as it uses the MSVC_IDE variable instead of CMAKE_GENERATOR and uses the escape character described in his email.

It would also be nice if HDFFV-10334 (fix to building static Fortran libraries on Windows with CMake 2.9 or greater) since both relate to Fortran CMAKE issues on Windows.

 

Thanks,

Christian Oyarzun

 

From: Hdf-forum <[hidden email]> on behalf of Michael Jackson <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Sunday, January 7, 2018 at 9:13 PM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

 

These changes seem to work, at least on my Windows 10x64, Visual Studio 2015 configuration. I tested with Visual Fortran 17. I have Visual Fortran 18 at my disposal also but I have not tried it yet.

 

In fortran/src/CMakeLists.txt file:

 

if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)

  file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared")

  if (MSVC_IDE)

    set (MODSH_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${CMAKE_INSTALL_CONFIG_NAME}")

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

endif ()

if (MSVC_IDE)

  set (MOD_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${CMAKE_INSTALL_CONFIG_NAME}")

else ()

  set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)

endif ()

 

and in hl/fortran/src/CMakeLists.txt

 

if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)

  file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared")

  if (MSVC_IDE)

    set (MODSH_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${CMAKE_INSTALL_CONFIG_NAME}")

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

 endif ()

endif ()

if (MSVC_IDE)

  set (MOD_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${CMAKE_INSTALL_CONFIG_NAME}")

else ()

  set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)

endif ()

 

 

If you will notice the “\” in front of the $ which escapes that character effectively making ${CMAKE_INSTALL_CONFIG_NAME} just another string instead of an actual variable. We need this because the install rules are NOT evaluated at CMake time but at Build/Install time. With the escape in there that variable is passed into the actual cmake_install.cmake file that gets generated and run at Install time. In that file the escape character will no longer be present and it becomes an actual cmake variable that gets properly evaluated in that cmake file. This is needed for those generators like Visual Studio that do NOT have the notion of “CMAKE_BUILD_TYPE” like Ninja, JOM, NMake Makefiles do. If a developer is using one of those generators then the “else()” logic works just fine. I hope that was a reasonable explanation. I only tested on my configuration against the 1.8.20 git tag. I did look up the latest and the same code is in the 1.10.x codes.

 

--

Mike Jackson

BlueQuartz Software

[e]: [hidden email]

 

 

From: Hdf-forum <[hidden email]> on behalf of Elena Pourmal <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Sunday, January 7, 2018 at 5:22 PM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

 

Hi Mike and All,

 

Happy New Year!

 

HDF5 repository is https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse. You may also send the patch to [hidden email].

 

We will discuss the problem tomorrow during our developers meeting.

 

Thank you!

 

Elena

 

 

 

On Jan 7, 2018, at 2:58 PM, Michael Jackson <[hidden email]> wrote:

 

I’m having an issue configuring HDF5 1.8.19 and 1.8.20. My configuration environment is:

+ Visual Studio 14 2015 Win64

+ Intel Visual Fortran 17

+ CMake 3.8.x

+ NMake Makefiles

 

When I try the install the install script will complain that it cannot find a few files. After some debugging through the CMake code I have determined that the issue is in places like the hl/fortran/src/CMakeLists.txt

 

  if (WIN32)

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

 

That “WIN32” logic assumes a Visual Studio build. When using NMake (or most likely anything OTHER than Visual Studio) the trailing /${CMAKE_BUILD_TYPE} folder will NOT be present. The fix is to do:

 

  if (MSVC_IDE)

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})

  else ()

    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)

  endif ()

 

 

Which will ONLY use that subfolder logic for Visual Studio builds. Where is the Git repository for HDF5? I can get a patch together and submit a pull request with the full fixes. I have not had the time to try out the 1.10.x sources so I do NOT know if this was found and fixed for those releases.

 

Thanks

-- 

Michael A. Jackson                 400 S. Pioneer Blvd
Owner, President                   Springboro, Ohio 45066
BlueQuartz Software, LLC           EMail: 
[hidden email]
Voice: 937-790-1601                Web: 
http://www.bluequartz.net
Fax: 937-746-0783

 

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: 
https://twitter.com/hdf5

 

_______________________________________________ Hdf-forum is for HDF software users discussion. [hidden email] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5

 



The information contained in this email message, including any attachments, contains or may contain proprietary and confidential information intended only for the addressee. It is furnished with the understanding that it is for the sole use of the addressee and may only be used for the purposes for which it has been delivered by Studsvik or its designee. The information contained herein shall not be copied, reproduced or transmitted to any other parties, nor shall it be used for any other purpose, without prior written consent of Studsvik. If you have received this email in error, please return it to the sender and destroy or otherwise permanently delete the copy received.
_______________________________________________ Hdf-forum is for HDF software users discussion. [hidden email] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5




The information contained in this email message, including any attachments, contains or may contain proprietary and confidential information intended only for the addressee. It is furnished with the understanding that it is for the sole use of the addressee and may only be used for the purposes for which it has been delivered by Studsvik or its designee. The information contained herein shall not be copied, reproduced or transmitted to any other parties, nor shall it be used for any other purpose, without prior written consent of Studsvik. If you have received this email in error, please return it to the sender and destroy or otherwise permanently delete the copy received.

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Moving to CMake 3.10.* : Re: Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

Elena Pourmal
In reply to this post by Michael Jackson
All.

This year The HDF Group will be moving HDF software from CMake 3.2.* to CMake 3.10.1. 

The reason is we are having too many issues reported with the current CMake version required to build HDF (HDF5, HDF4, HDFView, misc. tools, etc.) 

Originally CMake was supported only for Windows, but now we have more and more users using CMake for building parallel, and Fortran configurations on non-Windows platforms. I.e., we need to come up with the solution that covers not only Windows and basic configurations of HDF. Said this we are welcoming any patches that will help us to finish the task.

We will keep you updated on our progress, and as usual, we will have updated software available for testing before the releases.

Thank you!

Elena 
On Jan 7, 2018, at 7:05 PM, Michael Jackson <[hidden email]> wrote:

Sorry, but I jumped too soon on sending that email. There is still an issue when trying to install with a Visual Studio built HDF5. Once I actually work it out I’ll post to the list.
 
--
Mike Jackson
BlueQuartz Software
 
 
From: Hdf-forum <[hidden email]> on behalf of Elena Pourmal <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Sunday, January 7, 2018 at 5:22 PM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)
 
Hi Mike and All, 
 
Happy New Year!
 
HDF5 repository is https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse. You may also send the patch to [hidden email].
 
We will discuss the problem tomorrow during our developers meeting.
 
Thank you!
 
Elena
 
 
 
On Jan 7, 2018, at 2:58 PM, Michael Jackson <[hidden email]> wrote: 
 
I’m having an issue configuring HDF5 1.8.19 and 1.8.20. My configuration environment is:
+ Visual Studio 14 2015 Win64
+ Intel Visual Fortran 17
+ CMake 3.8.x
+ NMake Makefiles
 
When I try the install the install script will complain that it cannot find a few files. After some debugging through the CMake code I have determined that the issue is in places like the hl/fortran/src/CMakeLists.txt
 
  if (WIN32)
    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})
  else ()
    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
  endif ()
 
That “WIN32” logic assumes a Visual Studio build. When using NMake (or most likely anything OTHER than Visual Studio) the trailing /${CMAKE_BUILD_TYPE} folder will NOT be present. The fix is to do:
 
  if (MSVC_IDE)
    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})
  else ()
    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
  endif ()
 
 
Which will ONLY use that subfolder logic for Visual Studio builds. Where is the Git repository for HDF5? I can get a patch together and submit a pull request with the full fixes. I have not had the time to try out the 1.10.x sources so I do NOT know if this was found and fixed for those releases.
 
Thanks
-- 
Michael A. Jackson                 400 S. Pioneer Blvd
Owner, President                   Springboro, Ohio 45066
BlueQuartz Software, LLC           EMail: [hidden email]
Voice: 937-790-1601                Web: http://www.bluequartz.net
Fax: 937-746-0783
 
_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: 
https://twitter.com/hdf5
 
_______________________________________________ Hdf-forum is for HDF software users discussion. [hidden email]http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5
_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Re: Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)

Elena Pourmal
In reply to this post by Christian Oyarzun
All,

Just to confirm - This is our goal for the year to make HDF JIRA projects open to public. 

Elena
On Jan 8, 2018, at 7:46 AM, Christian Oyarzun <[hidden email]> wrote:

Mike,
 
It is not currently open to the public, but I believe it will be in the future via a link on https://confluence.hdfgroup.org/display/support
 
 
Ooops! I should clarify that what you see now under "E-mail Support" will go 
away. It will be replaced with JIRA Helpdesk, from where you can access your 
issues. Right now we do not use JIRA Helpdesk (though we use JIRA for helpdesk
issues).
 
-Barbara
 
 
On Tue, 5 Dec 2017, [hidden email] wrote:
 
Hi Christian,
 
Yes, we definitely should add the md5 files to the table!
 
.. and yes, JIRA access will be open to the community. Once you are logged 
in,
you can access your issues from "E-mail Support". We may change one of the
big buttons on the main page to clarify how to use it (for example, the 
HDF-EOS or
Licenses button).
 
Thank you for your input! :)
 
-Barbara
 
 
From: Hdf-forum <[hidden email]> on behalf of Michael Jackson <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Monday, January 8, 2018 at 8:35 AM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)
 
--
Michael Jackson | Owner, President
      BlueQuartz Software
 
From: Hdf-forum <[hidden email]> on behalf of Christian Oyarzun <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Monday, January 8, 2018 at 8:23 AM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)
 
This was previous reported in HDFFV-10296. Mike’s patch is more elegant as it uses the MSVC_IDE variable instead of CMAKE_GENERATOR and uses the escape character described in his email.
It would also be nice if HDFFV-10334 (fix to building static Fortran libraries on Windows with CMake 2.9 or greater) since both relate to Fortran CMAKE issues on Windows.
 
Thanks,
Christian Oyarzun
 
From: Hdf-forum <[hidden email]> on behalf of Michael Jackson <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Sunday, January 7, 2018 at 9:13 PM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)
 
These changes seem to work, at least on my Windows 10x64, Visual Studio 2015 configuration. I tested with Visual Fortran 17. I have Visual Fortran 18 at my disposal also but I have not tried it yet.
 
In fortran/src/CMakeLists.txt file:
 
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
  file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared")
  if (MSVC_IDE)
    set (MODSH_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${CMAKE_INSTALL_CONFIG_NAME}")
  else ()
    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
  endif ()
endif ()
if (MSVC_IDE)
  set (MOD_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${CMAKE_INSTALL_CONFIG_NAME}")
else ()
  set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
endif ()
 
and in hl/fortran/src/CMakeLists.txt
 
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
  file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared")
  if (MSVC_IDE)
    set (MODSH_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${CMAKE_INSTALL_CONFIG_NAME}")
  else ()
    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
 endif ()
endif ()
if (MSVC_IDE)
  set (MOD_BUILD_DIR "${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${CMAKE_INSTALL_CONFIG_NAME}")
else ()
  set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
endif ()
 
 
If you will notice the “\” in front of the $ which escapes that character effectively making ${CMAKE_INSTALL_CONFIG_NAME} just another string instead of an actual variable. We need this because the install rules are NOT evaluated at CMake time but at Build/Install time. With the escape in there that variable is passed into the actual cmake_install.cmake file that gets generated and run at Install time. In that file the escape character will no longer be present and it becomes an actual cmake variable that gets properly evaluated in that cmake file. This is needed for those generators like Visual Studio that do NOT have the notion of “CMAKE_BUILD_TYPE” like Ninja, JOM, NMake Makefiles do. If a developer is using one of those generators then the “else()” logic works just fine. I hope that was a reasonable explanation. I only tested on my configuration against the 1.8.20 git tag. I did look up the latest and the same code is in the 1.10.x codes.
 
--
Mike Jackson
BlueQuartz Software
 
 
From: Hdf-forum <[hidden email]> on behalf of Elena Pourmal <[hidden email]>
Reply-To: HDF Users Discussion List <[hidden email]>
Date: Sunday, January 7, 2018 at 5:22 PM
To: HDF Users Discussion List <[hidden email]>
Subject: Re: [Hdf-forum] Issues with INSTALL using NMake Makefiles & CMake (1.8.19, 1.8.20)
 
Hi Mike and All,
 
Happy New Year!
 
HDF5 repository is https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse. You may also send the patch to [hidden email].
 
We will discuss the problem tomorrow during our developers meeting.
 
Thank you!
 
Elena
 
 
 
On Jan 7, 2018, at 2:58 PM, Michael Jackson <[hidden email]> wrote: 
 
I’m having an issue configuring HDF5 1.8.19 and 1.8.20. My configuration environment is:
+ Visual Studio 14 2015 Win64
+ Intel Visual Fortran 17
+ CMake 3.8.x
+ NMake Makefiles
 
When I try the install the install script will complain that it cannot find a few files. After some debugging through the CMake code I have determined that the issue is in places like the hl/fortran/src/CMakeLists.txt
 
  if (WIN32)
    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})
  else ()
    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
  endif ()
 
That “WIN32” logic assumes a Visual Studio build. When using NMake (or most likely anything OTHER than Visual Studio) the trailing /${CMAKE_BUILD_TYPE} folder will NOT be present. The fix is to do:
 
  if (MSVC_IDE)
    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})
  else ()
    set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
  endif ()
 
 
Which will ONLY use that subfolder logic for Visual Studio builds. Where is the Git repository for HDF5? I can get a patch together and submit a pull request with the full fixes. I have not had the time to try out the 1.10.x sources so I do NOT know if this was found and fixed for those releases.
 
Thanks
-- 
Michael A. Jackson                 400 S. Pioneer Blvd
Owner, President                   Springboro, Ohio 45066
BlueQuartz Software, LLC           EMail: 
[hidden email]
Voice: 937-790-1601                Web: 
http://www.bluequartz.net
Fax: 937-746-0783
 
_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: 
https://twitter.com/hdf5
 
_______________________________________________ Hdf-forum is for HDF software users discussion. [hidden email]http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5
 


The information contained in this email message, including any attachments, contains or may contain proprietary and confidential information intended only for the addressee. It is furnished with the understanding that it is for the sole use of the addressee and may only be used for the purposes for which it has been delivered by Studsvik or its designee. The information contained herein shall not be copied, reproduced or transmitted to any other parties, nor shall it be used for any other purpose, without prior written consent of Studsvik. If you have received this email in error, please return it to the sender and destroy or otherwise permanently delete the copy received.
_______________________________________________ Hdf-forum is for HDF software users discussion. [hidden email]http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5



The information contained in this email message, including any attachments, contains or may contain proprietary and confidential information intended only for the addressee. It is furnished with the understanding that it is for the sole use of the addressee and may only be used for the purposes for which it has been delivered by Studsvik or its designee. The information contained herein shall not be copied, reproduced or transmitted to any other parties, nor shall it be used for any other purpose, without prior written consent of Studsvik. If you have received this email in error, please return it to the sender and destroy or otherwise permanently delete the copy received.
_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5