Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
c73d0241
"vscode:/vscode.git/clone" did not exist on "331c740a155d829c2e6235db92d5402c47dc480f"
Commit
c73d0241
authored
Jan 05, 2010
by
zhanyong.wan
Browse files
Makes the cmake script compatible with cmake 2.6.4.
parent
38efa38f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
CMakeLists.txt
CMakeLists.txt
+8
-8
No files found.
CMakeLists.txt
View file @
c73d0241
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
# ${gtest_BINARY_DIR}.
# ${gtest_BINARY_DIR}.
# Language "C" is required for find_package(Threads).
# Language "C" is required for find_package(Threads).
project
(
gtest CXX C
)
project
(
gtest CXX C
)
cmake_minimum_required
(
VERSION 2.
8
)
cmake_minimum_required
(
VERSION 2.
6.4
)
# Where gtest's .h files can be found.
# Where gtest's .h files can be found.
include_directories
(
include_directories
(
...
@@ -84,7 +84,7 @@ function(cxx_executable name dir lib)
...
@@ -84,7 +84,7 @@ function(cxx_executable name dir lib)
target_link_libraries
(
${
name
}
${
lib
}
)
target_link_libraries
(
${
name
}
${
lib
}
)
endfunction
()
endfunction
()
if
(
${
build_gtest_samples
}
)
if
(
build_gtest_samples
)
cxx_executable
(
sample1_unittest samples gtest_main samples/sample1.cc
)
cxx_executable
(
sample1_unittest samples gtest_main samples/sample1.cc
)
cxx_executable
(
sample2_unittest samples gtest_main samples/sample2.cc
)
cxx_executable
(
sample2_unittest samples gtest_main samples/sample2.cc
)
cxx_executable
(
sample3_unittest samples gtest_main
)
cxx_executable
(
sample3_unittest samples gtest_main
)
...
@@ -149,7 +149,7 @@ endfunction()
...
@@ -149,7 +149,7 @@ endfunction()
cxx_test
(
gtest_unittest gtest_main
)
cxx_test
(
gtest_unittest gtest_main
)
if
(
${
build_all_gtest_tests
}
)
if
(
build_all_gtest_tests
)
cxx_test
(
gtest_environment_test gtest
)
cxx_test
(
gtest_environment_test gtest
)
cxx_test
(
gtest-filepath_test gtest_main
)
cxx_test
(
gtest-filepath_test gtest_main
)
cxx_test
(
gtest-linked_ptr_test gtest_main
)
cxx_test
(
gtest-linked_ptr_test gtest_main
)
...
@@ -186,7 +186,7 @@ else()
...
@@ -186,7 +186,7 @@ else()
endif
()
endif
()
set
(
cxx_use_own_tuple
"
${
cxx_default
}
-DGTEST_USE_OWN_TR1_TUPLE=1"
)
set
(
cxx_use_own_tuple
"
${
cxx_default
}
-DGTEST_USE_OWN_TR1_TUPLE=1"
)
if
(
${
build_all_gtest_tests
}
)
if
(
build_all_gtest_tests
)
cxx_library
(
gtest_no_exception
"
${
cxx_no_exception
}
"
cxx_library
(
gtest_no_exception
"
${
cxx_no_exception
}
"
src/gtest-all.cc
)
src/gtest-all.cc
)
cxx_library
(
gtest_main_no_rtti
"
${
cxx_no_rtti
}
"
cxx_library
(
gtest_main_no_rtti
"
${
cxx_no_rtti
}
"
...
@@ -218,13 +218,13 @@ endif()
...
@@ -218,13 +218,13 @@ endif()
# test/name.py. It does nothing if Python is not installed.
# test/name.py. It does nothing if Python is not installed.
function
(
py_test name
)
function
(
py_test name
)
if
(
PYTHONINTERP_FOUND
)
if
(
PYTHONINTERP_FOUND
)
add_test
(
NAME
${
name
}
add_test
(
${
name
}
COMMAND
${
PYTHON_EXECUTABLE
}
${
gtest_SOURCE_DIR
}
/test/
${
name
}
.py
${
PYTHON_EXECUTABLE
}
${
gtest_SOURCE_DIR
}
/test/
${
name
}
.py
--gtest_build_dir=
${
EXECUTABLE_OUTPUT_PATH
}
)
--gtest_build_dir=
${
EXECUTABLE_OUTPUT_PATH
}
)
endif
()
endif
()
endfunction
()
endfunction
()
if
(
${
build_all_gtest_tests
}
)
if
(
build_all_gtest_tests
)
cxx_executable
(
gtest_break_on_failure_unittest_ test gtest
)
cxx_executable
(
gtest_break_on_failure_unittest_ test gtest
)
py_test
(
gtest_break_on_failure_unittest
)
py_test
(
gtest_break_on_failure_unittest
)
...
...
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