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

Changes the build system to CMake #56

Merged
merged 24 commits into from
Jan 17, 2024
Merged

Changes the build system to CMake #56

merged 24 commits into from
Jan 17, 2024

Conversation

ilumsden
Copy link
Collaborator

Since @hariharan-devarajan mentioned that we wanted to do this and since I had some free time on the flight to SC, I just went ahead and started implementing a CMake-based build system for DYAD.

As of now, this PR just implements a drop-in replacement for autotools. It does not restructure the code base, add any major changes to the code, etc.

In case anyone else wants to contribute to this, I put the branch directly on this repo (as opposed to a fork).

@ilumsden ilumsden added the enhancement New feature or request label Nov 13, 2023
@ilumsden ilumsden self-assigned this Nov 13, 2023
@hariharan-devarajan
Copy link
Collaborator

@ilumsden I will be looking into this actively. I will look at your branch and continue this work from here.

@hariharan-devarajan hariharan-devarajan force-pushed the cmake_refactor branch 3 times, most recently from 43d1df3 to b9c6f46 Compare November 23, 2023 04:16
@hariharan-devarajan hariharan-devarajan force-pushed the cmake_refactor branch 2 times, most recently from 6fb16f4 to 5887ade Compare November 23, 2023 04:51
@hariharan-devarajan hariharan-devarajan marked this pull request as ready for review November 23, 2023 04:56
@hariharan-devarajan hariharan-devarajan force-pushed the cmake_refactor branch 2 times, most recently from 9037361 to b6fa11e Compare November 23, 2023 05:15
@hariharan-devarajan
Copy link
Collaborator

hariharan-devarajan commented Nov 23, 2023

Did the following changes.

  • Enabled CMake based Build
  • Disabled Python test as its hanging.

@hariharan-devarajan hariharan-devarajan force-pushed the cmake_refactor branch 2 times, most recently from 623b3f3 to 377313f Compare December 1, 2023 07:03
@hariharan-devarajan
Copy link
Collaborator

@JaeseungYeom I fixed all the changes we talked about. Let me know if u think i should change anything else.

src/dyad/core/CMakeLists.txt Outdated Show resolved Hide resolved
src/dyad/dtl/CMakeLists.txt Show resolved Hide resolved
src/dyad/core/CMakeLists.txt Outdated Show resolved Hide resolved
src/dyad/modules/CMakeLists.txt Outdated Show resolved Hide resolved
1. Removed dyad_code from public headers
2. used PROJECT_NAME variable for all code
3. prefixed PROJECT_NAME for util code to avoid conflicts
@JaeseungYeom
Copy link
Contributor

Usually when I forgot to specify CMAKE_INSTALL_PREFIX with cmake command, I still make it work by editing the variable in cmake_install.cmake that is generated under build directory. However, I see INSTALL DESTINATION is fixed rather than depending on CMAKE_INSTALL_PREFIX. Can this behavior changed?

@JaeseungYeom
Copy link
Contributor

Also, can you confirm the python test is working?

@hariharan-devarajan
Copy link
Collaborator

Usually when I forgot to specify CMAKE_INSTALL_PREFIX with cmake command, I still make it work by editing the variable in cmake_install.cmake that is generated under build directory. However, I see INSTALL DESTINATION is fixed rather than depending on CMAKE_INSTALL_PREFIX. Can this behavior changed?

I fixed it can u check it?

…ctor

� Conflicts:
�	.github/workflows/compile_test.yaml
@hariharan-devarajan
Copy link
Collaborator

Also, can you confirm the python test is working?

It is working locally but not on CI.

@JaeseungYeom
Copy link
Contributor

Usually when I forgot to specify CMAKE_INSTALL_PREFIX with cmake command, I still make it work by editing the variable in cmake_install.cmake that is generated under build directory. However, I see INSTALL DESTINATION is fixed rather than depending on CMAKE_INSTALL_PREFIX. Can this behavior changed?

I fixed it can u check it?

Yes. It works.

@JaeseungYeom
Copy link
Contributor

Should python binding be installed as well?

@hariharan-devarajan
Copy link
Collaborator

hariharan-devarajan commented Jan 17, 2024

Should python binding be installed as well?

Generally it's done the other way around where we install cmake project from pip. I can show u an example with that and discuss the changes in a different pr

@JaeseungYeom JaeseungYeom mentioned this pull request Jan 17, 2024
CMakeLists.txt Outdated
set_property(CACHE DYAD_CONTROL_PLANE PROPERTY STRINGS FLUX_RPC)
set(DYAD_DATA_PLANE "FLUX_RPC" CACHE STRING "Protocol to use for DYAD's Data Plane")
set_property(CACHE DYAD_DATA_PLANE PROPERTY STRINGS FLUX_RPC UCX)
set(DYAD_PROFILER "NONE" CACHE STRING "Protocol to use for DYAD's Data Plane")
Copy link
Contributor

Choose a reason for hiding this comment

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

description of the option is irrelevant.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Fixed

CMakeLists.txt Outdated
#------------------------------------------------------------------------------
# Build Type based configurations
#------------------------------------------------------------------------------
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -std=c99)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should just use the consistent standard with c++

Copy link
Collaborator

Choose a reason for hiding this comment

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

when i switch the code to c++ we can move that right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

FIXED

@JaeseungYeom JaeseungYeom merged commit b086558 into main Jan 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants