Skip to content
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

[dalgona] Support ubuntu 24.04 #14204

Merged
merged 1 commit into from
Oct 13, 2024
Merged
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
44 changes: 35 additions & 9 deletions compiler/dalgona/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,44 @@
# Ubuntu18.04; explictly installed python3.8 (default is python3.6)
# Ubuntu20.04; default python3.8
# Ubuntu22.04; default python3.10
# Ubuntu24.04; explictly installed python3.8 (default is python3.12)
# refer https://github.com/Samsung/ONE/issues/9962
find_package(PythonInterp 3.8 QUIET)
find_package(PythonLibs 3.8 QUIET)
if(CMAKE_VERSION VERSION_LESS 3.12)
Copy link
Contributor

@jinevening jinevening Oct 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For review) cmake versions for Ubuntu

image

find_package(PythonInterp 3.8 QUIET)
find_package(PythonLibs 3.8 QUIET)

if(NOT ${PYTHONINTERP_FOUND})
message(STATUS "Build dalgona: FAILED (Python3 is missing)")
return()
endif()
if(NOT ${PYTHONINTERP_FOUND})
message(STATUS "Build dalgona: FAILED (Python3 is missing)")
return()
endif()

if(${PYTHON_VERSION_MINOR} LESS 8)
message(STATUS "Build dalgona: FAILED (Install Python version higher than or equal to 3.8)")
return()
if(${PYTHON_VERSION_MINOR} LESS 8)
message(STATUS "Build dalgona: FAILED (Install Python version higher than or equal to 3.8)")
return()
endif()
else()
find_package(Python 3.8 EXACT COMPONENTS Development QUIET)
if(NOT Python_FOUND)
find_package(Python 3.8 COMPONENTS Development QUIET)
endif()

# Require same python version of common-artifacts
if(Python_VERSION VERSION_GREATER_EQUAL 3.12)
message(STATUS "Build dalgona: FALSE (Python version 3.12 or higher is not supported yet)")
return()
endif()
if(Python_VERSION VERSION_LESS 3.8)
message(STATUS "Build dalgona: FAILED (Install Python version 3.8 or 3.10)")
return()
endif()

if(NOT Python_Development_FOUND)
message(STATUS "Build dalgona: FAILED (Python3 development package is missing)")
return()
endif()

set(PYTHON_INCLUDE_DIRS ${Python_INCLUDE_DIRS})
set(PYTHON_LIBRARIES ${Python_LIBRARIES})
endif()

nnas_find_package(Pybind11)
Expand Down