added content to the root dir CMake file
This commit is contained in:
parent
a9a60086b4
commit
ee16866263
|
@ -0,0 +1,40 @@
|
||||||
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
|
||||||
|
# Use the fancy version substitution
|
||||||
|
project(cmake-cmocka-template
|
||||||
|
VERSION 1.0
|
||||||
|
DESCRIPTION "template for cmake + cpputest"
|
||||||
|
LANGUAGES C CXX
|
||||||
|
)
|
||||||
|
enable_testing()
|
||||||
|
|
||||||
|
set(TARGET_GROUP production CACHE STRING "Group to build")
|
||||||
|
|
||||||
|
# For being able to used LSP
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
|
# Request C 11 standard features
|
||||||
|
set(CMAKE_C_STANDARD 17)
|
||||||
|
set(CMAKE_C_STANDARD_REQUIRED True)
|
||||||
|
set(CMAKE_C_FLAGS "-Wall -Werror -Wpedantic")
|
||||||
|
|
||||||
|
# SETUP THE CXX flags for .cpp
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||||
|
set(CMAKE_CXX_FLAGS "-Wall -Werror -Wpedantic")
|
||||||
|
|
||||||
|
|
||||||
|
if(MSVC OR MSYS OR MINGW)
|
||||||
|
message("### SETUP FOR WINDOWS ###")
|
||||||
|
add_definitions(-DWINDOWS)
|
||||||
|
else()
|
||||||
|
message("### SETUP FOR UNIX ###")
|
||||||
|
add_definitions(-DUNIX)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(src)
|
||||||
|
|
||||||
|
# #######################################
|
||||||
|
# PROJECT SPECIFIC
|
||||||
|
# #######################################
|
||||||
|
|
Loading…
Reference in New Issue