[med-svn] [Git][med-team/sofa-framework][master] Lots of changes in cmake config need to be done - this is just a very rough...

Andreas Tille gitlab at salsa.debian.org
Thu Sep 12 08:28:02 BST 2019



Andreas Tille pushed to branch master at Debian Med / sofa-framework


Commits:
e6e310e4 by Andreas Tille at 2019-09-12T07:27:10Z
Lots of changes in cmake config need to be done - this is just a very rough start which is not working at all

- - - - -


3 changed files:

- − debian/patches/pthreads.patch
- debian/patches/series
- debian/patches/use_debian_packaged_libs.patch


Changes:

=====================================
debian/patches/pthreads.patch deleted
=====================================
@@ -1,44 +0,0 @@
---- a/SofaKernel/cmake/Modules/FindThreads.cmake
-+++ b/SofaKernel/cmake/Modules/FindThreads.cmake
-@@ -125,36 +125,12 @@ ELSE()
-         # We have pthread.h
-         # Let's check for the library now.
-         #
--        SET(CMAKE_HAVE_THREADS_LIBRARY)
--        IF(NOT THREADS_HAVE_PTHREAD_ARG)
--
--            # Do we have -lpthreads
--            CHECK_LIBRARY_EXISTS(pthreads pthread_create "" CMAKE_HAVE_PTHREADS_CREATE)
--            IF(CMAKE_HAVE_PTHREADS_CREATE)
--                SET(CMAKE_THREAD_LIBS_INIT "-lpthreads")
--                SET(CMAKE_HAVE_THREADS_LIBRARY 1)
--                SET(Threads_FOUND TRUE)
--            ENDIF()
--
--            # Ok, how about -lpthread
--            CHECK_LIBRARY_EXISTS(pthread pthread_create "" CMAKE_HAVE_PTHREAD_CREATE)
--            IF(CMAKE_HAVE_PTHREAD_CREATE)
--                SET(CMAKE_THREAD_LIBS_INIT "-lpthread")
--                SET(Threads_FOUND TRUE)
--                SET(CMAKE_HAVE_THREADS_LIBRARY 1)
--            ENDIF()
-+	# --> https://stackoverflow.com/questions/1620918/cmake-and-libpthread
-+	set(THREADS_PREFER_PTHREAD_FLAG ON)
-+	find_package(Threads REQUIRED)
-+	# target_link_libraries(my_app Threads::Threads)
- 
--            IF(CMAKE_SYSTEM MATCHES "SunOS.*")
--                # On sun also check for -lthread
--                CHECK_LIBRARY_EXISTS(thread thr_create "" CMAKE_HAVE_THR_CREATE)
--                IF(CMAKE_HAVE_THR_CREATE)
--                    SET(CMAKE_THREAD_LIBS_INIT "-lthread")
--                    SET(CMAKE_HAVE_THREADS_LIBRARY 1)
--                    SET(Threads_FOUND TRUE)
--                ENDIF()
--            ENDIF(CMAKE_SYSTEM MATCHES "SunOS.*")
--
--        ENDIF(NOT THREADS_HAVE_PTHREAD_ARG)
-+        SET(CMAKE_HAVE_THREADS_LIBRARY)
- 
-         IF(NOT CMAKE_HAVE_THREADS_LIBRARY)
-             # If we did not found -lpthread, -lpthread, or -lthread, look for -pthread


=====================================
debian/patches/series
=====================================
@@ -1,2 +1 @@
-pthreads.patch
 use_debian_packaged_libs.patch


=====================================
debian/patches/use_debian_packaged_libs.patch
=====================================
@@ -4,7 +4,7 @@ Description: Use Debian packaged libs
 
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -138,7 +138,6 @@ option(SOFA_BUILD_TESTS "Compile the aut
+@@ -158,7 +158,6 @@ option(SOFA_BUILD_TESTS "Compile the aut
  if(SOFA_BUILD_TESTS)
      # Enable testing features of cmake, like the add_test() command.
      enable_testing()
@@ -14,7 +14,7 @@ Description: Use Debian packaged libs
  ## Active or not the use of ccache
 --- a/extlibs/CMakeLists.txt
 +++ b/extlibs/CMakeLists.txt
-@@ -1,24 +1,10 @@
+@@ -1,33 +1,5 @@
  cmake_minimum_required(VERSION 3.1)
  
 -set(EXTLIBS_TARGETS
@@ -23,19 +23,28 @@ Description: Use Debian packaged libs
 -    tinyxml
 -)
 -
- ## Necessary ones
--add_subdirectory(SuiteSparse)
--add_subdirectory(csparse)
--add_subdirectory(${SOFA_KERNEL_SOURCE_DIR}/extlibs/eigen-3.2.7 eigen)
--add_subdirectory(${SOFA_KERNEL_SOURCE_DIR}/extlibs/newmat newmat)
--add_subdirectory(${SOFA_KERNEL_SOURCE_DIR}/extlibs/tinyxml tinyxml)
--add_subdirectory(${SOFA_KERNEL_SOURCE_DIR}/extlibs/json json)
+-######## SofaKernel/extlibs ########
 -
+-# Eigen (header-only): see SofaKernel/cmake/Modules/FindEigen3.cmake
+-set(EIGEN_ROOT "${SOFA_KERNEL_SOURCE_DIR}/extlibs/eigen-3.2.7" CACHE PATH "Eigen directory (containing Eigen/src/...)")
+-mark_as_advanced(EIGEN_ROOT)
+-
+-# Nlohmann JSON (header-only): see SofaKernel/cmake/Modules/FindJson.cmake
+-set(JSON_ROOT "${SOFA_KERNEL_SOURCE_DIR}/extlibs/json" CACHE PATH "Nlohmann JSON directory")
+-mark_as_advanced(JSON_ROOT)
+-
+-# Newmat
+-find_package(Newmat QUIET)
+-if(NOT Newmat_FOUND)
+-    add_subdirectory(${SOFA_KERNEL_SOURCE_DIR}/extlibs/newmat newmat)
+-endif()
+-
+-# TinyXML
+-find_package(TinyXML QUIET)
+-if(NOT TinyXML_FOUND)
+-    add_subdirectory(${SOFA_KERNEL_SOURCE_DIR}/extlibs/tinyxml tinyxml)
+-endif()
+-
+ ####################################
  
- ## Optional ones
- if (SOFAGUI_ENABLE_QWT)
-     message("Qwt activated")
--    add_subdirectory(qwt-6.1.2/src qwt)
- endif()
- 
- option(SOFA_BUILD_MINIFLOWVR "Build the miniFlowVR library distributed in the extlibs/ directory." OFF)
+ ## Necessary ones



View it on GitLab: https://salsa.debian.org/med-team/sofa-framework/commit/e6e310e4e88b43cd9c764f54afa64e3bf18fcc0d

-- 
View it on GitLab: https://salsa.debian.org/med-team/sofa-framework/commit/e6e310e4e88b43cd9c764f54afa64e3bf18fcc0d
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190912/b8d36cfb/attachment-0001.html>


More information about the debian-med-commit mailing list