Compare commits

..

No commits in common. "c995d75c36c52eef12c65cd0c6de4ad984de9cb9" and "3f22f888d619f2e8657c7edc71facaeadcfbbf23" have entirely different histories.

12 changed files with 20 additions and 26 deletions

View File

@ -3,11 +3,10 @@
"build": { "build": {
"dockerfile": "../devcontainer.Dockerfile", "dockerfile": "../devcontainer.Dockerfile",
"args": { "args": {
"BUILD_TYPE": "Debug", "BUILD_TYPE": "Debug"
"COMPILER_CPPSTD": "23"
} }
}, },
"postCreateCommand": "${containerWorkspaceFolder}/.devcontainer/postcreate.py --build_type=Debug --cppstd=23", "postCreateCommand": "${containerWorkspaceFolder}/.devcontainer/postcreate.py --build_type=Debug",
// Configure tool-specific properties. // Configure tool-specific properties.
"customizations": { "customizations": {
"vscode": { "vscode": {
@ -15,7 +14,6 @@
"conan-extension.installArgs": [ "conan-extension.installArgs": [
"-of build", "-of build",
"-s build_type=Debug" "-s build_type=Debug"
"-s compiler.cppstd=23"
], ],
}, },
"extensions": [ "extensions": [

View File

@ -4,8 +4,7 @@ import os
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--build_type') parser.add_argument('--build_type')
parser.add_argument('--cppstd')
args = parser.parse_args() args = parser.parse_args()
print ('Executing post-create steps. Build type ', args.build_type, ' C++ standard ', args.cppstd) print ('Executing post-create steps. Build type ', args.build_type)
os.system('conan install /workspaces/network-experiment -of /workspaces/network-experiment/build -s compiler.cppstd=' + args.cppstd + ' -s build_type=' + args.build_type) os.system('conan install /workspaces/network-experiment -of /workspaces/build -s build_type=' + args.build_type)

View File

@ -11,7 +11,7 @@ add_executable(
set_property( set_property(
TARGET ${PROJECT_NAME} TARGET ${PROJECT_NAME}
PROPERTY CXX_STANDARD 23 PROPERTY CXX_STANDARD 20
) )
target_link_libraries( target_link_libraries(

View File

@ -10,7 +10,7 @@ add_executable(
set_property( set_property(
TARGET ${PROJECT_NAME} TARGET ${PROJECT_NAME}
PROPERTY CXX_STANDARD 23 PROPERTY CXX_STANDARD 20
) )
target_link_libraries( target_link_libraries(

View File

@ -12,7 +12,7 @@ add_library(
set_property( set_property(
TARGET ${PROJECT_NAME} TARGET ${PROJECT_NAME}
PROPERTY CXX_STANDARD 23 PROPERTY CXX_STANDARD 20
) )
target_include_directories( target_include_directories(

View File

@ -9,7 +9,7 @@ add_library(
set_property( set_property(
TARGET ${PROJECT_NAME} TARGET ${PROJECT_NAME}
PROPERTY CXX_STANDARD 23 PROPERTY CXX_STANDARD 20
) )
target_include_directories( target_include_directories(

View File

@ -11,7 +11,7 @@ add_executable(
set_property( set_property(
TARGET ${PROJECT_NAME} TARGET ${PROJECT_NAME}
PROPERTY CXX_STANDARD 23 PROPERTY CXX_STANDARD 20
) )
target_link_libraries( target_link_libraries(

View File

@ -11,7 +11,7 @@ add_library(
set_property( set_property(
TARGET ${PROJECT_NAME} TARGET ${PROJECT_NAME}
PROPERTY CXX_STANDARD 23 PROPERTY CXX_STANDARD 20
) )
target_include_directories( target_include_directories(

View File

@ -9,7 +9,7 @@ add_library(
set_property( set_property(
TARGET ${PROJECT_NAME} TARGET ${PROJECT_NAME}
PROPERTY CXX_STANDARD 23 PROPERTY CXX_STANDARD 20
) )
target_include_directories( target_include_directories(

View File

@ -13,7 +13,7 @@ add_executable(
set_property( set_property(
TARGET ${PROJECT_NAME} TARGET ${PROJECT_NAME}
PROPERTY CXX_STANDARD 23 PROPERTY CXX_STANDARD 20
) )
target_link_libraries( target_link_libraries(

View File

@ -8,9 +8,6 @@ class HelloConan(ConanFile):
requires = "boost/1.89.0", "gtest/1.14.0", "libmagic/5.45", "freetype/2.14.1", "libjpeg/9f" requires = "boost/1.89.0", "gtest/1.14.0", "libmagic/5.45", "freetype/2.14.1", "libjpeg/9f"
generators = "CMakeDeps" generators = "CMakeDeps"
build_policy = "*" build_policy = "*"
default_options = {
"boost/1.89.0:without_cobalt": True
}
def generate(self): def generate(self):
# We need to find the folder of libmagic and supply it to cmake so that # We need to find the folder of libmagic and supply it to cmake so that

View File

@ -1,8 +1,7 @@
FROM alpine:3.21.3 FROM alpine:3.21.3
# Build type used by conan. "Debug" and "Release" are supported. # Build type used by conan. "Debug" and "Release" are supported.
ARG BUILD_TYPE ARG BUILD_TYPE=Debug
ARG COMPILER_CPPSTD
RUN mkdir -p /root/.local/bin RUN mkdir -p /root/.local/bin
ENV PATH="${PATH}:/root/.local/bin" ENV PATH="${PATH}:/root/.local/bin"
@ -30,17 +29,18 @@ RUN apk add --no-cache \
python3 \ python3 \
pipx && \ pipx && \
pipx ensurepath pipx ensurepath
RUN pipx install conan RUN pipx install conan && \
RUN conan profile detect conan profile detect
# Pre-build some conan packages we require and take a lot of time to build. This to # Pre-build some conan packages we require and take a lot of time to build. This to
# avoid expensive rebuilding everytime we need a fresh dev container.. # avoid expensive rebuilding everytime we need a fresh dev container..
RUN mkdir -p /workspaces/tmp RUN mkdir -p /workspaces/tmp
WORKDIR /workspaces/tmp WORKDIR /workspaces/tmp
RUN touch CMakeLists.txt RUN conan install -s build_type=${BUILD_TYPE} -b=* --requires=boost/1.89.0
ADD conanfile.py . RUN conan install -s build_type=${BUILD_TYPE} -b=* --requires=libmagic/5.45
RUN conan install -s build_type=$BUILD_TYPE -s compiler.cppstd=$COMPILER_CPPSTD -b=* RUN conan install -s build_type=${BUILD_TYPE} -b=* --requires=freetype/2.14.1
RUN conan install -s build_type=${BUILD_TYPE} -b=missing --requires=gtest/1.14.0
RUN conan install -s build_type=${BUILD_TYPE} -b=missing --requires=libjpeg/9f
WORKDIR /workspaces WORKDIR /workspaces
RUN rm -rf tmp RUN rm -rf tmp