Verified Commit 124a8d63 authored by Flavien BRIDAULT-LOUCHEZ's avatar Flavien BRIDAULT-LOUCHEZ
Browse files

enh(build): default to warnings as errors

parent 5522bb9e
sight_add_target( activity_io_dicom TYPE MODULE )
sight_add_target( activity_io_dicom TYPE MODULE)
......
sight_add_target( activity_io_dicomweb TYPE MODULE )
sight_add_target( activity_io_dicomweb TYPE MODULE)
add_dependencies(activity_io_dicomweb
add_dependencies(activity_io_dicomweb
module_activity
module_memory
module_data
......
sight_add_target( module_io_activity TYPE MODULE )
sight_add_target( module_io_activity TYPE MODULE)
add_dependencies(module_io_activity
add_dependencies(module_io_activity
module_activity
module_data
module_ui_base
......
sight_add_target( activity_navigation_calibration TYPE MODULE )
sight_add_target( activity_navigation_calibration TYPE MODULE)
add_dependencies(activity_navigation_calibration
module_ui_base
......
sight_add_target( activity_viz_negato TYPE MODULE )
sight_add_target( activity_viz_negato TYPE MODULE)
add_dependencies(activity_viz_negato
add_dependencies(activity_viz_negato
data
module_activity
module_ui_base
......
......@@ -774,7 +774,7 @@ macro(sight_add_target)
cmake_parse_arguments(SIGHT_TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
set(NAME ${ARGV0})
message(STATUS "Configuring ${NAME}: ${CMAKE_CURRENT_SOURCE_DIR}")
initProject(${NAME} ${SIGHT_TARGET_TYPE})
......@@ -817,8 +817,12 @@ macro(sight_add_target)
set_target_properties(${SIGHT_TARGET} PROPERTIES SIGHT_START "${SIGHT_TARGET_START}")
endif()
if(SIGHT_TARGET_WARNINGS_AS_ERRORS)
fwManageWarnings(${NAME})
if(NOT DEFINED SIGHT_TARGET_WARNINGS_AS_ERRORS OR SIGHT_TARGET_WARNINGS_AS_ERRORS)
get_target_property(TARGET_TYPE ${SIGHT_TARGET} TYPE)
# Skip libraries without code
if(NOT "${TARGET_TYPE}" STREQUAL "INTERFACE_LIBRARY")
fwManageWarnings(${NAME})
endif()
endif()
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies.cmake")
......
sight_add_target( config_ui_activity TYPE MODULE )
sight_add_target( config_ui_activity TYPE MODULE)
add_dependencies(config_ui_activity
data
......
sight_add_target( config_ui_datamanager TYPE MODULE )
sight_add_target( config_ui_datamanager TYPE MODULE)
add_dependencies(config_ui_datamanager
add_dependencies(config_ui_datamanager
module_ui_base
module_ui_qt
module_data
......
sight_add_target( config_viz_image TYPE MODULE )
sight_add_target( config_viz_image TYPE MODULE)
add_dependencies(config_viz_image
add_dependencies(config_viz_image
activity_viz_negato
config_viz_scene2d
data
......
sight_add_target( config_viz_scene2d TYPE MODULE )
sight_add_target( config_viz_scene2d TYPE MODULE)
add_dependencies(config_viz_scene2d
add_dependencies(config_viz_scene2d
data
module_service
module_ui_base
......
sight_add_target( config_viz_scene3d TYPE MODULE )
sight_add_target( config_viz_scene3d TYPE MODULE)
add_dependencies(config_viz_scene3d
add_dependencies(config_viz_scene3d
config_viz_scene2d
data
module_data
......
......@@ -87,7 +87,7 @@ void SProducer::updating()
const std::string message = m_message + " #" + std::to_string(m_msgCount++);
data->uidSender = m_senderId;
strncpy(data->szMsg, message.c_str(), ::ExTimeLine::MsgData::MAX_MSG_SIZE);
std::strcpy(data->szMsg, message.c_str());
timeline->pushObject(buffer);
......
sight_add_target( activity TYPE LIBRARY PCH pchData )
sight_add_target( activity TYPE LIBRARY PCH pchData)
target_link_libraries(activity PUBLIC core data)
......
......@@ -66,8 +66,8 @@ int IActivitySequencer::parseActivities(data::SeriesDB& seriesDB)
helper.remove(series);
helper.notify();
}
else if(!(lastActivityIndex + 1 < m_activityIds.size()
&& m_activityIds[lastActivityIndex + 1] == activity->getActivityConfigId()))
else if(!(lastActivityIndex + 1 < static_cast<int>(m_activityIds.size())
&& m_activityIds[static_cast<size_t>(lastActivityIndex + 1)] == activity->getActivityConfigId()))
{
// Remove the wrong data
SIGHT_ERROR("The activity '" + activity->getActivityConfigId() + "' is unknown, it will be removed")
......
......@@ -46,7 +46,7 @@ fwActivitiesBuilderRegisterMacro(activity::builder::ActivitySeries, "::activity:
//-----------------------------------------------------------------------------
ActivitySeries::ActivitySeries(activity::IBuilder::Key key)
ActivitySeries::ActivitySeries(activity::IBuilder::Key)
{
}
......
......@@ -110,7 +110,7 @@ ActivityRequirement::ActivityRequirement(const ConfigType& config) :
SIGHT_ASSERT(
"minOccurs value shall be equal or greater than 0 and lower or equal to maxOccurs (" << maxOccurs << ")",
0 <= minOccurs && minOccurs <= maxOccurs
minOccurs <= maxOccurs
);
}
......@@ -320,7 +320,7 @@ ActivityInfo::DataCountType Activity::getDataCount(const data::Vector::csptr& da
{
ActivityInfo::DataCountType dataCount;
for(const data::Object::csptr& obj : *data)
for(const data::Object::csptr obj : *data)
{
++dataCount[obj->getClassname()];
}
......
sight_add_target( activityTest TYPE TEST )
sight_add_target( activityTest TYPE TEST)
target_link_libraries(activityTest PUBLIC
core
......
......@@ -38,7 +38,7 @@ fwActivitiesValidatorRegisterMacro(::sight::activity::validator::DefaultActivity
//-----------------------------------------------------------------------------
DefaultActivity::DefaultActivity(activity::IValidator::Key key)
DefaultActivity::DefaultActivity(activity::IValidator::Key)
{
}
......
......@@ -40,7 +40,7 @@ fwActivitiesValidatorRegisterMacro(::sight::activity::validator::RelatedStudy);
//-----------------------------------------------------------------------------
RelatedStudy::RelatedStudy(activity::IValidator::Key key)
RelatedStudy::RelatedStudy(activity::IValidator::Key)
{
}
......@@ -53,7 +53,7 @@ RelatedStudy::~RelatedStudy()
//-----------------------------------------------------------------------------
IValidator::ValidationType RelatedStudy::validate(
const activity::extension::ActivityInfo& activityInfo,
const activity::extension::ActivityInfo&,
const data::Vector::csptr& currentSelection
) const
{
......
sight_add_target( atoms TYPE LIBRARY )
sight_add_target( atoms TYPE LIBRARY WARNINGS_AS_ERRORS OFF)
target_compile_definitions(atoms PRIVATE "-DCAMP_COMPILATION")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment