diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-02-24 19:43:07 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-02-24 19:43:07 (GMT) |
commit | 05dfc85de8e6da2fdf2bd816e86edcabddeacccc (patch) | |
tree | b948351a5d349e3964b821d2e17afd47e6c2af60 /config/cmake/HDF5Macros.cmake | |
parent | be50f4a4243afffa9668c9f41b0828ad1e2a1466 (diff) | |
download | hdf5-05dfc85de8e6da2fdf2bd816e86edcabddeacccc.zip hdf5-05dfc85de8e6da2fdf2bd816e86edcabddeacccc.tar.gz hdf5-05dfc85de8e6da2fdf2bd816e86edcabddeacccc.tar.bz2 |
[svn-r20153] Move ext lib handling for ext project building to a common macro. Update HDF5 project to use HDFMacros.cmake file. Add test properties for test ordering.
Tested: local linux, windows
Diffstat (limited to 'config/cmake/HDF5Macros.cmake')
-rw-r--r-- | config/cmake/HDF5Macros.cmake | 117 |
1 files changed, 1 insertions, 116 deletions
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index 3b15e02..b9e37bb 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -1,107 +1,6 @@ #------------------------------------------------------------------------------- -MACRO (SET_GLOBAL_VARIABLE name value) - SET (${name} ${value} CACHE INTERNAL "Used to pass variables between directories" FORCE) -ENDMACRO (SET_GLOBAL_VARIABLE) - -#------------------------------------------------------------------------------- -MACRO (IDE_GENERATED_PROPERTIES SOURCE_PATH HEADERS SOURCES) - #set(source_group_path "Source/AIM/${NAME}") - STRING (REPLACE "/" "\\\\" source_group_path ${SOURCE_PATH}) - source_group(${source_group_path} FILES ${HEADERS} ${SOURCES}) - - #-- The following is needed if we ever start to use OS X Frameworks but only - #-- works on CMake 2.6 and greater - #SET_PROPERTY (SOURCE ${HEADERS} - # PROPERTY MACOSX_PACKAGE_LOCATION Headers/${NAME} - #) -ENDMACRO (IDE_GENERATED_PROPERTIES) - -#------------------------------------------------------------------------------- -MACRO (IDE_SOURCE_PROPERTIES SOURCE_PATH HEADERS SOURCES) - # INSTALL (FILES ${HEADERS} - # DESTINATION include/R3D/${NAME} - # COMPONENT Headers - # ) - - STRING (REPLACE "/" "\\\\" source_group_path ${SOURCE_PATH} ) - source_group (${source_group_path} FILES ${HEADERS} ${SOURCES}) - - #-- The following is needed if we ever start to use OS X Frameworks but only - #-- works on CMake 2.6 and greater - #SET_PROPERTY (SOURCE ${HEADERS} - # PROPERTY MACOSX_PACKAGE_LOCATION Headers/${NAME} - #) -ENDMACRO (IDE_SOURCE_PROPERTIES) - -#------------------------------------------------------------------------------- -MACRO (H5_NAMING target libtype) - IF (WIN32 AND NOT MINGW) - IF (${libtype} MATCHES "SHARED") - IF (HDF_LEGACY_NAMING) - SET_TARGET_PROPERTIES (${target} PROPERTIES OUTPUT_NAME "dll") - SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX "${target}") - ELSE (HDF_LEGACY_NAMING) - SET_TARGET_PROPERTIES (${target} PROPERTIES OUTPUT_NAME "${target}dll") - ENDIF (HDF_LEGACY_NAMING) - ENDIF (${libtype} MATCHES "SHARED") - ENDIF (WIN32 AND NOT MINGW) -ENDMACRO (H5_NAMING) - -#------------------------------------------------------------------------------- MACRO (H5_SET_LIB_OPTIONS libtarget libname libtype) - # message (STATUS "${libname} libtype: ${libtype}") - IF (${libtype} MATCHES "SHARED") - IF (WIN32 AND NOT MINGW) - IF (HDF_LEGACY_NAMING) - SET (LIB_RELEASE_NAME "${libname}dll") - SET (LIB_DEBUG_NAME "${libname}ddll") - ELSE (HDF_LEGACY_NAMING) - SET (LIB_RELEASE_NAME "${libname}") - SET (LIB_DEBUG_NAME "${libname}_D") - ENDIF (HDF_LEGACY_NAMING) - ELSE (WIN32 AND NOT MINGW) - SET (LIB_RELEASE_NAME "${libname}") - SET (LIB_DEBUG_NAME "${libname}_debug") - ENDIF (WIN32 AND NOT MINGW) - ELSE (${libtype} MATCHES "SHARED") - IF (WIN32 AND NOT MINGW) - IF (HDF_LEGACY_NAMING) - SET (LIB_RELEASE_NAME "${libname}") - SET (LIB_DEBUG_NAME "${libname}d") - ELSE (HDF_LEGACY_NAMING) - SET (LIB_RELEASE_NAME "lib${libname}") - SET (LIB_DEBUG_NAME "lib${libname}_D") - ENDIF (HDF_LEGACY_NAMING) - ELSE (WIN32 AND NOT MINGW) - # if the generator supports configuration types or if the CMAKE_BUILD_TYPE has a value - IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - SET (LIB_RELEASE_NAME "${libname}") - SET (LIB_DEBUG_NAME "${libname}_debug") - ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - SET (LIB_RELEASE_NAME "lib${libname}") - SET (LIB_DEBUG_NAME "lib${libname}_debug") - ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - ENDIF (WIN32 AND NOT MINGW) - ENDIF (${libtype} MATCHES "SHARED") - - SET_TARGET_PROPERTIES (${libtarget} - PROPERTIES - DEBUG_OUTPUT_NAME ${LIB_DEBUG_NAME} - RELEASE_OUTPUT_NAME ${LIB_RELEASE_NAME} - MINSIZEREL_OUTPUT_NAME ${LIB_RELEASE_NAME} - RELWITHDEBINFO_OUTPUT_NAME ${LIB_RELEASE_NAME} - ) - - #----- Use MSVC Naming conventions for Shared Libraries - IF (MINGW AND ${libtype} MATCHES "SHARED") - SET_TARGET_PROPERTIES (${libtarget} - PROPERTIES - IMPORT_SUFFIX ".lib" - IMPORT_PREFIX "" - PREFIX "" - ) - ENDIF (MINGW AND ${libtype} MATCHES "SHARED") - + HDF_SET_LIB_OPTIONS (${libtarget} ${libname} ${libtype}) IF (${libtype} MATCHES "SHARED") IF (WIN32) SET (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION_MAJOR}) @@ -125,17 +24,3 @@ MACRO (H5_SET_LIB_OPTIONS libtarget libname libtype) ENDIF (APPLE) ENDMACRO (H5_SET_LIB_OPTIONS) - -#------------------------------------------------------------------------------- -MACRO (TARGET_FORTRAN_WIN_PROPERTIES target addlinkflags) - IF (WIN32) - IF (MSVC) - SET_TARGET_PROPERTIES (${target} - PROPERTIES - COMPILE_FLAGS "/dll" - LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}" - ) - ENDIF (MSVC) - ENDIF (WIN32) -ENDMACRO (TARGET_FORTRAN_WIN_PROPERTIES) - |