From 60fcf64007b984f5c32510641515dacc1811132f Mon Sep 17 00:00:00 2001 From: Dominique Belhachemi Date: Sun, 3 Jul 2022 09:43:47 +0200 Subject: CMake'ing sparskit =================================================================== Gbp-Pq: Name 50_all_changes.diff --- BLASSM/CMakeLists.txt | 9 ++++++ CMakeLists.txt | 76 ++++++++++++++++++++++++++++++++++++++++++++ FORMATS/CMakeLists.txt | 12 +++++++ INFO/CMakeLists.txt | 4 +++ INOUT/CMakeLists.txt | 10 ++++++ ITSOL/CMakeLists.txt | 11 +++++++ MATGEN/FDIF/CMakeLists.txt | 7 ++++ MATGEN/FEM/CMakeLists.txt | 4 +++ MATGEN/MISC/CMakeLists.txt | 11 +++++++ UNSUPP/MATEXP/CMakeLists.txt | 7 ++++ 10 files changed, 151 insertions(+) create mode 100644 BLASSM/CMakeLists.txt create mode 100644 CMakeLists.txt create mode 100644 FORMATS/CMakeLists.txt create mode 100644 INFO/CMakeLists.txt create mode 100644 INOUT/CMakeLists.txt create mode 100644 ITSOL/CMakeLists.txt create mode 100644 MATGEN/FDIF/CMakeLists.txt create mode 100644 MATGEN/FEM/CMakeLists.txt create mode 100644 MATGEN/MISC/CMakeLists.txt create mode 100644 UNSUPP/MATEXP/CMakeLists.txt diff --git a/BLASSM/CMakeLists.txt b/BLASSM/CMakeLists.txt new file mode 100644 index 0000000..1522e9f --- /dev/null +++ b/BLASSM/CMakeLists.txt @@ -0,0 +1,9 @@ +enable_language( Fortran ) + +set(CMAKE_Fortran_FLAGS "-g") + +add_executable(mvec.ex rmatvec.f ../MATGEN/FDIF/functns.f) +target_link_libraries (mvec.ex skit skit_helper blas) + +add_executable(tester.ex rmatvec.f ../MATGEN/FDIF/functns.f) +target_link_libraries (tester.ex skit) diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..d8ed8ef --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,76 @@ +cmake_minimum_required(VERSION 2.6) + +# Input directories must have CMakeLists.txt. +cmake_policy(SET CMP0014 NEW) + + +project (sparskit) + + +set(STATIC_LIBRARY_FLAGS "-rcv") +set(CMAKE_Fortran_FLAGS " -g -ffixed-line-length-none -ffree-line-length-none") +#set(CMAKE_Fortran_FLAGS " -c -g -Wall -ffixed-line-length-none -ffree-line-length-none") + +enable_language(Fortran) + + +# Create a library called "skit". +add_library (skit + BLASSM/blassm.f + BLASSM/matvec.f + FORMATS/formats.f + FORMATS/unary.f + INFO/infofun.f + INOUT/inout.f + ITSOL/ilut.f + ITSOL/iters.f + MATGEN/FDIF/genmat.f + MATGEN/FEM/elmtlib2.f + MATGEN/FEM/femgen.f + MATGEN/FEM/meshes.f + MATGEN/MISC/sobel.f + MATGEN/MISC/zlatev.f + ORDERINGS/ccn.f + ORDERINGS/color.f + ORDERINGS/dsepart.f +) + +SET_TARGET_PROPERTIES(skit PROPERTIES + LINKER_LANGUAGE Fortran + SOVERSION 2.0 + VERSION 2.0.0 +) + +install(TARGETS skit + RUNTIME DESTINATION bin COMPONENT RuntimeLibraries + LIBRARY DESTINATION lib COMPONENT RuntimeLibraries + ARCHIVE DESTINATION lib COMPONENT Development +) + + +OPTION(BUILD_TESTING "Enable this to perform testing of sparskit" ON) + +IF(BUILD_TESTING) + # non-library and unsupported objects + add_library (skit_helper + ITSOL/itaux.f + MATGEN/FDIF/functns.f + MATGEN/FEM/functns2.f + UNSUPP/BLAS1/blas1.f + UNSUPP/MATEXP/exppro.f + UNSUPP/MATEXP/phipro.f + UNSUPP/PLOTS/psgrd.f + UNSUPP/PLOTS/texgrid1.f + UNSUPP/PLOTS/texplt1.f + ) + add_subdirectory (BLASSM) + add_subdirectory (FORMATS) + add_subdirectory (INFO) + add_subdirectory (INOUT) + add_subdirectory (ITSOL) + add_subdirectory (MATGEN/FDIF) + add_subdirectory (MATGEN/FEM) + add_subdirectory (MATGEN/MISC) + add_subdirectory (UNSUPP/MATEXP) +ENDIF(BUILD_TESTING) + diff --git a/FORMATS/CMakeLists.txt b/FORMATS/CMakeLists.txt new file mode 100644 index 0000000..f21fe79 --- /dev/null +++ b/FORMATS/CMakeLists.txt @@ -0,0 +1,12 @@ +#enable_language( Fortran ) + +set(CMAKE_Fortran_FLAGS "-g") + +add_executable(un.ex chkun.f ../MATGEN/FDIF/functns.f) +target_link_libraries (un.ex skit) + +add_executable(chkfmt.ex chkfmt1.f ../MATGEN/FDIF/functns.f) +target_link_libraries (chkfmt.ex skit) + +add_executable(rvbr.ex rvbr.f ../MATGEN/FDIF/functns.f) +target_link_libraries (rvbr.ex skit) diff --git a/INFO/CMakeLists.txt b/INFO/CMakeLists.txt new file mode 100644 index 0000000..d387cfe --- /dev/null +++ b/INFO/CMakeLists.txt @@ -0,0 +1,4 @@ +set(CMAKE_Fortran_FLAGS "-g") + +add_executable(info1.ex rinfo1.f dinfo13.f) +target_link_libraries (info1.ex skit) diff --git a/INOUT/CMakeLists.txt b/INOUT/CMakeLists.txt new file mode 100644 index 0000000..0cab200 --- /dev/null +++ b/INOUT/CMakeLists.txt @@ -0,0 +1,10 @@ +set(CMAKE_Fortran_FLAGS "-g") + +add_executable(chk.ex chkio.f ../MATGEN/FDIF/functns.f) +target_link_libraries (chk.ex skit) + +add_executable(hb2ps.ex hb2ps.f) +target_link_libraries (hb2ps.ex skit) + +add_executable(hb2pic.ex hb2pic.f) +target_link_libraries (hb2pic.ex skit) diff --git a/ITSOL/CMakeLists.txt b/ITSOL/CMakeLists.txt new file mode 100644 index 0000000..c24991d --- /dev/null +++ b/ITSOL/CMakeLists.txt @@ -0,0 +1,11 @@ +set(CMAKE_Fortran_FLAGS "-g") + +add_executable(riters.ex riters.f iters.f ilut.f itaux.f ../UNSUPP/BLAS1/blas1.f) +target_link_libraries (riters.ex skit) + +add_executable(rilut.ex rilut.f ilut.f iters.f itaux.f ../UNSUPP/BLAS1/blas1.f) +target_link_libraries (rilut.ex skit) + +add_executable(riter2.ex riter2.f iters.f ilut.f itaux.f ../UNSUPP/BLAS1/blas1.f) +target_link_libraries (riter2.ex skit) + diff --git a/MATGEN/FDIF/CMakeLists.txt b/MATGEN/FDIF/CMakeLists.txt new file mode 100644 index 0000000..f4844cd --- /dev/null +++ b/MATGEN/FDIF/CMakeLists.txt @@ -0,0 +1,7 @@ +set(CMAKE_Fortran_FLAGS "-g") + +add_executable(gen5.ex rgen5pt.f functns.f) +target_link_libraries (gen5.ex skit) + +add_executable(genbl.ex rgenblk.f functns.f) +target_link_libraries (genbl.ex skit) diff --git a/MATGEN/FEM/CMakeLists.txt b/MATGEN/FEM/CMakeLists.txt new file mode 100644 index 0000000..7c875c8 --- /dev/null +++ b/MATGEN/FEM/CMakeLists.txt @@ -0,0 +1,4 @@ +set(CMAKE_Fortran_FLAGS "-g") + +add_executable(fem.ex convdif.f functns2.f ../../UNSUPP/PLOTS/psgrd.f ) +target_link_libraries (fem.ex skit) diff --git a/MATGEN/MISC/CMakeLists.txt b/MATGEN/MISC/CMakeLists.txt new file mode 100644 index 0000000..b7fc61b --- /dev/null +++ b/MATGEN/MISC/CMakeLists.txt @@ -0,0 +1,11 @@ +set(CMAKE_Fortran_FLAGS "-g") + +add_executable(sobel.ex rsobel.f) +target_link_libraries (sobel.ex skit) + +add_executable(zlatev.ex rzlatev.f) +target_link_libraries (zlatev.ex skit) + +add_executable(markov.ex markov.f) +target_link_libraries (markov.ex skit) + diff --git a/UNSUPP/MATEXP/CMakeLists.txt b/UNSUPP/MATEXP/CMakeLists.txt new file mode 100644 index 0000000..0458d5c --- /dev/null +++ b/UNSUPP/MATEXP/CMakeLists.txt @@ -0,0 +1,7 @@ +set(CMAKE_Fortran_FLAGS "-g") + +add_executable(exp.ex rexp.f exppro.f) +target_link_libraries (exp.ex skit) + +add_executable(phi.ex rphi.f phipro.f) +target_link_libraries (phi.ex skit) -- cgit v1.2.3