aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-03-22 21:23:51 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-03-22 21:23:51 +0000
commit9f0824b0a61b50fd40e47da2387cd9b3f872ce47 (patch)
tree563a02d287c4f97aa0d99b43bbd0a54c5353861b /CMakeLists.txt
parent90030d74c8cacbdab62136daa465a7ef359e2adc (diff)
downloadgoogletest-9f0824b0a61b50fd40e47da2387cd9b3f872ce47.tar.gz
googletest-9f0824b0a61b50fd40e47da2387cd9b3f872ce47.tar.bz2
googletest-9f0824b0a61b50fd40e47da2387cd9b3f872ce47.zip
Adds missing gtest DLL exports.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt25
1 files changed, 14 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 74c5e962..c9805a3e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -124,15 +124,12 @@ target_link_libraries(gtest_main gtest)
option(build_gtest_samples "Build gtest's sample programs." OFF)
-# cxx_executable(name dir lib srcs...)
+# cxx_executable_with_flags(name cxx_flags lib srcs...)
#
-# creates a named target that depends on the given lib and is built
-# from the given source files. dir/name.cc is implicitly included in
-# the source file list.
-function(cxx_executable_with_flags name dir cxx_flags lib)
- add_executable(${name}
- ${dir}/${name}.cc
- ${ARGN})
+# creates a named C++ executable that depends on the given library and
+# is built from the given source files with the given compiler flags.
+function(cxx_executable_with_flags name cxx_flags lib)
+ add_executable(${name} ${ARGN})
if (cxx_flags)
set_target_properties(${name}
PROPERTIES
@@ -141,8 +138,14 @@ function(cxx_executable_with_flags name dir cxx_flags lib)
target_link_libraries(${name} ${lib})
endfunction()
+# cxx_executable(name dir lib srcs...)
+#
+# creates a named target that depends on the given lib and is built
+# from the given source files. dir/name.cc is implicitly included in
+# the source file list.
function(cxx_executable name dir lib)
- cxx_executable_with_flags(${name} ${dir} "${cxx_default}" ${lib} ${ARGN})
+ cxx_executable_with_flags(
+ ${name} "${cxx_default}" ${lib} "${dir}/${name}.cc" ${ARGN})
endfunction()
if (build_gtest_samples)
@@ -273,8 +276,8 @@ if (build_all_gtest_tests)
# TODO(vladl): This and the next tests may not run in the hermetic
# environment on Windows. Re-evaluate and possibly make them
# platform-conditional after implementing hermetic builds.
- cxx_executable_with_flags(gtest_dll_test_ test "${cxx_use_shared_gtest}"
- gtest_dll)
+ cxx_executable_with_flags(gtest_dll_test_ "${cxx_use_shared_gtest}"
+ gtest_dll test/gtest_all_test.cc)
if (NOT(MSVC AND (MSVC_VERSION EQUAL 1600)))
# The C++ Standard specifies tuple_element<int, class>.