From 405b0c62f8d7752d55e677b6b2868619bccade78 Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Fri, 13 Oct 2023 23:41:17 -0500 Subject: Correct fortran CMake generator expressions (#3670) --- fortran/examples/CMakeLists.txt | 18 ++++++------ fortran/src/CMakeLists.txt | 24 ++++++++-------- fortran/test/CMakeLists.txt | 58 +++++++++++++++++++------------------- fortran/testpar/CMakeLists.txt | 18 ++++++------ hl/fortran/examples/CMakeLists.txt | 6 ++-- hl/fortran/src/CMakeLists.txt | 22 +++++++-------- hl/fortran/test/CMakeLists.txt | 6 ++-- 7 files changed, 76 insertions(+), 76 deletions(-) diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 6cbe8d6..ff3f299 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -38,9 +38,9 @@ foreach (example ${examples}) target_compile_options(f90_ex_${example} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}" - $<$:${WIN_COMPILE_FLAGS}>) -# set_property(TARGET f90_ex_${example} APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET f90_ex_${example} APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) + "$<$:${WIN_COMPILE_FLAGS}>") +# set_property(TARGET f90_ex_${example} APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET f90_ex_${example} APPEND PROPERTY LINK_FLAGS "$<$:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET f90_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() @@ -82,9 +82,9 @@ foreach (example ${F2003_examples}) target_compile_options(f03_ex_${example} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}" - $<$:${WIN_COMPILE_FLAGS}>) -# set_property(TARGET f03_ex_${example} APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET f03_ex_${example} APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) + "$<$:${WIN_COMPILE_FLAGS}>") +# set_property(TARGET f03_ex_${example} APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET f03_ex_${example} APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET f03_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() @@ -126,9 +126,9 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_compile_options(f90_ex_ph5example PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}" - $<$:${WIN_COMPILE_FLAGS}>) -# set_property(TARGET f90_ex_ph5example APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET f90_ex_ph5example APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) + "$<$:${WIN_COMPILE_FLAGS}>") +# set_property(TARGET f90_ex_ph5example APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET f90_ex_ph5example APPEND PROPERTY LINK_FLAGS "$<$:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET f90_ex_ph5example PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 977d036..199a0c8 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -48,12 +48,12 @@ set (Fortran_COMPILER_ID CMAKE_Fortran_COMPILER_ID) add_executable (H5_buildiface ${HDF5_F90_SRC_SOURCE_DIR}/H5_buildiface.F90) target_include_directories (H5_buildiface PRIVATE "${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR}") #if (BUILD_SHARED_LIBS) -# target_compile_definitions(H5_buildiface PRIVATE $<$:/MT>) +# target_compile_definitions(H5_buildiface PRIVATE "$<$:/MT>") #endif () if(MSVC) set_property(TARGET H5_buildiface PROPERTY COMPILE_FLAGS "/MT") endif() -#set_property(TARGET H5_buildiface APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) +#set_property(TARGET H5_buildiface APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") if(MSVC) set_property(TARGET H5_buildiface PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE") endif() @@ -332,8 +332,8 @@ if (BUILD_STATIC_LIBS) target_compile_options(${HDF5_F90_LIB_TARGET} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}") target_compile_definitions(${HDF5_F90_LIB_TARGET} PRIVATE - $<$:HDF5F90_WINDOWS> - $<$:${WIN_COMPILE_FLAGS}> + "$<$:HDF5F90_WINDOWS"> + "$<$:${WIN_COMPILE_FLAGS}>" ) target_link_libraries (${HDF5_F90_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET} @@ -341,8 +341,8 @@ if (BUILD_STATIC_LIBS) ${LINK_Fortran_LIBS} "$<$:${MPI_Fortran_LIBRARIES}>" ) -# set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) +# set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET ${HDF5_F90_LIB_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() @@ -367,17 +367,17 @@ if (BUILD_SHARED_LIBS) target_compile_definitions(${HDF5_F90_LIBSH_TARGET} PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" PRIVATE - $<$:BUILD_HDF5_DLL;HDF5F90_WINDOWS> - $<$:${WIN_COMPILE_FLAGS}> + "$<$:BUILD_HDF5_DLL;HDF5F90_WINDOWS>" + "$<$:${WIN_COMPILE_FLAGS}>" ) target_link_libraries (${HDF5_F90_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS} "$<$:${MPI_Fortran_LIBRARIES}>" ) -# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) -# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$:"-DLL">) -# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$:"-DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def">) +# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:${WIN_LINK_FLAGS}>") +# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:-DLL>") +# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:-DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def>") if(MSVC) set_property(TARGET ${HDF5_F90_LIBSH_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS} /DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") endif() diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index ff27943..c9dc48f 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -13,14 +13,14 @@ target_include_directories (H5_test_buildiface ) #if (BUILD_SHARED_LIBS) # target_compile_definitions(H5_test_buildiface -# PRIVATE $<$:/MT> +# PRIVATE "$<$:/MT>" # ) #endif () if(MSVC) set_property(TARGET H5_test_buildiface PROPERTY COMPILE_FLAGS "/MT") endif() #set_property(TARGET H5_test_buildiface APPEND PROPERTY -# LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE"> +# LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>" #) if(MSVC) set_property(TARGET H5_test_buildiface PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE") @@ -145,12 +145,12 @@ if (NOT BUILD_SHARED_LIBS) target_compile_options(${HDF5_F90_TEST_LIB_TARGET} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}") target_compile_definitions(${HDF5_F90_TEST_LIB_TARGET} PRIVATE - $<$:HDF5F90_WINDOWS> - $<$:${WIN_COMPILE_FLAGS}> + "$<$:HDF5F90_WINDOWS>" + "$<$:${WIN_COMPILE_FLAGS}>" ) target_link_libraries (${HDF5_F90_TEST_LIB_TARGET} PUBLIC ${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET}) -# set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) +# set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() @@ -171,13 +171,13 @@ else () target_compile_definitions(${HDF5_F90_TEST_LIBSH_TARGET} PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" PRIVATE - $<$:BUILD_HDF5_TEST_DLL;HDF5F90_WINDOWS> - $<$:${WIN_COMPILE_FLAGS}> + "$<$:BUILD_HDF5_TEST_DLL;HDF5F90_WINDOWS>" + "$<$:${WIN_COMPILE_FLAGS}>" ) target_link_libraries (${HDF5_F90_TEST_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) -# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) -# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$:"-DLL">) +# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:${WIN_LINK_FLAGS}>") +# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:-DLL>") if(MSVC) set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS} -DLL") endif() @@ -215,10 +215,10 @@ add_executable (testhdf5_fortran target_compile_options(testhdf5_fortran PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}" - $<$:${WIN_COMPILE_FLAGS}> + "$<$:${WIN_COMPILE_FLAGS}>" ) -#set_property(TARGET testhdf5_fortran APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -#set_property(TARGET testhdf5_fortran APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) +#set_property(TARGET testhdf5_fortran APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +#set_property(TARGET testhdf5_fortran APPEND PROPERTY LINK_FLAGS "$<$:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET testhdf5_fortran PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() @@ -254,10 +254,10 @@ add_executable (testhdf5_fortran_1_8 target_compile_options(testhdf5_fortran_1_8 PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}" - $<$:${WIN_COMPILE_FLAGS}> + "$<$:${WIN_COMPILE_FLAGS}>" ) -#set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -#set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) +#set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +#set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY LINK_FLAGS "$<$:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET testhdf5_fortran_1_8 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() @@ -294,10 +294,10 @@ add_executable (fortranlib_test_F03 target_compile_options(fortranlib_test_F03 PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}" - $<$:${WIN_COMPILE_FLAGS}> + "$<$:${WIN_COMPILE_FLAGS}>" ) -#set_property(TARGET fortranlib_test_F03 APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -#set_property(TARGET fortranlib_test_F03 APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) +#set_property(TARGET fortranlib_test_F03 APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +#set_property(TARGET fortranlib_test_F03 APPEND PROPERTY LINK_FLAGS "$<$:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET fortranlib_test_F03 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() @@ -326,10 +326,10 @@ add_executable (fflush1 fflush1.F90) target_compile_options(fflush1 PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}" - $<$:${WIN_COMPILE_FLAGS}> + "$<$:${WIN_COMPILE_FLAGS}>" ) -#set_property(TARGET fflush1 APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -#set_property(TARGET fflush1 APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) +#set_property(TARGET fflush1 APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +#set_property(TARGET fflush1 APPEND PROPERTY LINK_FLAGS "$<$:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET fflush1 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() @@ -358,10 +358,10 @@ add_executable (fflush2 fflush2.F90) target_compile_options (fflush2 PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}" - $<$:${WIN_COMPILE_FLAGS}> + "$<$:${WIN_COMPILE_FLAGS}>" ) -#set_property(TARGET fflush2 APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -#set_property(TARGET fflush2 APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) +#set_property(TARGET fflush2 APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +#set_property(TARGET fflush2 APPEND PROPERTY LINK_FLAGS "$<$:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET fflush2 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() @@ -390,10 +390,10 @@ add_executable (vol_connector vol_connector.F90) target_compile_options(vol_connector PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}" - $<$:${WIN_COMPILE_FLAGS}> + "$<$:${WIN_COMPILE_FLAGS}>" ) -#set_property(TARGET vol_connector APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -#set_property(TARGET vol_connector APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) +#set_property(TARGET vol_connector APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +#set_property(TARGET vol_connector APPEND PROPERTY LINK_FLAGS "$<$:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET vol_connector PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index ca241f6..e8f0107 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -28,13 +28,13 @@ target_include_directories (parallel_test target_compile_options(parallel_test PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}" - $<$:${WIN_COMPILE_FLAGS}> + "$<$:${WIN_COMPILE_FLAGS}>" ) if (NOT BUILD_SHARED_LIBS) target_link_libraries (parallel_test PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_Fortran_LIBS} - $<$:"ws2_32.lib"> + "$<$:ws2_32.lib>" ) set_target_properties (parallel_test PROPERTIES FOLDER test/fortran @@ -45,7 +45,7 @@ else () target_link_libraries (parallel_test PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_Fortran_LIBS} - $<$:"ws2_32.lib"> + "$<$:ws2_32.lib>" ) set_target_properties (parallel_test PROPERTIES FOLDER test/fortran @@ -68,13 +68,13 @@ target_include_directories (subfiling_test target_compile_options(subfiling_test PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}" - $<$:${WIN_COMPILE_FLAGS}> + "$<$:${WIN_COMPILE_FLAGS}>" ) if (NOT BUILD_SHARED_LIBS) target_link_libraries (subfiling_test PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_Fortran_LIBS} - $<$:"ws2_32.lib"> + "$<$:ws2_32.lib>" ) set_target_properties (subfiling_test PROPERTIES FOLDER test/fortran @@ -85,7 +85,7 @@ else () target_link_libraries (subfiling_test PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_Fortran_LIBS} - $<$:"ws2_32.lib"> + "$<$:ws2_32.lib>" ) set_target_properties (subfiling_test PROPERTIES FOLDER test/fortran @@ -108,13 +108,13 @@ target_include_directories (async_test target_compile_options(async_test PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}" - $<$:${WIN_COMPILE_FLAGS}> + "$<$:${WIN_COMPILE_FLAGS}>" ) if (NOT BUILD_SHARED_LIBS) target_link_libraries (async_test PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_Fortran_LIBS} - $<$:"ws2_32.lib"> + "$<$:ws2_32.lib>" ) set_target_properties (async_test PROPERTIES FOLDER test/fortran @@ -125,7 +125,7 @@ else () target_link_libraries (async_test PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_Fortran_LIBS} - $<$:"ws2_32.lib"> + "$<$:ws2_32.lib>" ) set_target_properties (async_test PROPERTIES FOLDER test/fortran 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}" - $<$:${WIN_COMPILE_FLAGS}> + "$<$:${WIN_COMPILE_FLAGS}>" ) -# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) +# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY LINK_FLAGS "$<$:${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 $<$:"-SUBSYSTEM:CONSOLE"> +# LINK_FLAGS "$<$:-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 $<$:HDF5F90_WINDOWS> - PRIVATE $<$:${WIN_COMPILE_FLAGS}> + PUBLIC "$<$:HDF5F90_WINDOWS>" + PRIVATE "$<$:${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 $<$:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) +# set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:${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 - $<$:BUILD_HDF5_HL_DLL;HDF5F90_WINDOWS> - $<$:${WIN_COMPILE_FLAGS}> + "$<$:BUILD_HDF5_HL_DLL;HDF5F90_WINDOWS>" + "$<$:${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 $<$:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) -# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$:"-DLL">) -# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$:"-DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def">) +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:${WIN_LINK_FLAGS}>") +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:-DLL>") +# set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$:-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}" - $<$:${WIN_COMPILE_FLAGS}> + "$<$:${WIN_COMPILE_FLAGS}>" ) -# set_property(TARGET hl_f90_${file} APPEND PROPERTY LINK_FLAGS $<$:"-SUBSYSTEM:CONSOLE">) -# set_property(TARGET hl_f90_${file} APPEND PROPERTY LINK_FLAGS $<$:${WIN_LINK_FLAGS}>) +# set_property(TARGET hl_f90_${file} APPEND PROPERTY LINK_FLAGS "$<$:-SUBSYSTEM:CONSOLE>") +# set_property(TARGET hl_f90_${file} APPEND PROPERTY LINK_FLAGS "$<$:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET hl_f90_${file} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() -- cgit v0.12