[buildcore] Upgrade to C++20 and fix conan setup to use project specific profile

This commit is contained in:
Gary Talent 2021-11-05 19:46:48 -05:00
parent d622ab380d
commit 15111078de
2 changed files with 6 additions and 4 deletions

View File

@ -11,7 +11,7 @@ set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/dist/${BUILDCORE_BUILD_CONFIG}")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_EXTENSIONS OFF)
# enable ccache # enable ccache

View File

@ -101,6 +101,7 @@ devenv-shell:
${ENV_RUN} bash ${ENV_RUN} bash
ifdef USE_VCPKG ifdef USE_VCPKG
.PHONY: vcpkg .PHONY: vcpkg
vcpkg: ${VCPKG_DIR} vcpkg-install vcpkg: ${VCPKG_DIR} vcpkg-install
@ -121,18 +122,19 @@ ifneq (${OS},windows)
else else
${VCPKG_DIR}/vcpkg install --triplet x64-windows ${VCPKG_PKGS} ${VCPKG_DIR}/vcpkg install --triplet x64-windows ${VCPKG_PKGS}
endif endif
else # USE_VCPKG
else # USE_VCPKG ################################################
.PHONY: setup-conan .PHONY: setup-conan
conan-config: conan-config:
conan profile new nostalgia --detect --force conan profile new ${PROJECT_NAME} --detect --force
ifeq ($(OS),linux) ifeq ($(OS),linux)
conan profile update settings.compiler.libcxx=libstdc++11 ${PROJECT_NAME} conan profile update settings.compiler.libcxx=libstdc++11 ${PROJECT_NAME}
endif endif
.PHONY: conan .PHONY: conan
conan: conan:
@mkdir -p .conanbuild && cd .conanbuild && conan install ../ --build=missing -pr=${PROJECT_NAME} @mkdir -p .conanbuild && cd .conanbuild && conan install ../ --build=missing -pr=${PROJECT_NAME}
endif # USE_VCPKG endif # USE_VCPKG ###############################################
.PHONY: configure-xcode .PHONY: configure-xcode
configure-xcode: configure-xcode: