diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 21efecfe..efdbba3f 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -23,7 +23,7 @@ "${workspaceRoot}" ], "limitSymbolsToIncludedHeaders": true, - "databaseFilename": "" + "databaseFilename": "${workspaceRoot}/build/current/compile_commands.json" }, "macFrameworkPath": [ "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks" diff --git a/.vscode/settings.json b/.vscode/settings.json index 6500d167..b1d67101 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,12 @@ "initializer_list": "cpp", "utility": "cpp", "__config": "cpp", - "__nullptr": "cpp" + "__nullptr": "cpp", + "__bit_reference": "cpp", + "__string": "cpp", + "algorithm": "cpp", + "string": "cpp", + "string_view": "cpp" }, "editor.insertSpaces": false, "editor.tabSize": 3, diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b2c79b2..d80aa50e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,17 @@ set(CMAKE_PREFIX_PATH ${NOSTALGIA_QT_PATH}) list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) include(address_sanitizer) +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + add_definitions( + -DDEBUG + ) +else() + add_definitions( + -Werror + -DNDEBUG + ) +endif() + if(NOSTALGIA_BUILD_TYPE STREQUAL "GBA") include(GBA) add_definitions( @@ -21,11 +32,9 @@ if(NOSTALGIA_BUILD_TYPE STREQUAL "GBA") -mthumb-interwork -mthumb ) - set(CMAKE_CXX_STANDARD 17) -else() - set(CMAKE_CXX_STANDARD 14) endif() +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/Makefile b/Makefile index d16a27f3..fbb24b42 100644 --- a/Makefile +++ b/Makefile @@ -2,12 +2,12 @@ OS=$(shell uname | tr [:upper:] [:lower:]) HOST_ENV=${OS}-$(shell uname -m) DEVENV=devenv$(shell pwd | sed 's/\//-/g') DEVENV_IMAGE=nostalgia-devenv -ifneq ($(shell which gmake),) +ifneq ($(shell which gmake 2> /dev/null),) MAKE=gmake -s else MAKE=make -s endif -ifneq ($(shell which docker),) +ifneq ($(shell which docker 2> /dev/null),) ifeq ($(shell docker inspect --format="{{.State.Status}}" ${DEVENV} 2>&1),running) ENV_RUN=docker exec -i -t --user $(shell id -u ${USER}) ${DEVENV} endif diff --git a/README.md b/README.md index 98275990..71ba58a4 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,4 @@ Run something along the lines of the following to let CMake know where Qt is installed. You may need to adjust this location. - export CMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.8.0_2/ + export NOSTALGIA_QT_PATH=/usr/local/Cellar/qt5/5.8.0_2/