forked from qt-creator/qt-creator
Clang: Add cmake project for tidy/clazy demo code
...as it's easier to generate a compile_commands.json with it as with qmake. Change-Id: I415b4d1d3d6d1d55c4d086c6dbbbca532c2c8669 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
22
share/qtcreator/cplusplus/examples/CMakeLists.txt
Normal file
22
share/qtcreator/cplusplus/examples/CMakeLists.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.5)
|
||||||
|
|
||||||
|
project(examples LANGUAGES CXX)
|
||||||
|
|
||||||
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
find_package(Qt5 COMPONENTS Widgets REQUIRED)
|
||||||
|
|
||||||
|
add_executable(examples
|
||||||
|
clazy_example.cpp
|
||||||
|
tidy_example.cpp
|
||||||
|
tidy_example.h
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(examples PRIVATE Qt5::Widgets)
|
Reference in New Issue
Block a user