summaryrefslogtreecommitdiffstats
path: root/hl/src
diff options
context:
space:
mode:
Diffstat (limited to 'hl/src')
-rw-r--r--hl/src/CMakeLists.txt48
1 files changed, 21 insertions, 27 deletions
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index fd99ce8..1821ec0 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -6,53 +6,47 @@ if (HDF5_GENERATE_HEADERS)
if (BISON_FOUND)
find_package (FLEX)
if (FLEX_FOUND)
- BISON_TARGET (H5LT_PARSER H5LTparse.y ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c COMPILE_FLAGS "-d -pH5LTyy")
+ 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}/H5LTanalyze.c COMPILE_FLAGS "--wincompat --nounistd -PH5LTyy")
+ 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}/H5LTanalyze.c COMPILE_FLAGS "--nounistd -PH5LTyy")
+ 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})
- set (HL_SRCS
- ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c
- ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c
- )
- set (HL_HEADERS
- ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.h
- )
- set_source_files_properties (${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c GENERATED)
- set_source_files_properties (${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c GENERATED)
- set_source_files_properties (${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.h GENERATED)
add_custom_command (
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c.timestamp
+ OUTPUT H5LTparse.c H5LTparse.h
COMMAND "${CMAKE_COMMAND}"
- -D "FILE_PARSE=H5LTparse.c"
+ -D "GEN_DIR=genLT"
+ -D "FILE_PARSE=H5LTparse"
-P "${HDF_RESOURCES_DIR}/HDF5_Process_Flex_Files.cmake"
- DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c"
+ DEPENDS "genLT/H5LTparse.c"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
add_custom_command (
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c.timestamp
+ OUTPUT H5LTanalyze.c
COMMAND "${CMAKE_COMMAND}"
+ -D "GEN_DIR=genLT"
-D "FILE_ANALYZE=H5LTanalyze.c"
-P "${HDF_RESOURCES_DIR}/HDF5_Process_Flex_Files.cmake"
- DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c"
+ DEPENDS "genLT/H5LTanalyze.c"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ )
+ add_custom_target (process_gen_H5LT
+ DEPENDS H5LTparse.c H5LTanalyze.c
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
- add_custom_target (process_gen_H5LT DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c.timestamp ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c.timestamp)
-# add_custom_target (process_gen_H5LT
-# COMMAND "${CMAKE_COMMAND}"
-# -D "FILE_PARSE=${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c"
-# -D "FILE_ANALYSE=${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c"
-# -P "${HDF5_RESOURCE_DIR}/HDF5_Process_Flex_Files.cmake"
-# DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c"
-# COMMENT "Prepending pragma statements"
-# )
+ 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)