-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
793 additions
and
563 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
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
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,19 +1,39 @@ | ||
add_executable(test_mat ${PROJECT_SOURCE_DIR}/test/test_mat.c) | ||
target_link_libraries(test_mat matio) | ||
if(NOT HAVE_GETOPT) | ||
target_link_libraries(test_mat getopt) | ||
endif() | ||
if(MATIO_BUILD_TESTING) | ||
add_executable(test_mat "${PROJECT_SOURCE_DIR}/test/test_mat.c") | ||
target_link_libraries(test_mat matio) | ||
if(NOT HAVE_GETOPT) | ||
target_link_libraries(test_mat getopt) | ||
endif() | ||
|
||
if(NOT HAVE_SNPRINTF OR UNIX) | ||
add_executable(test_snprintf | ||
"${PROJECT_SOURCE_DIR}/test/test_snprintf.c" | ||
"${PROJECT_SOURCE_DIR}/snprintf/snprintf.c" | ||
) | ||
if(HAVE_LIBM) | ||
target_link_libraries(test_snprintf m) | ||
endif() | ||
target_include_directories(test_snprintf PUBLIC | ||
"${PROJECT_SOURCE_DIR}/src" | ||
"${PROJECT_BINARY_DIR}/src" | ||
) | ||
endif() | ||
|
||
if(NOT HAVE_SNPRINTF OR UNIX) | ||
add_executable(test_snprintf | ||
${PROJECT_SOURCE_DIR}/test/test_snprintf.c | ||
${PROJECT_SOURCE_DIR}/snprintf/snprintf.c | ||
) | ||
if(HAVE_LIBM) | ||
target_link_libraries(test_snprintf m) | ||
find_package(Python3 QUIET COMPONENTS Interpreter) | ||
if(Python3_Interpreter_FOUND) | ||
set(MATIO_CTESTS_DIR ${PROJECT_BINARY_DIR}/ctests) | ||
execute_process( | ||
COMMAND "${Python3_EXECUTABLE}" "${PROJECT_SOURCE_DIR}/test/convert_at_to_ctest.py" "${MATIO_CTESTS_DIR}" | ||
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/test" | ||
) | ||
file(GLOB CMAKE_TEST_FILES "${MATIO_CTESTS_DIR}/*.cmake") | ||
foreach(test_file ${CMAKE_TEST_FILES}) | ||
include(${test_file}) | ||
endforeach() | ||
else() | ||
message(WARNING | ||
" Python3 not found." | ||
" Set BUILD_TESTING to OFF to silence this warning." | ||
) | ||
endif() | ||
target_include_directories(test_snprintf PUBLIC | ||
${PROJECT_SOURCE_DIR}/src | ||
${PROJECT_BINARY_DIR}/src | ||
) | ||
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
Oops, something went wrong.