diff --git a/src/build-utils/CMakeLists.txt b/src/build-utils/CMakeLists.txt index 3b3961b562..d47e5b97ff 100644 --- a/src/build-utils/CMakeLists.txt +++ b/src/build-utils/CMakeLists.txt @@ -1,39 +1,45 @@ -add_executable(encoding-check encoding-check.cpp) +option(SLIC3R_ENC_CHECK "Verify encoding of source files" 1) -# A global no-op target which depends on all encodings checks, -# and on which in turn all checked targets depend. -# This is done to make encoding checks the first thing to be -# performed before actually compiling any sources of the checked targets -# to make the check fail as early as possible. -add_custom_target(global-encoding-check - ALL - DEPENDS encoding-check -) +if (SLIC3R_ENC_CHECK) + add_executable(encoding-check encoding-check.cpp) + + # A global no-op target which depends on all encodings checks, + # and on which in turn all checked targets depend. + # This is done to make encoding checks the first thing to be + # performed before actually compiling any sources of the checked targets + # to make the check fail as early as possible. + add_custom_target(global-encoding-check + ALL + DEPENDS encoding-check + ) +endif() # Function that adds source file encoding check to a target # using the above encoding-check binary function(encoding_check TARGET) - # Obtain target source files - get_target_property(T_SOURCES ${TARGET} SOURCES) + if (SLIC3R_ENC_CHECK) + # Obtain target source files + get_target_property(T_SOURCES ${TARGET} SOURCES) - # Define top-level encoding check target for this ${TARGET} - add_custom_target(encoding-check-${TARGET} - DEPENDS encoding-check ${T_SOURCES} - COMMENT "Checking source files encodings for target ${TARGET}" - ) - - # Add checking of each source file as a subcommand of encoding-check-${TARGET} - foreach(file ${T_SOURCES}) - add_custom_command(TARGET encoding-check-${TARGET} - COMMAND $ ${TARGET} ${file} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + # Define top-level encoding check target for this ${TARGET} + add_custom_target(encoding-check-${TARGET} + DEPENDS encoding-check ${T_SOURCES} + COMMENT "Checking source files encodings for target ${TARGET}" ) - endforeach() - # This adds dependency on encoding-check-${TARGET} to ${TARET} - # via the global-encoding-check - add_dependencies(global-encoding-check encoding-check-${TARGET}) - add_dependencies(${TARGET} global-encoding-check) + # Add checking of each source file as a subcommand of encoding-check-${TARGET} + foreach(file ${T_SOURCES}) + add_custom_command(TARGET encoding-check-${TARGET} + COMMAND $ ${TARGET} ${file} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + ) + endforeach() + + # This adds dependency on encoding-check-${TARGET} to ${TARET} + # via the global-encoding-check + add_dependencies(global-encoding-check encoding-check-${TARGET}) + add_dependencies(${TARGET} global-encoding-check) + endif() endfunction() diff --git a/src/slic3r/GUI/UpdateDialogs.cpp b/src/slic3r/GUI/UpdateDialogs.cpp index 2ea9040075..a1a113066f 100644 --- a/src/slic3r/GUI/UpdateDialogs.cpp +++ b/src/slic3r/GUI/UpdateDialogs.cpp @@ -113,7 +113,9 @@ MsgUpdateConfig::MsgUpdateConfig(const std::vector &updates) : if (! update.comment.empty()) { flex->Add(new wxStaticText(this, wxID_ANY, _(L("Comment:"))), 0, wxALIGN_RIGHT); - flex->Add(new wxStaticText(this, wxID_ANY, from_u8(update.comment))); + auto *update_comment = new wxStaticText(this, wxID_ANY, from_u8(update.comment)); + update_comment->Wrap(CONTENT_WIDTH * wxGetApp().em_unit()); + flex->Add(update_comment); } versions->Add(flex);