From 3db4cd72e0786776ee8923e012550cecda981caa Mon Sep 17 00:00:00 2001 From: scivision Date: Wed, 1 Nov 2023 15:10:47 -0400 Subject: [PATCH] FindSC.cmake was never used by the CMake package, it was always superflous, so delete it --- CMakeLists.txt | 4 --- cmake/FindSC.cmake | 86 ---------------------------------------------- 2 files changed, 90 deletions(-) delete mode 100644 cmake/FindSC.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f64fe38..f1318bcb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,10 +80,6 @@ endif(BUILD_TESTING) # --- packaging -install(FILES -${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindSC.cmake -DESTINATION cmake) - include(cmake/pkgconf.cmake) include(cmake/install.cmake) diff --git a/cmake/FindSC.cmake b/cmake/FindSC.cmake deleted file mode 100644 index 0e5631fa..00000000 --- a/cmake/FindSC.cmake +++ /dev/null @@ -1,86 +0,0 @@ -# FindSC.cmake -# --------------- -# -# Find libsc library -# -# Result Variables -# ---------------- -# -# This module defines the following variables:: -# -# SC_FOUND -# SC_INCLUDE_DIRS - include directories for libsc -# SC_LIBRARIES - link against this library to use libsc -# -# Imported Targets -# ^^^^^^^^^^^^^^^^ -# SC::SC - - -find_path (SC_INCLUDE_DIR -NAMES sc.h -DOC "libsc header" -) - -find_library (SC_LIBRARY -NAMES sc -DOC "libsc library" -) - -if(SC_LIBRARY AND SC_INCLUDE_DIR) - find_file(SC_CONFIG_H - NAMES sc_config.h - NO_DEFAULT_PATH - HINTS ${SC_INCLUDE_DIR} - ) -endif() - -if(SC_CONFIG_H) - set(SC_mpi_ok true) - - # check if libsc was configured in compatible way - include(CheckSymbolExists) - set(CMAKE_REQUIRED_FLAGS) - set(CMAKE_REQUIRED_INCLUDES) - set(CMAKE_REQUIRED_LIBRARIES) - - # libsc and current project must both be compiled with/without MPI - check_symbol_exists(SC_ENABLE_MPI ${SC_CONFIG_H} SC_has_mpi) - check_symbol_exists(SC_ENABLE_MPIIO ${SC_CONFIG_H} SC_has_mpi_io) - check_symbol_exists(SC_HAVE_JSON ${SC_CONFIG_H} SC_have_json) - check_symbol_exists(SC_ENABLE_DEBUG ${SC_CONFIG_H} SC_debug_build) - - if(MPI_C_FOUND) - # a sign the current project is using MPI - if(NOT (SC_has_mpi AND SC_has_mpi_io)) - set(SC_mpi_ok false) - endif() - else() - if(SC_has_mpi OR SC_has_mpi_io) - set(SC_mpi_ok false) - endif() - endif() - -endif() - - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args (SC -REQUIRED_VARS SC_LIBRARY SC_INCLUDE_DIR SC_mpi_ok -) - -if(SC_FOUND) - -set(SC_INCLUDE_DIRS ${SC_INCLUDE_DIR}) -set(SC_LIBRARIES ${SC_LIBRARY}) - -if(NOT TARGET SC::SC) - add_library(SC::SC INTERFACE IMPORTED) - - set_property(TARGET SC::SC PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${SC_INCLUDE_DIR}") - set_property(TARGET SC::SC PROPERTY INTERFACE_LINK_LIBRARIES "${SC_LIBRARY}") -endif() - -endif(SC_FOUND) - -mark_as_advanced(SC_INCLUDE_DIR SC_LIBRARY SC_has_mpi SC_has_mpi_io SC_debug_build SC_have_json)