Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for omc-diff and reference files. (#8277)
- The target `reference-files` can be used to extract the reference files. - Explicitly set qwt as SHARED lib. This was overlooked. - Do not show statements when installing libraries. This was fixed for the CMake version but was forgotten for the makefiles.
- Loading branch information
Showing
5 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
|
||
|
||
omc_add_subdirectory(difftool) | ||
omc_add_subdirectory(ReferenceFiles) | ||
omc_add_subdirectory(libraries-for-testing) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
|
||
file(GLOB_RECURSE COMPRESSED_REF_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.mat.xz) | ||
|
||
foreach(compressed_file_path ${COMPRESSED_REF_FILES}) | ||
get_filename_component(compressed_file_dir ${compressed_file_path} DIRECTORY) | ||
# Remove only the last extension. The file names have a lot of dots. | ||
get_filename_component(compressed_file_name_no_xz_ext ${compressed_file_path} NAME_WLE) | ||
set(output_file_path ${compressed_file_dir}/${compressed_file_name_no_xz_ext}) | ||
|
||
add_custom_command( | ||
DEPENDS ${compressed_file_path} | ||
COMMAND xz --keep --decompress --force ${compressed_file_path} | ||
OUTPUT ${output_file_path} | ||
COMMENT "Extracting: ${compressed_file_path}" | ||
) | ||
|
||
set(OMC_EXTRACTED_REFERENCE_FILES ${OMC_EXTRACTED_REFERENCE_FILES} ${output_file_path}) | ||
endforeach() | ||
|
||
# A custom target the depends on the extracted files. Makeing sure they get generated when it is | ||
# invoked. | ||
add_custom_target(reference-files | ||
DEPENDS ${OMC_EXTRACTED_REFERENCE_FILES} | ||
COMMENT "Extracted reference files to ${CMAKE_CURRENT_SOURCE_DIR}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
|
||
find_package(FLEX) | ||
|
||
if(NOT FLEX_FOUND) | ||
message(WARNING "GNU Flex not found. You will not be able to use omc-diff to verify test results against expected results.") | ||
else() | ||
FLEX_TARGET(omc_diff_lexer omc-diff.l ${CMAKE_CURRENT_BINARY_DIR}/lex.yy.c) | ||
add_executable(omc-diff ${FLEX_omc_diff_lexer_OUTPUTS}) | ||
|
||
install(TARGETS omc-diff) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters