aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorredfish <redfish@galactica.pw>2016-08-29 12:12:19 -0400
committerredfish <redfish@galactica.pw>2016-08-30 22:55:53 -0400
commitdbd9a2606cce84e0793f1f5f39c47975a67b6845 (patch)
tree6216e00440bbd342c2d2a86963a425783abdd66a
parentMerge pull request #1006 (diff)
downloadmonero-dbd9a2606cce84e0793f1f5f39c47975a67b6845.tar.xz
cmake: tests: gtest target is not always defined #983
-rw-r--r--tests/CMakeLists.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 33f5226ef..a3743d84c 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -28,6 +28,9 @@
#
# Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
+# The docs say this only affects grouping in IDEs
+set(folder "tests")
+
if (WIN32 AND STATIC)
add_definitions(-DSTATICLIB)
# miniupnp changed their static define
@@ -52,6 +55,10 @@ else ()
PROPERTY
COMPILE_FLAGS " -Wno-undef -Wno-sign-compare")
endif()
+
+ set_property(TARGET gtest gtest_main
+ PROPERTY
+ FOLDER "${folder}")
endif ()
if (NOT DEFINED ENV{TRAVIS})
@@ -84,7 +91,7 @@ target_link_libraries(hash-target-tests
cryptonote_core)
set_property(TARGET hash-target-tests
PROPERTY
- FOLDER "tests")
+ FOLDER "${folder}")
add_test(
NAME hash-target
@@ -97,4 +104,4 @@ else ()
add_custom_target(tests DEPENDS coretests difficulty hash performance_tests core_proxy unit_tests)
endif ()
-set_property(TARGET gtest gtest_main hash-target-tests tests PROPERTY FOLDER "tests")
+set_property(TARGET tests PROPERTY FOLDER "${folder}")