about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGennadiy Civil <gennadiycivil@users.noreply.github.com>2018-09-11T18·23-0400
committerGitHub <noreply@github.com>2018-09-11T18·23-0400
commit921fd5cf02ec0d665439a790148d59faa7d4a72c (patch)
treefcd3841b1430d4683abaec102c5326f49bdecd3c
parentfb462224c058487763f263b7995d70efd0242c17 (diff)
parent411b3c56d91689c21d68e6e4c1d66e9a3a8e495e (diff)
Merge pull request #166 from rongjiecomputer/cmake-test
[CMake] Only include test targets if ABSL_RUN_TESTS=ON
-rw-r--r--CMake/AbseilHelpers.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake
index e4eafe49e479..0c9341747512 100644
--- a/CMake/AbseilHelpers.cmake
+++ b/CMake/AbseilHelpers.cmake
@@ -123,7 +123,7 @@ endfunction()
 #
 # all tests will be register for execution with add_test()
 #
-# test compilation and execution is disable when BUILD_TESTING=OFF
+# test compilation and execution is disable when ABSL_RUN_TESTS=OFF
 #
 function(absl_test)
 
@@ -135,7 +135,7 @@ function(absl_test)
   )
 
 
-  if(BUILD_TESTING)
+  if(ABSL_RUN_TESTS)
 
     set(_NAME ${ABSL_TEST_TARGET})
     string(TOUPPER ${_NAME} _UPPER_NAME)
@@ -153,7 +153,7 @@ function(absl_test)
     set_property(TARGET ${_NAME}_bin PROPERTY FOLDER ${ABSL_IDE_FOLDER})
 
     add_test(${_NAME} ${_NAME}_bin)
-  endif(BUILD_TESTING)
+  endif(ABSL_RUN_TESTS)
 
 endfunction()