File tree Expand file tree Collapse file tree 4 files changed +23
-47
lines changed Expand file tree Collapse file tree 4 files changed +23
-47
lines changed Original file line number Diff line number Diff line change 77 - " **.cmake"
88 - " **/CMakeLists.txt"
99 - " .github/workflows/ci.yml"
10+ workflow_dispatch :
11+
12+ # avoid wasted runs
13+ concurrency :
14+ group : ${{ github.workflow }}-${{ github.ref }}
15+ cancel-in-progress : true
16+
1017
1118jobs :
1219
@@ -20,15 +27,16 @@ jobs:
2027 timeout-minutes : 5
2128
2229 steps :
23- - uses : actions/checkout@v4
30+ - &checkout
31+ uses : actions/checkout@v4
2432
25- - run : cmake --workflow --preset default
33+ - run : cmake --workflow default
2634
2735 windows_msvc :
2836 runs-on : windows-latest
2937 timeout-minutes : 5
3038
3139 steps :
32- - uses : actions/ checkout@v4
40+ - * checkout
3341
34- - run : cmake --workflow --preset msvc
42+ - run : cmake --workflow release
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.14...3.28)
1+ cmake_minimum_required (VERSION 3.16...4.1)
2+
3+ if (NOT CMAKE_BUILD_TYPE AND NOT DEFINED ENV{CMAKE_BUILD_TYPE })
4+ set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type" )
5+ endif ()
26
37project (GKlib LANGUAGES C
48VERSION 1.0.0
59)
610
711enable_testing ()
812
9- option (BUILD_TESTING "Build tests" ON )
13+ include (GNUInstallDirs)
14+
15+ option (BUILD_TESTING "Build tests" )
1016
11- option (BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF )
17+ option (BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" )
1218
1319if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND GKlib_IS_TOP_LEVEL)
1420 set (CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR} /local" CACHE PATH "install prefix" FORCE)
@@ -34,7 +40,7 @@ error.c gk_util.c itemsets.c rw.c tokenizer.c)
3440add_library (GKlib ${GKlib_sources} ${win32_sources} )
3541target_include_directories (GKlib PUBLIC
3642$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} >
37- $<INSTALL_INTERFACE:include >
43+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} >
3844)
3945target_link_libraries (GKlib PRIVATE
4046$<$<BOOL :${UNIX} >:m>
Original file line number Diff line number Diff line change 66 "name" : " default" ,
77 "binaryDir" : " ${sourceDir}/build" ,
88 "cacheVariables" : {
9- "CMAKE_COMPILE_WARNING_AS_ERROR" : true
10- }
11- },
12- {
13- "name" : " msvc" , "inherits" : " default" ,
14- "generator" : " Visual Studio 17 2022" ,
15- "cacheVariables" : {
16- "CMAKE_COMPILE_WARNING_AS_ERROR" : false
9+ "BUILD_TESTING" : true
1710 }
1811}
1912],
2619 "name" : " release" ,
2720 "configurePreset" : " default" ,
2821 "configuration" : " Release"
29- },
30- {
31- "name" : " msvc-debug" ,
32- "configurePreset" : " msvc" ,
33- "configuration" : " Debug"
3422 }
3523],
3624"testPresets" : [
5139{
5240 "name" : " release" , "inherits" : " default" ,
5341 "configuration" : " Release"
54- },
55- {
56- "name" : " msvc-debug" , "inherits" : " default" ,
57- "configurePreset" : " msvc" ,
58- "configuration" : " Debug"
5942}
6043],
6144"workflowPresets" : [
7659 }
7760 ]
7861 },
79- {
80- "name" : " msvc" ,
81- "steps" : [
82- {
83- "type" : " configure" ,
84- "name" : " msvc"
85- },
86- {
87- "type" : " build" ,
88- "name" : " msvc-debug"
89- },
90- {
91- "type" : " test" ,
92- "name" : " msvc-debug"
93- }
94- ]
95- },
9662 {
9763 "name" : " release" ,
9864 "steps" : [
Original file line number Diff line number Diff line change 22
33include (${CMAKE_CURRENT_LIST_DIR} /@PROJECT_NAME @-targets.cmake)
44
5- set (ffilesystem_shaky @ffilesystem_shaky@)
6-
7- target_link_libraries (metis::metis INTERFACE GKlib)
8-
95check_required_components(@PROJECT_NAME @)
You can’t perform that action at this time.
0 commit comments