Skip to content

[irods/irods#7726,irods/irods#8330,irods/irods#8332] Migrate to system CMake, nlohmann-json, and spdlog (main) #236

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ endif()

find_package(OpenSSL REQUIRED COMPONENTS Crypto SSL)
find_package(nlohmann_json "3.6.1" REQUIRED)
find_package(fmt "8.1.1"
HINTS "${IRODS_EXTERNALS_FULLPATH_FMT}")
find_package(fmt "8.1.1")
find_package(Python 3 REQUIRED COMPONENTS Development)

set(
Expand Down
36 changes: 3 additions & 33 deletions irods_consortium_continuous_integration_build_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,10 @@

import irods_python_ci_utilities


def add_cmake_to_front_of_path():
cmake_path = '/opt/irods-externals/cmake3.21.4-0/bin'
os.environ['PATH'] = os.pathsep.join([cmake_path, os.environ['PATH']])

def is_system_cmake_newer_than_externals_cmake():
cmake_exe = shutil.which('cmake')
if cmake_exe is None:
return False

try:
cmake_ver_out = subprocess.check_output(['cmake', '--version']).decode('utf-8')
cmake_ver_line = cmake_ver_out.splitlines()[0]
cmake_ver_str = cmake_ver_line.split()[2]

from packaging import version
cmake_sys_ver = version.parse(cmake_ver_str)
cmake_ext_ver = version.parse('3.21.4')
return cmake_sys_ver > cmake_ext_ver

except:
return False

def install_building_dependencies(externals_directory):

use_system_cmake = is_system_cmake_newer_than_externals_cmake()

externals_list = ['irods-externals-boost1.81.0-2',
'irods-externals-clang16.0.6-0',
'irods-externals-json3.10.4-0']
if not use_system_cmake:
externals_list.append('irods-externals-cmake3.21.4-0')
'irods-externals-clang16.0.6-0']
if externals_directory == 'None' or externals_directory is None:
irods_python_ci_utilities.install_irods_core_dev_repository()
irods_python_ci_utilities.install_os_packages(externals_list)
Expand All @@ -53,15 +25,13 @@ def install_building_dependencies(externals_directory):
for irods_externals in externals_list:
externals.append(glob.glob(os.path.join(os_specific_directory, irods_externals + '*.{0}'.format(package_suffix)))[0])
irods_python_ci_utilities.install_os_packages_from_files(externals)
if not use_system_cmake:
add_cmake_to_front_of_path()
install_os_specific_dependencies()

def install_os_specific_dependencies_apt():
irods_python_ci_utilities.install_os_packages(['make', 'python3-dev', 'libssl-dev', 'gcc'])
irods_python_ci_utilities.install_os_packages(['cmake', 'make', 'python3-dev', 'libssl-dev', 'gcc'])

def install_os_specific_dependencies_yum():
irods_python_ci_utilities.install_os_packages(['make', 'gcc', 'python3-devel', 'openssl-devel'])
irods_python_ci_utilities.install_os_packages(['cmake', 'make', 'gcc', 'python3-devel', 'openssl-devel'])

def install_os_specific_dependencies():
dispatch_map = {
Expand Down