@@ -29,7 +29,7 @@ macro(fix_default_compiler_settings_)
2929 CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO )
3030 if (NOT BUILD_SHARED_LIBS AND NOT gtest_force_shared_crt)
3131 # When Google Test is built as a shared library, it should also use
32- # shared runtime libraries. Otherwise, it may end up with multiple
32+ # shared runtime libraries. Otherwise, it may end up with multiple
3333 # copies of runtime library data in different modules, resulting in
3434 # hard-to-find crashes. When it is built as a static library, it is
3535 # preferable to use CRT as static libraries, as we don't have to rely
@@ -55,11 +55,11 @@ macro(fix_default_compiler_settings_)
5555endmacro ()
5656
5757# Defines the compiler/linker flags used to build Google Test and
58- # Google Mock. You can tweak these definitions to suit your need. A
58+ # Google Mock. You can tweak these definitions to suit your need. A
5959# variable's value is empty before it's explicitly assigned to.
6060macro (config_compiler_and_linker)
6161 # Note: pthreads on MinGW is not supported, even if available
62- # instead, we use windows threading primitives
62+ # instead, we use windows threading primitives.
6363 unset (GTEST_HAS_PTHREAD)
6464 if (NOT gtest_disable_pthreads AND NOT MINGW)
6565 # Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT.
@@ -79,7 +79,7 @@ macro(config_compiler_and_linker)
7979 set (cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1" )
8080 set (cxx_no_exception_flags "-EHs-c- -D_HAS_EXCEPTIONS=0" )
8181 set (cxx_no_rtti_flags "-GR-" )
82- # Suppress "unreachable code" warning
82+ # Suppress "unreachable code" warning,
8383 # https://stackoverflow.com/questions/3232669 explains the issue.
8484 set (cxx_base_flags "${cxx_base_flags} -wd4702" )
8585 # Ensure MSVC treats source files as UTF-8 encoded.
@@ -110,7 +110,7 @@ macro(config_compiler_and_linker)
110110 set (cxx_exception_flags "-fexceptions" )
111111 set (cxx_no_exception_flags "-fno-exceptions" )
112112 # Until version 4.3.2, GCC doesn't define a macro to indicate
113- # whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
113+ # whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
114114 # explicitly.
115115 set (cxx_no_rtti_flags "-fno-rtti -DGTEST_HAS_RTTI=0" )
116116 set (cxx_strict_flags
@@ -127,7 +127,7 @@ macro(config_compiler_and_linker)
127127 set (cxx_exception_flags "-qeh" )
128128 set (cxx_no_exception_flags "-qnoeh" )
129129 # Until version 9.0, Visual Age doesn't define a macro to indicate
130- # whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
130+ # whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
131131 # explicitly.
132132 set (cxx_no_rtti_flags "-qnortti -DGTEST_HAS_RTTI=0" )
133133 elseif (CMAKE_CXX_COMPILER_ID STREQUAL "HP" )
@@ -157,7 +157,7 @@ macro(config_compiler_and_linker)
157157 set (cxx_strict "${cxx_default} ${cxx_strict_flags} " )
158158endmacro ()
159159
160- # Defines the gtest & gtest_main libraries. User tests should link
160+ # Defines the gtest & gtest_main libraries. User tests should link
161161# with one of them.
162162function (cxx_library_with_type name type cxx_flags )
163163 # type can be either STATIC or SHARED to denote a static or shared library.
@@ -167,15 +167,15 @@ function(cxx_library_with_type name type cxx_flags)
167167 set_target_properties (${name}
168168 PROPERTIES
169169 COMPILE_FLAGS "${cxx_flags} " )
170- # Set the output directory for build artifacts
170+ # Set the output directory for build artifacts.
171171 set_target_properties (${name}
172172 PROPERTIES
173173 RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /bin"
174174 LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /lib"
175175 ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /lib"
176176 PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /bin"
177177 COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /lib" )
178- # make PDBs match library name
178+ # Make PDBs match library name.
179179 get_target_property (pdb_debug_postfix ${name} DEBUG_POSTFIX )
180180 set_target_properties (${name}
181181 PROPERTIES
@@ -212,7 +212,7 @@ endfunction()
212212
213213# cxx_executable_with_flags(name cxx_flags libs srcs...)
214214#
215- # creates a named C++ executable that depends on the given libraries and
215+ # Creates a named C++ executable that depends on the given libraries and
216216# is built from the given source files with the given compiler flags.
217217function (cxx_executable_with_flags name cxx_flags libs)
218218 add_executable (${name} ${ARGN} )
@@ -239,8 +239,8 @@ endfunction()
239239
240240# cxx_executable(name dir lib srcs...)
241241#
242- # creates a named target that depends on the given libs and is built
243- # from the given source files. dir/name.cc is implicitly included in
242+ # Creates a named target that depends on the given libs and is built
243+ # from the given source files. dir/name.cc is implicitly included in
244244# the source file list.
245245function (cxx_executable name dir libs)
246246 cxx_executable_with_flags(
@@ -251,7 +251,7 @@ find_package(Python3)
251251
252252# cxx_test_with_flags(name cxx_flags libs srcs...)
253253#
254- # creates a named C++ test that depends on the given libs and is built
254+ # Creates a named C++ test that depends on the given libs and is built
255255# from the given source files with the given compiler flags.
256256function (cxx_test_with_flags name cxx_flags libs)
257257 cxx_executable_with_flags(${name} "${cxx_flags} " "${libs} " ${ARGN} )
@@ -260,8 +260,8 @@ endfunction()
260260
261261# cxx_test(name libs srcs...)
262262#
263- # creates a named test target that depends on the given libs and is
264- # built from the given source files. Unlike cxx_test_with_flags,
263+ # Creates a named test target that depends on the given libs and is
264+ # built from the given source files. Unlike cxx_test_with_flags,
265265# test/name.cc is already implicitly included in the source file list.
266266function (cxx_test name libs)
267267 cxx_test_with_flags("${name} " "${cxx_default} " "${libs} "
@@ -270,8 +270,8 @@ endfunction()
270270
271271# py_test(name)
272272#
273- # creates a Python test with the given name whose main module is in
274- # test/name.py. It does nothing if Python is not installed.
273+ # Creates a Python test with the given name whose main module is in
274+ # test/name.py. It does nothing if Python is not installed.
275275function (py_test name )
276276 if (NOT Python3_Interpreter_FOUND)
277277 return ()
@@ -307,7 +307,7 @@ function(install_project)
307307 ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR} "
308308 LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR} " )
309309 if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
310- # Install PDBs
310+ # Install PDBs.
311311 foreach (t ${ARGN} )
312312 get_target_property (t_pdb_name ${t} COMPILE_PDB_NAME)
313313 get_target_property (t_pdb_name_debug ${t} COMPILE_PDB_NAME_DEBUG)
0 commit comments