Skip to content

Commit

Permalink
(actually) fix broken MS2022 behavior
Browse files Browse the repository at this point in the history
a recent Visual Studio update introduced an error unless there is a
CMakePresets.json file present, completely blowing up the previous
setup.

after this commit, you should either delete the CMakeUserPresets.json
file from your root or add it to your system - NOT repo! - excludesFile:
https://stackoverflow.com/questions/7335420/global-git-ignore
  • Loading branch information
majcosta committed Dec 9, 2024
1 parent 2424066 commit 98cdffe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
/.vs/
/build/
/out/
/CMakePresets.json
/CMakeSettings.json
/CMakeUserPresets.json
/lib/
4 changes: 2 additions & 2 deletions cmake/CopyUserPresetTemplate.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function(CopyUserPresetTemplate)
NOT EXISTS "${CMAKE_SOURCE_DIR}/CMakePresets.json" AND
NOT EXISTS "${CMAKE_SOURCE_DIR}/CMakeUserPresets.json"
)
file(COPY "${CMAKE_SOURCE_DIR}/cmake/presets/CMakeUserPresets.json" DESTINATION "${CMAKE_SOURCE_DIR}")
message(FATAL_ERROR "No existing preset was found, copied a preset template to ${CMAKE_SOURCE_DIR}/CMakeUserPresets.json.")
file(COPY "${CMAKE_SOURCE_DIR}/cmake/presets/CMakePresets.json" DESTINATION "${CMAKE_SOURCE_DIR}")
message(FATAL_ERROR "No existing preset was found, copied a preset template to ${CMAKE_SOURCE_DIR}/CMakePresets.json.")
endif()
endfunction()
File renamed without changes.

0 comments on commit 98cdffe

Please sign in to comment.