Skip to content

Commit

Permalink
[CMake] CLEAN/FIX deprecated things (MSVC mainly) (sofa-framework#2217)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
fredroy and guparan authored Jul 1, 2021
1 parent 49fa63d commit e2bec8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/SofaSparseSolver/extlibs/csparse/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ add_library(${PROJECT_NAME} STATIC ${HEADER_FILES} ${SOURCE_FILES})
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC "$<INSTALL_INTERFACE:include/extlibs/CSparse>")

if(WIN32)
# remove warnings about deprecation (CRT,etc)
target_compile_options(${PROJECT_NAME} PRIVATE "/wd4996")
endif()

sofa_create_package_with_targets(
PACKAGE_NAME CSparse
PACKAGE_VERSION ${PROJECT_VERSION}
Expand Down

0 comments on commit e2bec8c

Please sign in to comment.