A set of cmake plugins for C/C++ building.
Ease your cmake configure setup. e.g.
cmake -P rocsetup.cmake -p vs2022 -a x64
Will parse and then run:
cmake -S . -B build -G "Visual Studio 17 2022" -A x64
Enable Address Sanitizer globally in your CMake-based project, by download asan.cmake and only add one line in CMakeLists.txt
include(asan.cmake)
Support many compiler platforms:
- GCC/Linux/Android NDK
- VS2019
- VS2022
Enable ThreadSanitizer globally in your CMake-based project, by download tsan.cmake and only add one line in CMakeLists.txt
include(tsan.cmake)
Treat 30+ severe C/C++ warnings as errors, by download overlook.cmake and only add one line in CMakeLists.txt
include(overlook.cmake)
Get a summary message for your current build, including global stuffs and list each target, by download summary.cmake and only add one line in CMakeLists.txt
include(summary.cmake)
When you write unicode chars (e.g. Chinese characters) in utf-8 encoding source files (.c/.cpp/.h/.hpp), and your command prompt use encodings like /cp936
(due to OS language), it prints garbage. You may avoid that by specify encoding for source files and execution, separately.
Here is the tool you can use, just download msvc_utf8_encoding.cmake (and also QueryCodePage.py if your cmake < 3.24), and only add one line in CMakeLists.txt
include(msvc_utf8_encoding.cmake)
Switch to MT/MTd globally, by download msvc_static_crt.cmake and only add one line in CMakeLists.txt
include(msvc_static_crt.cmake)