Initial Commit
* A simple C-Make project setup * A lot of warnings enabled and warnings as errors * unit test discovery with google test In progress functionality - sanitizers - static analysis
This commit is contained in:
30
CMakeLists.txt
Normal file
30
CMakeLists.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
cmake_minimum_required(VERSION 3.23)
|
||||
|
||||
# uncomment to enable vcpkg:
|
||||
# # Setup vcpkg - should be called before defining project()
|
||||
# run_vcpkg()
|
||||
|
||||
project(blank-slate VERSION 1.0.0)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED true)
|
||||
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
OPTION(ENABLE_TESTS "Enable Unit Tests" ON)
|
||||
OPTION(ENABLE_ALL_REASONABLE_WARNINGS "Enable all possible reasonable warnings" ON )
|
||||
OPTION(ENABLE_WARNINGS_AS_ERRORS "Warnings are treated as Errors" ON)
|
||||
OPTION(ENABLE_STATIC_ANALYSIS "Enable Static Analysis Tools" ON)
|
||||
OPTION(ENABLE_SANITIZERS "Enable Sanitizer Tools" ON)
|
||||
|
||||
include(scripts/compilerWarnings.cmake)
|
||||
include(scripts/sanitizers.cmake)
|
||||
include(scripts/staticanalysis.cmake)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
message("Unit Testing Enabled")
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
Reference in New Issue
Block a user