diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-12-14 15:22:29 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-12-14 15:22:29 (GMT) |
commit | 7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a (patch) | |
tree | 6bd24199653eff3e99f312d748ba4909686bef61 /hl/src/CMakeLists.txt | |
parent | 8e9b142d9cd347432d400b4f9b3b88a3f047c06d (diff) | |
parent | 2cb441c507dfbd4437ccf29e232a9b730e6e1003 (diff) | |
download | hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.zip hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.tar.gz hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.tar.bz2 |
[svn-r28636] merge from trunk.
Diffstat (limited to 'hl/src/CMakeLists.txt')
-rw-r--r-- | hl/src/CMakeLists.txt | 85 |
1 files changed, 3 insertions, 82 deletions
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index df1962b..472f1ee 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -1,85 +1,16 @@ cmake_minimum_required (VERSION 3.1.0) PROJECT (HDF5_HL_SRC) -if (HDF5_GENERATE_HEADERS) - file (MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/genLT") - find_package (BISON) - if (BISON_FOUND) - find_package (FLEX) - if (FLEX_FOUND) - BISON_TARGET (H5LT_PARSER H5LTparse.y ${CMAKE_CURRENT_BINARY_DIR}/genLT/H5LTparse.c COMPILE_FLAGS "-d -pH5LTyy") - if (WIN32) - FLEX_TARGET (H5LT_SCANNER H5LTanalyze.l ${CMAKE_CURRENT_BINARY_DIR}/genLT/H5LTanalyze.c COMPILE_FLAGS "--wincompat --nounistd -PH5LTyy") - else (WIN32) - FLEX_TARGET (H5LT_SCANNER H5LTanalyze.l ${CMAKE_CURRENT_BINARY_DIR}/genLT/H5LTanalyze.c COMPILE_FLAGS "--nounistd -PH5LTyy") - endif (WIN32) - ADD_FLEX_BISON_DEPENDENCY(H5LT_SCANNER H5LT_PARSER) - - if (BISON_H5LT_PARSER_DEFINED AND FLEX_H5LT_SCANNER_DEFINED) - include_directories(${CMAKE_CURRENT_BINARY_DIR}) - - add_custom_command ( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.h - PRE_BUILD - COMMAND "${CMAKE_COMMAND}" - -D "GEN_DIR=genLT" - -D "FILE_PARSE=H5LTparse" - -P "${HDF_RESOURCES_DIR}/HDF5_Process_Flex_Files.cmake" - DEPENDS "${BISON_H5LT_PARSER_OUTPUTS}" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - add_custom_command ( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c - PRE_BUILD - COMMAND "${CMAKE_COMMAND}" - -D "GEN_DIR=genLT" - -D "FILE_ANALYZE=H5LTanalyze.c" - -P "${HDF_RESOURCES_DIR}/HDF5_Process_Flex_Files.cmake" - DEPENDS "${FLEX_H5LT_SCANNER_OUTPUTS}" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - add_custom_target (process_gen_H5LT - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - - set (HL_SRCS - ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c - ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c - ) - set (HL_HEADERS - ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.h - ) - else (BISON_H5LT_PARSER_DEFINED AND FLEX_H5LT_SCANNER_DEFINED) - message (STATUS "Error during generate of files") - endif (BISON_H5LT_PARSER_DEFINED AND FLEX_H5LT_SCANNER_DEFINED) - else (FLEX_FOUND) - message (STATUS "Cannot generate files - flex not found") - endif (FLEX_FOUND) - else (BISON_FOUND) - message (STATUS "Cannot generate files - bison not found") - endif (BISON_FOUND) -else (HDF5_GENERATE_HEADERS) - set (HL_SRCS - ${HDF5_HL_SRC_SOURCE_DIR}/H5LTanalyze.c - ${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.c - ) - set (HL_HEADERS - ${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.h - ) -endif (HDF5_GENERATE_HEADERS) - #----------------------------------------------------------------------------- # List Source files #----------------------------------------------------------------------------- set (HL_SRCS - ${HL_SRCS} ${HDF5_HL_SRC_SOURCE_DIR}/H5DO.c ${HDF5_HL_SRC_SOURCE_DIR}/H5DS.c ${HDF5_HL_SRC_SOURCE_DIR}/H5IM.c ${HDF5_HL_SRC_SOURCE_DIR}/H5LT.c - #${HDF5_HL_SRC_SOURCE_DIR}/H5LTanalyze.c - #${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.c + ${HDF5_HL_SRC_SOURCE_DIR}/H5LTanalyze.c + ${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.c ${HDF5_HL_SRC_SOURCE_DIR}/H5PT.c ${HDF5_HL_SRC_SOURCE_DIR}/H5TB.c ) @@ -89,7 +20,7 @@ set (HL_HEADERS ${HDF5_HL_SRC_SOURCE_DIR}/H5DOpublic.h ${HDF5_HL_SRC_SOURCE_DIR}/H5DSpublic.h ${HDF5_HL_SRC_SOURCE_DIR}/H5IMpublic.h - #${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.h + ${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.h ${HDF5_HL_SRC_SOURCE_DIR}/H5LTpublic.h ${HDF5_HL_SRC_SOURCE_DIR}/H5PTpublic.h ${HDF5_HL_SRC_SOURCE_DIR}/H5TBpublic.h @@ -106,11 +37,6 @@ set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES ) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}") set (install_targets ${HDF5_HL_LIB_TARGET}) -if (HDF5_GENERATE_HEADERS) - add_dependencies(${HDF5_HL_LIB_TARGET} process_gen_H5LT) -else (HDF5_GENERATE_HEADERS) - add_dependencies(${HDF5_HL_LIB_TARGET} "${HDF5_HL_SRC_SOURCE_DIR}/H5LTanalyze.c;${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.c") -endif (HDF5_GENERATE_HEADERS) if (BUILD_SHARED_LIBS) add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SRCS} ${HL_HEADERS}) @@ -125,11 +51,6 @@ if (BUILD_SHARED_LIBS) ) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIBSH_TARGET}") set (install_targets ${install_targets} ${HDF5_HL_LIBSH_TARGET}) - if (HDF5_GENERATE_HEADERS) - add_dependencies(${HDF5_HL_LIBSH_TARGET} process_gen_H5LT) - else (HDF5_GENERATE_HEADERS) - add_dependencies(${HDF5_HL_LIBSH_TARGET} "${HDF5_HL_SRC_SOURCE_DIR}/H5LTanalyze.c;${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.c") - endif (HDF5_GENERATE_HEADERS) endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- |