diff --git a/examples/ex001-HelloWorld/CMakeLists.txt b/examples/ex001-HelloWorld/CMakeLists.txt index 4d5dab2..b3d7a41 100644 --- a/examples/ex001-HelloWorld/CMakeLists.txt +++ b/examples/ex001-HelloWorld/CMakeLists.txt @@ -5,6 +5,11 @@ project(ex001-HelloWorld) set(CMAKE_MACOSX_RPATH 1) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}/deps") +# C++ standard +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CXX_EXTENSIONS OFF) + # julia is used to retrieve the CxxWrap library paths find_program(JULIA julia REQUIRED) diff --git a/examples/ex001-HelloWorld/Makefile b/examples/ex001-HelloWorld/Makefile index 2b35ac6..be99dc4 100644 --- a/examples/ex001-HelloWorld/Makefile +++ b/examples/ex001-HelloWorld/Makefile @@ -20,7 +20,7 @@ else CXXWRAP_PREFIX=$(shell mkdir -p $(BUILD_DIR); julia --project=$(BUILD_DIR) -e "import Pkg; Pkg.add(name=\"CxxWrap\", version=\"$(CXXWRAP_VERSION)\"); Pkg.resolve(); import CxxWrap; print(CxxWrap.prefix_path())") endif -CXXWRAP_CPPFLAGS=-I $(CXXWRAP_PREFIX)/include -I . --std=c++17 +CXXWRAP_CPPFLAGS=-I $(CXXWRAP_PREFIX)/include -I . --std=c++20 LDLIBS +=-L $(CXXWRAP_PREFIX)/lib -lcxxwrap_julia -lcxxwrap_julia_stl CXXFLAGS += -Wno-unused-variable -Wno-unused-but-set-variable