Skip to content

Commit

Permalink
Merge remote-tracking branch 'sofa-framework/master' into modularizeS…
Browse files Browse the repository at this point in the history
…ofaHaptics

# Conflicts:
#	modules/SofaHaptics/NullForceFeedbackT.cpp
#	modules/SofaHaptics/src/SofaHaptics/ForceFeedback.h
#	modules/SofaHaptics/src/SofaHaptics/LCPForceFeedback.h
#	modules/SofaHaptics/src/SofaHaptics/MechanicalStateForceFeedback.h
#	modules/SofaHaptics/src/SofaHaptics/NullForceFeedback.h
#	modules/SofaHaptics/src/SofaHaptics/NullForceFeedbackT.h
  • Loading branch information
guparan committed Mar 13, 2019
2 parents ba4a809 + 96faeb7 commit c44f035
Show file tree
Hide file tree
Showing 3,865 changed files with 10,428 additions and 9,829 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion SofaKernel/SofaBase/config.h.in
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down
2 changes: 1 addition & 1 deletion SofaKernel/SofaCommon/config.h.in
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down
11 changes: 10 additions & 1 deletion SofaKernel/SofaFramework/SofaFrameworkConfig.cmake.in
Expand Up @@ -15,9 +15,18 @@ sofa_create_target(TinyXML SofaFramework "${TinyXML_LIBRARIES}" "${TinyXML_INCLU
set(SOFA_HAVE_ZLIB "@SOFA_HAVE_ZLIB@")
set(SOFA_HAVE_GLEW "@SOFA_HAVE_GLEW@")
set(SOFA_HAVE_BOOST "@SOFA_HAVE_BOOST@")
set(SOFA_NO_OPENGL "@SOFA_NO_OPENGL@")
set(SOFA_HAVE_GTEST "@SOFA_HAVE_GTEST@")

set(SOFA_BUILD_METIS "@SOFA_BUILD_METIS@")

set(SOFA_NO_OPENGL "@SOFA_NO_OPENGL@")

set(SOFA_USE_MASK "@SOFA_USE_MASK@")

set(SOFA_WITH_DEVTOOLS "@SOFA_WITH_DEVTOOLS@")
set(SOFA_WITH_THREADING "@SOFA_WITH_THREADING@")
set(SOFA_WITH_DEPRECATED_COMPONENTS "@SOFA_WITH_DEPRECATED_COMPONENTS@")

if(SOFA_HAVE_GTEST)
find_package(GTest CONFIG REQUIRED)
endif()
Expand Down
82 changes: 50 additions & 32 deletions SofaKernel/SofaFramework/SofaMacros.cmake
Expand Up @@ -439,36 +439,46 @@ endfunction()
##########################################################


macro(sofa_install_targets package_name the_targets install_include_subdir)
macro(sofa_install_targets package_name the_targets include_install_dir)
install(TARGETS ${the_targets}
EXPORT ${package_name}Targets
RUNTIME DESTINATION bin COMPONENT applications
LIBRARY DESTINATION lib COMPONENT libraries
ARCHIVE DESTINATION lib COMPONENT libraries
PUBLIC_HEADER DESTINATION include/${install_include_subdir} COMPONENT headers)

if(NOT "${install_include_subdir}" STREQUAL "") # Handle multi-dir install (no PUBLIC_HEADER)
foreach(target ${the_targets})
get_target_property(public_header ${target} PUBLIC_HEADER)
if("${public_header}" STREQUAL "public_header-NOTFOUND")
#message("Full install (no PUBLIC_HEADER): ${CMAKE_CURRENT_SOURCE_DIR}")
# the trailing slash is IMPORTANT, see https://cmake.org/pipermail/cmake/2009-December/033850.html
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION include/${install_include_subdir}
COMPONENT headers
FILES_MATCHING PATTERN "*.h" PATTERN "*.inl")
PUBLIC_HEADER DESTINATION include/${include_install_dir} COMPONENT headers)

# non-flat headers install (if no PUBLIC_HEADER and include_install_dir specified)
foreach(target ${the_targets})
get_target_property(public_header ${target} PUBLIC_HEADER)
if("${public_header}" STREQUAL "public_header-NOTFOUND" AND NOT "${include_install_dir}" STREQUAL "")
set(optional_argv3 "${ARGV3}")
if(optional_argv3)
# ARGV3 is a non-breaking additional argument to handle INCLUDE_SOURCE_DIR (see sofa_generate_package)
# TODO: add a real argument "include_source_dir" to this macro
set(include_source_dir "${ARGV3}")
endif()
endforeach()
endif()
if(NOT EXISTS "${include_source_dir}" AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${include_source_dir}")
# will be true if include_source_dir is empty
set(include_source_dir "${CMAKE_CURRENT_SOURCE_DIR}/${include_source_dir}")
endif()
#message("${target}: ${include_source_dir} -> include/${include_install_dir}")
file(GLOB_RECURSE header_files "${include_source_dir}/*.h" "${include_source_dir}/*.inl")
foreach(header ${header_files})
file(RELATIVE_PATH path_from_package "${include_source_dir}" "${header}")
get_filename_component(dir_from_package ${path_from_package} DIRECTORY)
install(FILES ${header}
DESTINATION "include/${include_install_dir}/${dir_from_package}"
COMPONENT headers)
endforeach()
endif()
endforeach()

## Install rules for the resources
get_filename_component(PARENT_DIR ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
get_filename_component(PARENT_DIR_NAME ${PARENT_DIR} NAME)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/examples/")
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/examples/ DESTINATION share/sofa/${PARENT_DIR_NAME}/${PROJECT_NAME} COMPONENT resources)
## Default install rules for resources
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/examples")
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/examples/ DESTINATION share/sofa/${package_name}/examples COMPONENT resources)
endif()
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/scenes/")
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scenes/ DESTINATION share/sofa/${PARENT_DIR_NAME}/${PROJECT_NAME} COMPONENT resources)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/scenes")
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scenes/ DESTINATION share/sofa/${package_name}/examples COMPONENT resources)
endif()
endmacro()

Expand Down Expand Up @@ -528,11 +538,12 @@ endmacro()
# - Deploy the headers, resources, scenes & examples
# - Replaces the now deprecated sofa_create_package macro
#
# sofa_generate_package(NAME VERSION TARGETS INCLUDE_ROOT_DIR)
# NAME - (input) the name of the generated package (usually ${PROJECT_NAME}).
# VERSION - (input) the package version (usually ${${PROJECT_NAME}_VERSION}).
# TARGETS - (input) list of targets to install. For standard plugins & modules, ${PROJECT_NAME}
# INCLUDE_ROOT_DIR - (input) [OPTIONAL] include directory (for Multi-dir install of header files).
# sofa_generate_package(NAME VERSION TARGETS INCLUDE_INSTALL_DIR INCLUDE_SOURCE_DIR)
# NAME - (input) the name of the generated package (usually ${PROJECT_NAME}).
# VERSION - (input) the package version (usually ${PROJECT_VERSION}).
# TARGETS - (input) list of targets to install. For standard plugins & modules, ${PROJECT_NAME}
# INCLUDE_INSTALL_DIR - (input) [OPTIONAL] include directory (for Multi-dir install of header files).
# INCLUDE_SOURCE_DIR - (input) [OPTIONAL] install headers with same tree structure as source starting from this dir (defaults to ${CMAKE_CURRENT_SOURCE_DIR})
#
# Example:
# project(ExamplePlugin VERSION 1.0)
Expand All @@ -541,19 +552,26 @@ endmacro()
# set(HEADER_FILES initExamplePlugin.h myComponent.h )
# add_library( ${PROJECT_NAME} SHARED ${SOURCE_FILES})
# target_link_libraries(${PROJECT_NAME} SofaCore)
# sofa_generate_package(NAME ${PROJECT_NAME} VERSION ${${PROJECT_NAME}_VERSION} TARGETS ${PROJECT_NAME} INCLUDE_ROOT_DIR ${PROJECT_NAME} )
# sofa_generate_package(NAME ${PROJECT_NAME} VERSION ${PROJECT_VERSION} TARGETS ${PROJECT_NAME} INCLUDE_INSTALL_DIR "sofa/custom/install/dir" INCLUDE_SOURCE_DIR src/${PROJECT_NAME} )
#
function(sofa_generate_package)
set(oneValueArgs NAME VERSION INCLUDE_ROOT_DIR)
set(oneValueArgs NAME VERSION INCLUDE_ROOT_DIR INCLUDE_INSTALL_DIR INCLUDE_SOURCE_DIR)
set(multiValueArgs TARGETS)
cmake_parse_arguments("" "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
sofa_install_targets("${_NAME}" "${_TARGETS}" "${_INCLUDE_ROOT_DIR}")
set(include_install_dir "${_INCLUDE_INSTALL_DIR}")
if(_INCLUDE_ROOT_DIR AND NOT _INCLUDE_INSTALL_DIR)
set(include_install_dir "${_INCLUDE_ROOT_DIR}")
message(WARNING "sofa_generate_package(${_NAME}): INCLUDE_ROOT_DIR is deprecated. Please use INCLUDE_INSTALL_DIR instead.")
endif()
sofa_install_targets("${_NAME}" "${_TARGETS}" "${include_install_dir}" "${_INCLUDE_SOURCE_DIR}")
sofa_write_package_config_files("${_NAME}" "${_VERSION}")
endfunction()

macro(sofa_create_package package_name version the_targets include_subdir)
macro(sofa_create_package package_name version the_targets include_install_dir)
message(WARNING "Deprecated macro. Use the keyword argument function 'sofa_generate_package' instead")
sofa_generate_package(NAME "${package_name}" VERSION "${version}" TARGETS "${the_targets}" INCLUDE_ROOT_DIR "${include_subdir}")
# ARGV4 is a non-breaking additional argument to handle INCLUDE_SOURCE_DIR (see sofa_generate_package)
# TODO: add a real argument "include_source_dir" to this macro
sofa_generate_package(NAME "${package_name}" VERSION "${version}" TARGETS "${the_targets}" INCLUDE_INSTALL_DIR "${include_install_dir}" INCLUDE_SOURCE_DIR "${ARGV4}")
endmacro()


Expand Down
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down
2 changes: 1 addition & 1 deletion SofaKernel/SofaFramework/build_option_dump_visitor.h.in
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down
2 changes: 1 addition & 1 deletion SofaKernel/SofaFramework/build_option_opengl.h.in
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down
2 changes: 1 addition & 1 deletion SofaKernel/SofaFramework/build_option_threading.h.in
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down
2 changes: 1 addition & 1 deletion SofaKernel/SofaFramework/config.h.in
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down
2 changes: 1 addition & 1 deletion SofaKernel/SofaFramework/sharedlibrary_defines.h.in
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down
2 changes: 1 addition & 1 deletion SofaKernel/SofaSimulation/config.h.in
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down
2 changes: 1 addition & 1 deletion SofaKernel/cmake/doxygen/generateComponentList.cpp
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down
2 changes: 1 addition & 1 deletion SofaKernel/extlibs/newmat/CMakeLists.txt
Expand Up @@ -56,4 +56,4 @@ endif()


include(../../SofaFramework/SofaMacros.cmake)
sofa_generate_package(NAME Newmat VERSION 0 TARGETS ${PROJECT_NAME} INCLUDE_ROOT_DIR ${PROJECT_NAME})
sofa_generate_package(NAME Newmat VERSION 0 TARGETS ${PROJECT_NAME} INCLUDE_INSTALL_DIR ${PROJECT_NAME})
1 change: 1 addition & 0 deletions SofaKernel/framework/framework_test/CMakeLists.txt
Expand Up @@ -22,6 +22,7 @@ set(SOURCE_FILES
helper/vector_test.cpp
helper/gl/GLSLShader_test.cpp
helper/io/MeshOBJ_test.cpp
helper/io/XspLoader_test.cpp
helper/system/FileMonitor_test.cpp
helper/system/FileRepository_test.cpp
helper/system/FileSystem_test.cpp
Expand Down
6 changes: 3 additions & 3 deletions SofaKernel/framework/framework_test/core/DataEngine_test.cpp
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down Expand Up @@ -48,7 +48,7 @@ class TestEngine : public core::DataEngine
, output(initData(&output,(int)UNDEFINED,"output","output"))
{}

~TestEngine() {}
~TestEngine() override {}

void init() override
{
Expand Down Expand Up @@ -80,7 +80,7 @@ struct DataEngine_test: public BaseTest
{
TestEngine engine;

void SetUp()
void SetUp() override
{
engine.init();
}
Expand Down
2 changes: 1 addition & 1 deletion SofaKernel/framework/framework_test/core/PluginTest.cpp
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down Expand Up @@ -38,7 +38,7 @@ class MeshTestLoader : public MeshLoader
typedef helper::WriteAccessor< Data< helper::vector< Triangle > > > waTtriangles;
typedef helper::WriteAccessor< Data< helper::vector< Tetrahedron > > > waTetrahedra;

virtual bool load()
bool load() override
{
return true;
}
Expand Down
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by *
Expand Down Expand Up @@ -47,7 +47,7 @@ class SingleLink_test: public BaseTest
BaseObject::SPtr m_src ;

/// Create a link to an object.
void SetUp()
void SetUp() override
{
m_dst = sofa::core::objectmodel::New<BaseObject>() ;
m_src = sofa::core::objectmodel::New<BaseObject>() ;
Expand Down
@@ -1,6 +1,6 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, development version *
* (c) 2006-2018 INRIA, USTL, UJF, CNRS, MGH *
* (c) 2006-2019 INRIA, USTL, UJF, CNRS, MGH *
* *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the Free *
Expand Down Expand Up @@ -39,11 +39,11 @@ using sofa::helper::testing::BaseTest ;

struct BaseObjectDescription_test: public BaseTest
{
void SetUp()
void SetUp() override
{
}

void TearDown()
void TearDown() override
{
}

Expand Down

0 comments on commit c44f035

Please sign in to comment.