Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix itkPipeline help stream parsing crash and native msvc static debug build #1172

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ endif()

set(WebAssemblyInterface_LIBRARIES WebAssemblyInterface)

if(MSVC) #-- Configure MSVC_STATIC_RUNTIME only if using MSVC environment
option(ITKWASM_MSVC_STATIC_RUNTIME_LIBRARY "Link to MSVC's static CRT (/MT and /MTd).
OFF (default) means link to regular, dynamic CRT (/MD and /MDd)." ON)
mark_as_advanced(ITKWASM_MSVC_STATIC_RUNTIME_LIBRARY)
set(ITKWASM_MSVC_STATIC_RUNTIME_LIBRARY_value ${ITK_MSVC_STATIC_RUNTIME_LIBRARY})
if(ITKWASM_MSVC_STATIC_RUNTIME_LIBRARY)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
message(STATUS "Using MSVC's static CRT (/MT and /MTd)")
else()
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
message(STATUS "Using MSVC's dynamic CRT (/MD and /MDd)")
endif()
endif()

include(FetchContent)
set(_itk_build_testing ${BUILD_TESTING})
set(BUILD_TESTING OFF)
Expand Down
4 changes: 3 additions & 1 deletion src/itkPipeline.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ ::exit(const CLI::Error &e) -> int
#ifndef ITK_WASM_NO_FILESYSTEM_IO
std::cout << rang::fg::reset;
#endif
std::cout << line.substr(loc) << std::endl;
if (loc == std::string::npos) {
std::cout << line.substr(loc) << std::endl;
}
}
} else if(optionGroup) {
if (line == "") {
Expand Down
Loading