Skip to content

Implementing support for cmake toolchain - #1

Open
eeliu with Copilot wants to merge 1 commit into
masterfrom
copilot/support-cmake-toolchain
Open

eeliu with Copilot wants to merge 1 commit into
masterfrom
copilot/support-cmake-toolchain

Conversation

Copilot AI commented Jun 18, 2026

Copy link
Copy Markdown

Pull request created by AI Agent

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds initial CMake build support for the repository, allowing the C++98 and C++11 variants to be built as separate executables from a top-level CMake project.

Changes:

  • Introduces a top-level CMakeLists.txt that builds both C-11/ and C-98/ subprojects.
  • Adds per-variant CMake targets (test_c11, test_c98) compiling test.cpp against the corresponding MemoryPool.h.
  • Updates the C++11 implementation to include <cstdint> (intended to support uintptr_t usage).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
CMakeLists.txt Adds a top-level CMake entry point that includes both language-standard subdirectories.
C-11/CMakeLists.txt Defines a C++11 test executable and its include paths / flags.
C-98/CMakeLists.txt Defines a C++98 test executable and its include paths / flags.
C-11/MemoryPool.tcc Adds <cstdint> include related to pointer-sized integer usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread C-11/CMakeLists.txt
@@ -0,0 +1,4 @@
add_executable(test_c11 ../test.cpp)
target_include_directories(test_c11 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR})
target_compile_options(test_c11 PRIVATE -O2)
Comment thread C-11/CMakeLists.txt
@@ -0,0 +1,4 @@
add_executable(test_c11 ../test.cpp)
target_include_directories(test_c11 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR})
Comment thread C-98/CMakeLists.txt
@@ -0,0 +1,4 @@
add_executable(test_c98 ../test.cpp)
target_include_directories(test_c98 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR})
target_compile_options(test_c98 PRIVATE -O2)
Comment thread C-98/CMakeLists.txt
@@ -0,0 +1,4 @@
add_executable(test_c98 ../test.cpp)
target_include_directories(test_c98 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR})
Comment thread C-11/MemoryPool.tcc
#ifndef MEMORY_BLOCK_TCC
#define MEMORY_BLOCK_TCC

#include <cstdint>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants