From 0a6e17b4ff21471247f172f8a019102c7185dadc Mon Sep 17 00:00:00 2001 From: Raphael Dumusc Date: Wed, 5 Aug 2015 14:54:02 +0200 Subject: [PATCH] Warn users of TestCPP11 if it runs multiple times (for each subproject). --- TestCPP11.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TestCPP11.cmake b/TestCPP11.cmake index 96d54af..b1914b0 100644 --- a/TestCPP11.cmake +++ b/TestCPP11.cmake @@ -7,6 +7,11 @@ if(TESTS_CPP11_DONE) endif() set(TESTS_CPP11_DONE ON) +if(NOT PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) + message(WARNING "For better performance, include TestCPP11 in the top-level " + "project so that it is run only once.") +endif() + set(TESTS_CPP11 sharedptr tuple auto nullptr array final_override unordered_map template_alias)