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

[CMake] CLEAN/FIX deprecated things (MSVC mainly) #2217

Merged
merged 5 commits into from
Jul 1, 2021

Conversation

fredroy
Copy link
Contributor

@fredroy fredroy commented Jun 30, 2021

1- MSVC was never throwing deprecation warnings because ... it was disabled with the compiler flags. A bit hard to inform the user that one feature or file is deprecated if he is not warned.
So this PR re-enables 4996 (deprecation) warnings but still disable some msvc-specific deprecation notices (with some preprocessor defines)

2- A contrario, deprecation warnings in extlibs are quite annoying so they should be disabled IMO.

3- enabling deprecation warnings led to two types of deprecation in the SOFA code base:


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@fredroy fredroy added pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: status to review To notify reviewers to review this pull-request pr: clean Cleaning the code pr: do not squash To merge instead of squash a pull-request labels Jun 30, 2021
@fredroy fredroy added this to the v21.06 milestone Jun 30, 2021
@guparan guparan added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Jun 30, 2021
@guparan guparan changed the title [Sofa] Clean, Fix deprecated things (MSVC mainly) [CMake] CLEAN/FIX deprecated things (MSVC mainly) Jun 30, 2021
@guparan guparan merged commit b572be4 into sofa-framework:master Jul 1, 2021
guparan added a commit that referenced this pull request Jul 1, 2021
* msvc: re-enable deprecated warnings for Sofa modules

* msvc: disable deprecated warnings for external projects

* msvc: use Sleep instead of deprecated _sleep

* unique() for shared_ptr is deprecated (https://en.cppreference.com/w/cpp/memory/shared_ptr/unique)

* Update CMakeLists.txt

Co-authored-by: Guillaume Paran <guillaume.paran@sofa-framework.org>
fredroy added a commit that referenced this pull request Jul 5, 2021
* [CMake][Changelog] Bump to 21.06.00 + Update Changelog

* Merge pull request #1996 from fredroy/optim_ldl_insimo

[SofaSparseSolver] SparseLDLSolver optimizations

* [CMake] ADD option to enable/disable compatibility layer (#2216)

* [CMake] CLEAN/FIX deprecated things (MSVC mainly) (#2217)

* msvc: re-enable deprecated warnings for Sofa modules

* msvc: disable deprecated warnings for external projects

* msvc: use Sleep instead of deprecated _sleep

* unique() for shared_ptr is deprecated (https://en.cppreference.com/w/cpp/memory/shared_ptr/unique)

* Update CMakeLists.txt

Co-authored-by: Guillaume Paran <guillaume.paran@sofa-framework.org>

* [Changelog] Update Changelog

* [SofaHelper] FIX PluginRepository order on Windows

* [SofaGuiQt] Remove RELOCATABLE attribute

* [All] Remove use of compatibility layer (#2179)

* re-enable warnings when using compat headers

* sofaframework compiles

* sofabase compiles

* sofagl compiles

* modules compiles

* gui compiles

* tests compiles

* image

* plugins

* linux, plugins...

* physicsapi, cuda

* remove more uses

* compiles without sofa.compat

* compiles without sofa.compat with plugins

* Fix headlessrecorder

* fix geomagic

* fix sofaassimp

* fix imagetoolbox

* Fix compilation crash with masses

* Update SofaKernel/modules/Sofa.GL/src/sofa/gl/BasicShapes.h

Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>

* restore compat in cmake

* fix compilation

* fix sparseldl

* [All] FIX deprecated includes "sofa/helper/ArgumentParser.h"

# Conflicts:
#	applications/projects/SofaFlowVR/Main.cpp
#	applications/projects/runSofa/Main.cpp
#	applications/tutorials/oneParticle/oneParticle.cpp

* [All] FIX deprecated includes "sofa/helper/ArgumentParser.h" (2)

Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>
Co-authored-by: Guillaume Paran <guillaume.paran@sofa-framework.org>

* [Changelog] Update Changelog

* [tools] Disable more plugins in postinstall scripts

* [All] FIX sofa::type::vector propagation

* [SofaSimpleFem] Fix rendering options in TetrahedronFEMFF (#2156)

* [SofaSimpleFem] Fix rendering options in TetrahedronFEMFF

* Add function checking if the value of computeVonMisesStress is valid

* minor fix warning in the meantime

* Update SofaKernel/modules/SofaSimpleFem/src/SofaSimpleFem/TetrahedronFEMForceField.inl

Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>

* Make isVonMisesStressRenderingOptionValid() function const

* [SofaSimpleFem] CLEAN von Mises Stress draw in TetrahedronFEMForceField

+ ADD showVonMisesStressPerElement Data in TetrahedronFEMForceField

* [SofaSimpleFem] FIX TetrahedronFEMForceField

* fix compilation

* [SofaSimpleFem] FIX TetrahedronFEMForceField::draw

* [SofaSimpleFem] Avoid segfault in TetrahedronFEMForceField with method SMALL

* [SofaSimpleFem] CLEAN message in TetrahedronFEMForceField::draw

* [SofaSimpleFem] CLEAN message in TetrahedronFEMForceField::draw (2)

Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>
Co-authored-by: Guillaume Paran <guillaume.paran@sofa-framework.org>
Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com>
Co-authored-by: Frederick Roy <frederick.roy@inria.fr>

* [Changelog] Update Changelog

* [SofaGuiCommon] FIX GuiDataRepository when used by python interpreter

* [All] Fix debug compilation (#2223)

* fix header in rigidtypes with gcc/clang and debug

* fix eulerianfluid with debug compilation

* [Changelog] Update Changelog

* [CMake] Bump version to 21.12.99

Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com>
Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>
Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>
Co-authored-by: Frederick Roy <frederick.roy@inria.fr>
guparan added a commit that referenced this pull request Jul 5, 2021
* [CMake][Changelog] Bump to 21.06.00 + Update Changelog

* Merge pull request #1996 from fredroy/optim_ldl_insimo

[SofaSparseSolver] SparseLDLSolver optimizations

* [CMake] ADD option to enable/disable compatibility layer (#2216)

* [CMake] CLEAN/FIX deprecated things (MSVC mainly) (#2217)

* msvc: re-enable deprecated warnings for Sofa modules

* msvc: disable deprecated warnings for external projects

* msvc: use Sleep instead of deprecated _sleep

* unique() for shared_ptr is deprecated (https://en.cppreference.com/w/cpp/memory/shared_ptr/unique)

* Update CMakeLists.txt

Co-authored-by: Guillaume Paran <guillaume.paran@sofa-framework.org>

* [Changelog] Update Changelog

* [SofaHelper] FIX PluginRepository order on Windows

* [SofaGuiQt] Remove RELOCATABLE attribute

* [All] Remove use of compatibility layer (#2179)

* re-enable warnings when using compat headers

* sofaframework compiles

* sofabase compiles

* sofagl compiles

* modules compiles

* gui compiles

* tests compiles

* image

* plugins

* linux, plugins...

* physicsapi, cuda

* remove more uses

* compiles without sofa.compat

* compiles without sofa.compat with plugins

* Fix headlessrecorder

* fix geomagic

* fix sofaassimp

* fix imagetoolbox

* Fix compilation crash with masses

* Update SofaKernel/modules/Sofa.GL/src/sofa/gl/BasicShapes.h

Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>

* restore compat in cmake

* fix compilation

* fix sparseldl

* [All] FIX deprecated includes "sofa/helper/ArgumentParser.h"

# Conflicts:
#	applications/projects/SofaFlowVR/Main.cpp
#	applications/projects/runSofa/Main.cpp
#	applications/tutorials/oneParticle/oneParticle.cpp

* [All] FIX deprecated includes "sofa/helper/ArgumentParser.h" (2)

Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>
Co-authored-by: Guillaume Paran <guillaume.paran@sofa-framework.org>

* [Changelog] Update Changelog

* [tools] Disable more plugins in postinstall scripts

* [All] FIX sofa::type::vector propagation

* [SofaSimpleFem] Fix rendering options in TetrahedronFEMFF (#2156)

* [SofaSimpleFem] Fix rendering options in TetrahedronFEMFF

* Add function checking if the value of computeVonMisesStress is valid

* minor fix warning in the meantime

* Update SofaKernel/modules/SofaSimpleFem/src/SofaSimpleFem/TetrahedronFEMForceField.inl

Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>

* Make isVonMisesStressRenderingOptionValid() function const

* [SofaSimpleFem] CLEAN von Mises Stress draw in TetrahedronFEMForceField

+ ADD showVonMisesStressPerElement Data in TetrahedronFEMForceField

* [SofaSimpleFem] FIX TetrahedronFEMForceField

* fix compilation

* [SofaSimpleFem] FIX TetrahedronFEMForceField::draw

* [SofaSimpleFem] Avoid segfault in TetrahedronFEMForceField with method SMALL

* [SofaSimpleFem] CLEAN message in TetrahedronFEMForceField::draw

* [SofaSimpleFem] CLEAN message in TetrahedronFEMForceField::draw (2)

Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>
Co-authored-by: Guillaume Paran <guillaume.paran@sofa-framework.org>
Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com>
Co-authored-by: Frederick Roy <frederick.roy@inria.fr>

* [Changelog] Update Changelog

* [SofaGuiCommon] FIX GuiDataRepository when used by python interpreter

* [All] Fix debug compilation (#2223)

* fix header in rigidtypes with gcc/clang and debug

* fix eulerianfluid with debug compilation

* [Changelog] Update Changelog

* [CMake] Bump version to 21.12.99

Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com>
Co-authored-by: Alex Bilger <alxbilger@users.noreply.github.com>
Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>
Co-authored-by: Frederick Roy <frederick.roy@inria.fr>
# Conflicts:
#	CMakeLists.txt
@fredroy fredroy deleted the fix_deprecated_things branch October 14, 2021 09:44
alxbilger pushed a commit to alxbilger/sofa that referenced this pull request Oct 27, 2023
* msvc: re-enable deprecated warnings for Sofa modules

* msvc: disable deprecated warnings for external projects

* msvc: use Sleep instead of deprecated _sleep

* unique() for shared_ptr is deprecated (https://en.cppreference.com/w/cpp/memory/shared_ptr/unique)

* Update CMakeLists.txt

Co-authored-by: Guillaume Paran <guillaume.paran@sofa-framework.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: clean Cleaning the code pr: do not squash To merge instead of squash a pull-request pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants