diff --git a/CMakeLists.txt b/CMakeLists.txt index b263b91..cfd9226 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,6 @@ project(Stator include("${CMAKE_SOURCE_DIR}/cmake/Standards.cmake") add_subdirectory(isa) -add_subdirectory(compiler) -add_subdirectory(vm) -add_subdirectory(host) \ No newline at end of file +# add_subdirectory(compiler) +# add_subdirectory(vm) +# add_subdirectory(host) \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..e150da9 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,48 @@ +{ + "version": 3, + "cmakeMinimumRequired": { + "major": 3, + "minor": 21, + "patch": 0 + }, + "configurePresets": [ + { + "name": "gcc", + "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/${presetName}", + "cacheVariables": { + "CMAKE_C_COMPILER": "gcc", + "CMAKE_CXX_COMPILER": "g++" + } + }, + { + "name": "gcc-debug", + "displayName": "GCC Debug", + "description": "使用 PATH 中的 gcc / g++,Debug", + "inherits": "gcc", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "gcc-release", + "displayName": "GCC Release", + "description": "使用 PATH 中的 gcc / g++,Release", + "inherits": "gcc", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + } + ], + "buildPresets": [ + { + "name": "gcc-debug", + "configurePreset": "gcc-debug" + }, + { + "name": "gcc-release", + "configurePreset": "gcc-release" + } + ] +}