PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.27.5
Code Block Pro – Beautiful Syntax Highlighting v1.27.5
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / samples / cmake.sample

cmake.sample in Code Block Pro – Beautiful Syntax Highlighting 1.27.5, at build/shiki/samples/cmake.sample

36 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # Almost all CMake files should start with this
2 # You should always specify a range with the newest
3 # and oldest tested versions of CMake. This will ensure
4 # you pick up the best policies.
5 cmake_minimum_required(VERSION 3.1...3.23)
6
7 # This is your project statement. You should always list languages;
8 # Listing the version is nice here since it sets lots of useful variables
9 project(
10 ModernCMakeExample
11 VERSION 1.0
12 LANGUAGES CXX)
13
14 # If you set any CMAKE_ variables, that can go here.
15 # (But usually don't do this, except maybe for C++ standard)
16
17 # Find packages go here.
18
19 # You should usually split this into folders, but this is a simple example
20
21 # This is a "default" library, and will match the *** variable setting.
22 # Other common choices are STATIC, SHARED, and MODULE
23 # Including header files here helps IDEs but is not required.
24 # Output libname matches target name, with the usual extensions on your system
25 add_library(MyLibExample simple_lib.cpp simple_lib.hpp)
26
27 # Link each target with other targets or add options, etc.
28
29 # Adding something we can run - Output name matches target name
30 add_executable(MyExample simple_example.cpp)
31
32 # Make sure you link your targets with this command. It can also link libraries and
33 # even flags, so linking a target that does not exist will not give a configure-time error.
34 target_link_libraries(MyExample PRIVATE MyLibExample)
35
36 # From https://cliutils.gitlab.io/modern-cmake/chapters/basics/example.html