HDFFV-9739 and cmake improvements merge from develop
This commit is contained in:
@@ -219,37 +219,15 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion)
|
||||
endmacro ()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
macro (TARGET_C_PROPERTIES wintarget libtype addcompileflags addlinkflags)
|
||||
if (MSVC)
|
||||
TARGET_MSVC_PROPERTIES (${wintarget} ${libtype} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}")
|
||||
else ()
|
||||
set_target_properties (${wintarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "${addlinkflags}")
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
macro (TARGET_MSVC_PROPERTIES wintarget libtype addcompileflags addlinkflags)
|
||||
if (MSVC)
|
||||
set_target_properties (${wintarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "${addlinkflags}")
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
macro (TARGET_FORTRAN_PROPERTIES forttarget libtype addcompileflags addlinkflags)
|
||||
if (WIN32)
|
||||
TARGET_FORTRAN_WIN_PROPERTIES (${forttarget} ${libtype} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}")
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
macro (TARGET_FORTRAN_WIN_PROPERTIES forttarget libtype addcompileflags addlinkflags)
|
||||
if (MSVC)
|
||||
if (${libtype} MATCHES "SHARED")
|
||||
set_target_properties (${forttarget} PROPERTIES COMPILE_FLAGS "/dll ${addcompileflags}" LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}")
|
||||
else ()
|
||||
set_target_properties (${forttarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}")
|
||||
endif ()
|
||||
endif ()
|
||||
macro (TARGET_C_PROPERTIES wintarget libtype)
|
||||
target_compile_options(${wintarget} PRIVATE
|
||||
$<$<C_COMPILER_ID:MSVC>:${WIN_COMPILE_FLAGS}>
|
||||
$<$<CXX_COMPILER_ID:MSVC>:${WIN_COMPILE_FLAGS}>
|
||||
)
|
||||
target_link_libraries(${wintarget} INTERFACE
|
||||
$<$<C_COMPILER_ID:MSVC>:${WIN_LINK_FLAGS}>
|
||||
$<$<CXX_COMPILER_ID:MSVC>:${WIN_LINK_FLAGS}>
|
||||
)
|
||||
endmacro ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user