File tree Expand file tree Collapse file tree 3 files changed +24
-10
lines changed Expand file tree Collapse file tree 3 files changed +24
-10
lines changed Original file line number Diff line number Diff line change 33
33
- name : Configure CMake
34
34
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
35
35
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
36
- run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install
36
+ run : cmake -B ${{github.workspace}}/build -DBUILD_TESTS=ON - DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install
37
37
38
38
- name : Build
39
39
# Build your program with the given configuration
Original file line number Diff line number Diff line change 1
1
CMAKE_MINIMUM_REQUIRED (VERSION 3.10)
2
2
PROJECT (MLogger3rdparty)
3
3
4
- ADD_SUBDIRECTORY (googletest EXCLUDE_FROM_ALL )
4
+ IF (NOT TARGET gtest)
5
+ MESSAGE (STATUS "gtest target not found. Adding subdirectory..." )
6
+ ADD_SUBDIRECTORY (googletest EXCLUDE_FROM_ALL )
7
+ ELSE ()
8
+ MESSAGE (STATUS "gtest target already exists. Skipping." )
9
+ ENDIF ()
5
10
6
- ADD_SUBDIRECTORY (gflags EXCLUDE_FROM_ALL )
11
+ IF (NOT TARGET gflags)
12
+ MESSAGE (STATUS "gflags target not found. Adding subdirectory..." )
13
+ ADD_SUBDIRECTORY (gflags EXCLUDE_FROM_ALL )
14
+ ELSE ()
15
+ MESSAGE (STATUS "gflags target already exists. Skipping." )
16
+ ENDIF ()
7
17
8
- SET (CMAKE_DISABLE_FIND_PACKAGE_gflags ON )
18
+ IF (NOT TARGET glog)
19
+ MESSAGE (STATUS "glog target not found. Adding subdirectory..." )
20
+ SET (CMAKE_DISABLE_FIND_PACKAGE_gflags ON )
21
+ SET (WITH_GFLAGS ON CACHE BOOL "Enable gflags support in glog" )
22
+ SET (WITH_SYSTEM_GFLAGS OFF CACHE BOOL "Do not use system-installed gflags" )
23
+ ADD_SUBDIRECTORY (glog EXCLUDE_FROM_ALL )
24
+ SET (CMAKE_DISABLE_FIND_PACKAGE_gflags OFF )
25
+ ELSE ()
26
+ message (STATUS "glog target already exists. Skipping." )
27
+ ENDIF ()
9
28
10
- SET (WITH_GFLAGS ON CACHE BOOL "Enable gflags support in glog" )
11
- SET (WITH_SYSTEM_GFLAGS OFF CACHE BOOL "Do not use system-installed gflags" )
12
- ADD_SUBDIRECTORY (glog EXCLUDE_FROM_ALL )
13
-
14
- SET (CMAKE_DISABLE_FIND_PACKAGE_gflags OFF )
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ PROJECT(MLogger VERSION 1.0.0 LANGUAGES CXX)
5
5
6
6
SET (CMAKE_CXX_STANDARD 20)
7
7
8
- OPTION (BUILD_TESTS "Build with tests" ON )
8
+ OPTION (BUILD_TESTS "Build with tests" OFF )
9
9
10
10
MESSAGE (INFO "--------------------------------" )
11
11
MESSAGE (STATUS "Build MLogger: ${AI_WORKFLOW_VERSION} " )
You can’t perform that action at this time.
0 commit comments