diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-10-14 04:41:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-14 04:41:17 (GMT) |
commit | 405b0c62f8d7752d55e677b6b2868619bccade78 (patch) | |
tree | bbb534c24163531b59f282b7e77458a894ac67aa /hl | |
parent | ffc5fddeb105d2292d444993a3719be1f753f95b (diff) | |
download | hdf5-405b0c62f8d7752d55e677b6b2868619bccade78.zip hdf5-405b0c62f8d7752d55e677b6b2868619bccade78.tar.gz hdf5-405b0c62f8d7752d55e677b6b2868619bccade78.tar.bz2 |
Correct fortran CMake generator expressions (#3670)
Diffstat (limited to 'hl')
-rw-r--r-- | hl/fortran/examples/CMakeLists.txt | 6 | ||||
-rw-r--r-- | hl/fortran/src/CMakeLists.txt | 22 | ||||
-rw-r--r-- | hl/fortran/test/CMakeLists.txt | 6 |
3 files changed, 17 insertions, 17 deletions
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt index caa5e78..7afe5fc 100644 --- a/hl/fortran/examples/CMakeLists.txt +++ b/hl/fortran/examples/CMakeLists.txt @@ -11,10 +11,10 @@ foreach (example ${examples}) target_compile_options(hl_f90_ex_${example} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}" - $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}> + "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_COMPILE_FLAGS}>" ) -# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>) +# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET hl_f90_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index d9f0af2..ed469e5 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -23,7 +23,7 @@ if (WIN32 AND MSVC) endif () endif () #set_property(TARGET H5HL_buildiface APPEND PROPERTY -# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> +# LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:-SUBSYSTEM:CONSOLE>" #) if(MSVC) set_property(TARGET H5HL_buildiface PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE") @@ -178,12 +178,12 @@ if (BUILD_STATIC_LIBS) ) target_compile_options(${HDF5_HL_F90_LIB_TARGET} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}") target_compile_definitions(${HDF5_HL_F90_LIB_TARGET} - PUBLIC $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:HDF5F90_WINDOWS> - PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}> + PUBLIC "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:HDF5F90_WINDOWS>" + PRIVATE "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_COMPILE_FLAGS}>" ) target_link_libraries (${HDF5_HL_F90_LIB_TARGET} PUBLIC ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) -# set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>) +# set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() @@ -207,17 +207,17 @@ if (BUILD_SHARED_LIBS) target_compile_definitions(${HDF5_HL_F90_LIBSH_TARGET} PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" PRIVATE - $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:BUILD_HDF5_HL_DLL;HDF5F90_WINDOWS> - $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}> + "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:BUILD_HDF5_HL_DLL;HDF5F90_WINDOWS>" + "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_COMPILE_FLAGS}>" ) target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS} ) -# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>) -# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DLL">) -# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def">) +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_LINK_FLAGS}>") +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:-DLL>") +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:-DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def>") if(MSVC) set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS} -DLL -DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") endif() diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index f78e52e..2324812 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -16,10 +16,10 @@ macro (ADD_H5_FORTRAN_EXE file) target_compile_options(hl_f90_${file} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}" - $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}> + "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_COMPILE_FLAGS}>" ) -# set_property(TARGET hl_f90_${file} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET hl_f90_${file} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>) +# set_property(TARGET hl_f90_${file} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET hl_f90_${file} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET hl_f90_${file} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() |