Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
glog
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
glog
Commits
9581b3fb
Commit
9581b3fb
authored
Oct 19, 2016
by
Fumitoshi Ukai
Committed by
GitHub
Oct 19, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #132 from sergiud/cmake-disable-unittests
cmake: allow to disable building unit tests
parents
cf36dabd
60375e0b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
39 deletions
+42
-39
CMakeLists.txt
CMakeLists.txt
+42
-39
No files found.
CMakeLists.txt
View file @
9581b3fb
...
...
@@ -31,8 +31,6 @@ option (WITH_THREADS "Enable multithreading support" ON)
list
(
APPEND CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
)
include
(
CMakePackageConfigHelpers
)
include
(
CPack
)
include
(
CheckCSourceCompiles
)
include
(
CheckCXXCompilerFlag
)
include
(
CheckCXXSourceCompiles
)
...
...
@@ -43,6 +41,9 @@ include (CheckLibraryExists)
include
(
CheckStructHasMember
)
include
(
CheckSymbolExists
)
include
(
CheckTypeSize
)
include
(
CMakePackageConfigHelpers
)
include
(
CPack
)
include
(
CTest
)
include
(
DetermineGflagsNamespace
)
set
(
CMAKE_THREAD_PREFER_PTHREAD 1
)
...
...
@@ -460,95 +461,97 @@ endif (UNIX OR (APPLE AND HAVE_DLADDR))
# Unit testing
add_executable
(
logging_unittest
if
(
BUILD_TESTING
)
add_executable
(
logging_unittest
src/logging_unittest.cc
)
)
target_link_libraries
(
logging_unittest PRIVATE glog
)
target_link_libraries
(
logging_unittest PRIVATE glog
)
add_executable
(
stl_logging_unittest
add_executable
(
stl_logging_unittest
src/stl_logging_unittest.cc
)
)
target_link_libraries
(
stl_logging_unittest PRIVATE glog
)
target_link_libraries
(
stl_logging_unittest PRIVATE glog
)
if
(
HAVE_NO_DEPRECATED
)
if
(
HAVE_NO_DEPRECATED
)
set_property
(
TARGET stl_logging_unittest APPEND PROPERTY COMPILE_OPTIONS
-Wno-deprecated
)
endif
(
HAVE_NO_DEPRECATED
)
endif
(
HAVE_NO_DEPRECATED
)
if
(
HAVE_UNORDERED_MAP AND HAVE_UNORDERED_SET
)
if
(
HAVE_UNORDERED_MAP AND HAVE_UNORDERED_SET
)
target_compile_definitions
(
stl_logging_unittest PRIVATE
GLOG_STL_LOGGING_FOR_UNORDERED
)
endif
(
HAVE_UNORDERED_MAP AND HAVE_UNORDERED_SET
)
endif
(
HAVE_UNORDERED_MAP AND HAVE_UNORDERED_SET
)
if
(
HAVE_TR1_UNORDERED_MAP AND HAVE_TR1_UNORDERED_SET
)
if
(
HAVE_TR1_UNORDERED_MAP AND HAVE_TR1_UNORDERED_SET
)
target_compile_definitions
(
stl_logging_unittest PRIVATE
GLOG_STL_LOGGING_FOR_TR1_UNORDERED
)
endif
(
HAVE_TR1_UNORDERED_MAP AND HAVE_TR1_UNORDERED_SET
)
endif
(
HAVE_TR1_UNORDERED_MAP AND HAVE_TR1_UNORDERED_SET
)
if
(
HAVE_EXT_HASH_MAP AND HAVE_EXT_HASH_SET
)
if
(
HAVE_EXT_HASH_MAP AND HAVE_EXT_HASH_SET
)
target_compile_definitions
(
stl_logging_unittest PRIVATE
GLOG_STL_LOGGING_FOR_EXT_HASH
)
endif
(
HAVE_EXT_HASH_MAP AND HAVE_EXT_HASH_SET
)
endif
(
HAVE_EXT_HASH_MAP AND HAVE_EXT_HASH_SET
)
if
(
HAVE_EXT_SLIST
)
if
(
HAVE_EXT_SLIST
)
target_compile_definitions
(
stl_logging_unittest PRIVATE
GLOG_STL_LOGGING_FOR_EXT_SLIST
)
endif
(
HAVE_EXT_SLIST
)
endif
(
HAVE_EXT_SLIST
)
if
(
HAVE_SYMBOLIZE
)
if
(
HAVE_SYMBOLIZE
)
add_executable
(
symbolize_unittest
src/symbolize_unittest.cc
)
target_link_libraries
(
symbolize_unittest PRIVATE glog
)
endif
(
HAVE_SYMBOLIZE
)
endif
(
HAVE_SYMBOLIZE
)
add_executable
(
demangle_unittest
add_executable
(
demangle_unittest
src/demangle_unittest.cc
)
)
target_link_libraries
(
demangle_unittest PRIVATE glog
)
target_link_libraries
(
demangle_unittest PRIVATE glog
)
if
(
HAVE_STACKTRACE
)
if
(
HAVE_STACKTRACE
)
add_executable
(
stacktrace_unittest
src/stacktrace_unittest.cc
)
target_link_libraries
(
stacktrace_unittest PRIVATE glog
)
endif
(
HAVE_STACKTRACE
)
endif
(
HAVE_STACKTRACE
)
add_executable
(
utilities_unittest
add_executable
(
utilities_unittest
src/utilities_unittest.cc
)
)
target_link_libraries
(
utilities_unittest PRIVATE glog
)
target_link_libraries
(
utilities_unittest PRIVATE glog
)
if
(
HAVE_STACKTRACE AND HAVE_SYMBOLIZE
)
if
(
HAVE_STACKTRACE AND HAVE_SYMBOLIZE
)
add_executable
(
signalhandler_unittest
src/signalhandler_unittest.cc
)
target_link_libraries
(
signalhandler_unittest PRIVATE glog
)
endif
(
HAVE_STACKTRACE AND HAVE_SYMBOLIZE
)
endif
(
HAVE_STACKTRACE AND HAVE_SYMBOLIZE
)
add_test
(
NAME demangle COMMAND demangle_unittest
)
add_test
(
NAME logging COMMAND logging_unittest
)
add_test
(
NAME demangle COMMAND demangle_unittest
)
add_test
(
NAME logging COMMAND logging_unittest
)
if
(
TARGET signalhandler_unittest
)
if
(
TARGET signalhandler_unittest
)
add_test
(
NAME signalhandler COMMAND signalhandler_unittest
)
endif
(
TARGET signalhandler_unittest
)
endif
(
TARGET signalhandler_unittest
)
if
(
TARGET stacktrace_unittest
)
if
(
TARGET stacktrace_unittest
)
add_test
(
NAME stacktrace COMMAND stacktrace_unittest
)
endif
(
TARGET stacktrace_unittest
)
endif
(
TARGET stacktrace_unittest
)
add_test
(
NAME stl_logging COMMAND stl_logging_unittest
)
add_test
(
NAME stl_logging COMMAND stl_logging_unittest
)
if
(
TARGET symbolize_unittest
)
if
(
TARGET symbolize_unittest
)
add_test
(
NAME symbolize COMMAND symbolize_unittest
)
endif
(
TARGET symbolize_unittest
)
endif
(
TARGET symbolize_unittest
)
endif
(
BUILD_TESTING
)
install
(
TARGETS glog
EXPORT glog-targets
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment