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

View File

@ -4,8 +4,7 @@ import os
parser = argparse.ArgumentParser()
parser.add_argument('--build_type')
parser.add_argument('--cppstd')
args = parser.parse_args()
print ('Executing post-create steps. Build type ', args.build_type, ' C++ standard ', args.cppstd)
os.system('conan install /workspaces/network-experiment -of /workspaces/network-experiment/build -s compiler.cppstd=' + args.cppstd + ' -s build_type=' + args.build_type)
print ('Executing post-create steps. 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(
TARGET ${PROJECT_NAME}
PROPERTY CXX_STANDARD 23
PROPERTY CXX_STANDARD 20
)
target_link_libraries(

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,7 +13,7 @@ add_executable(
set_property(
TARGET ${PROJECT_NAME}
PROPERTY CXX_STANDARD 23
PROPERTY CXX_STANDARD 20
)
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"
generators = "CMakeDeps"
build_policy = "*"
default_options = {
"boost/1.89.0:without_cobalt": True
}
def generate(self):
# 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
# Build type used by conan. "Debug" and "Release" are supported.
ARG BUILD_TYPE
ARG COMPILER_CPPSTD
ARG BUILD_TYPE=Debug
RUN mkdir -p /root/.local/bin
ENV PATH="${PATH}:/root/.local/bin"
@ -30,17 +29,18 @@ RUN apk add --no-cache \
python3 \
pipx && \
pipx ensurepath
RUN pipx install conan
RUN conan profile detect
RUN pipx install conan && \
conan profile detect
# 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..
RUN mkdir -p /workspaces/tmp
WORKDIR /workspaces/tmp
RUN touch CMakeLists.txt
ADD conanfile.py .
RUN conan install -s build_type=$BUILD_TYPE -s compiler.cppstd=$COMPILER_CPPSTD -b=*
RUN conan install -s build_type=${BUILD_TYPE} -b=* --requires=boost/1.89.0
RUN conan install -s build_type=${BUILD_TYPE} -b=* --requires=libmagic/5.45
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
RUN rm -rf tmp