aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-03-30 11:32:26 +0200
committerEgor Tensin <egor@tensin.name>2026-03-30 11:34:43 +0200
commit00333c785ab02c7010c2e07981d5d792c218c9ee (patch)
treeca7a6b1a8a44df52b2273cfdf63853727ef74bf6
parentremove some dead code (diff)
downloadcmake-common-00333c785ab02c7010c2e07981d5d792c218c9ee.tar.gz
cmake-common-00333c785ab02c7010c2e07981d5d792c218c9ee.zip
remove examples "dynamic" & "static"
To be specific the "dynamic" example is the new "simple". I don't need 3 basic example projects, one is enough.
Diffstat (limited to '')
-rw-r--r--.github/workflows/example_toolsets.yml30
-rw-r--r--examples/dynamic/CMakeLists.txt11
-rw-r--r--examples/dynamic/foo.cpp9
-rw-r--r--examples/simple/CMakeLists.txt6
-rw-r--r--examples/simple/baz.cpp (renamed from examples/dynamic/baz.cpp)0
-rw-r--r--examples/simple/baz.hpp (renamed from examples/dynamic/baz.hpp)0
-rw-r--r--examples/simple/foo.cpp3
-rw-r--r--examples/static/CMakeLists.txt11
-rw-r--r--examples/static/bar.cpp7
-rw-r--r--examples/static/bar.hpp3
-rw-r--r--examples/static/foo.cpp9
11 files changed, 26 insertions, 63 deletions
diff --git a/.github/workflows/example_toolsets.yml b/.github/workflows/example_toolsets.yml
index d8e58aa..94ca380 100644
--- a/.github/workflows/example_toolsets.yml
+++ b/.github/workflows/example_toolsets.yml
@@ -14,7 +14,7 @@ jobs:
build:
strategy:
matrix:
- example: [simple, static, dynamic]
+ example: [simple]
toolset: [auto, clang, clang-cl, gcc, mingw, msvc]
os: [ubuntu-latest, windows-2022, windows-2025]
@@ -24,25 +24,31 @@ jobs:
- {os: windows-2025, name: Windows 2025}
- {os: ubuntu-latest, name: Ubuntu}
# Target platform.
- - {example: simple, platform: x64}
- - {example: static, platform: x86}
- - {example: dynamic, platform: x64}
+ - {os: windows-2022, platform: x86}
+ - {os: windows-2025, platform: x64}
+ - {os: ubuntu-latest, platform: x64}
# Configuration.
- - {example: simple, configuration: Release}
- - {example: static, configuration: Debug}
- - {example: dynamic, configuration: RelWithDebInfo}
+ - {os: windows-2022, configuration: Release}
+ - {os: windows-2025, configuration: Debug}
+ - {os: ubuntu-latest, configuration: RelWithDebInfo}
# Expected symbols.
- - example: simple
+ - os: windows-2022
symbols:
- target: foo
type: exe
symbols: []
- - example: static
+ - target: baz
+ type: dll
+ symbols: [baz]
+ - os: windows-2025
symbols:
- target: foo
type: exe
- symbols: [main, bar]
- - example: dynamic
+ symbols: [main]
+ - target: baz
+ type: dll
+ symbols: [baz]
+ - os: ubuntu-latest
symbols:
- target: foo
type: exe
@@ -57,7 +63,7 @@ jobs:
runs-on: '${{ matrix.os }}'
- name: '${{ matrix.example }} / ${{ matrix.toolset }} / ${{ matrix.name }}'
+ name: '${{ matrix.toolset }} / ${{ matrix.name }}'
defaults:
run:
diff --git a/examples/dynamic/CMakeLists.txt b/examples/dynamic/CMakeLists.txt
deleted file mode 100644
index 7c35f2e..0000000
--- a/examples/dynamic/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-cmake_minimum_required(VERSION 3.15)
-
-project(example_dynamic)
-
-add_library(baz SHARED baz.cpp)
-target_include_directories(baz PUBLIC .)
-
-add_executable(foo foo.cpp)
-target_link_libraries(foo PRIVATE baz)
-
-install(TARGETS foo baz RUNTIME DESTINATION bin LIBRARY DESTINATION lib)
diff --git a/examples/dynamic/foo.cpp b/examples/dynamic/foo.cpp
deleted file mode 100644
index 7e928e1..0000000
--- a/examples/dynamic/foo.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <baz.hpp>
-
-#include <iostream>
-
-int main() {
- std::cout << "foo\n";
- baz();
- return 0;
-}
diff --git a/examples/simple/CMakeLists.txt b/examples/simple/CMakeLists.txt
index f2ba4d4..50a588b 100644
--- a/examples/simple/CMakeLists.txt
+++ b/examples/simple/CMakeLists.txt
@@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.15)
project(example_simple)
+add_library(baz SHARED baz.cpp)
+target_include_directories(baz PUBLIC .)
+
add_executable(foo foo.cpp)
+target_link_libraries(foo PRIVATE baz)
-install(TARGETS foo RUNTIME DESTINATION bin)
+install(TARGETS foo baz RUNTIME DESTINATION bin LIBRARY DESTINATION lib)
diff --git a/examples/dynamic/baz.cpp b/examples/simple/baz.cpp
index d108ae3..d108ae3 100644
--- a/examples/dynamic/baz.cpp
+++ b/examples/simple/baz.cpp
diff --git a/examples/dynamic/baz.hpp b/examples/simple/baz.hpp
index 2fc9b2a..2fc9b2a 100644
--- a/examples/dynamic/baz.hpp
+++ b/examples/simple/baz.hpp
diff --git a/examples/simple/foo.cpp b/examples/simple/foo.cpp
index b9d3132..7e928e1 100644
--- a/examples/simple/foo.cpp
+++ b/examples/simple/foo.cpp
@@ -1,6 +1,9 @@
+#include <baz.hpp>
+
#include <iostream>
int main() {
std::cout << "foo\n";
+ baz();
return 0;
}
diff --git a/examples/static/CMakeLists.txt b/examples/static/CMakeLists.txt
deleted file mode 100644
index c3ebbe4..0000000
--- a/examples/static/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-cmake_minimum_required(VERSION 3.15)
-
-project(example_static)
-
-add_library(bar bar.cpp)
-target_include_directories(bar PUBLIC .)
-
-add_executable(foo foo.cpp)
-target_link_libraries(foo PRIVATE bar)
-
-install(TARGETS foo bar RUNTIME DESTINATION bin ARCHIVE DESTINATION lib)
diff --git a/examples/static/bar.cpp b/examples/static/bar.cpp
deleted file mode 100644
index 37aa9b5..0000000
--- a/examples/static/bar.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "bar.hpp"
-
-#include <iostream>
-
-void bar() {
- std::cout << "bar\n";
-}
diff --git a/examples/static/bar.hpp b/examples/static/bar.hpp
deleted file mode 100644
index a3ea4c1..0000000
--- a/examples/static/bar.hpp
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once
-
-void bar();
diff --git a/examples/static/foo.cpp b/examples/static/foo.cpp
deleted file mode 100644
index 34cd82e..0000000
--- a/examples/static/foo.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <bar.hpp>
-
-#include <iostream>
-
-int main() {
- std::cout << "foo\n";
- bar();
- return 0;
-}