From 85b8d96919b7ff46730bd85b2b6d4661045f44b0 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Thu, 24 May 2018 14:47:12 -0600 Subject: [PATCH] CMake: Add reminder for when we upgrade to C++17 --- dtool/src/dtoolbase/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dtool/src/dtoolbase/CMakeLists.txt b/dtool/src/dtoolbase/CMakeLists.txt index 21daf08d1f..9edb98d0b6 100644 --- a/dtool/src/dtoolbase/CMakeLists.txt +++ b/dtool/src/dtoolbase/CMakeLists.txt @@ -2,6 +2,13 @@ configure_file(pandaVersion.h.in pandaVersion.h) configure_file(checkPandaVersion.h.in checkPandaVersion.h) configure_file(checkPandaVersion.cxx.in checkPandaVersion.cxx) +if(CMAKE_CXX_STANDARD GREATER_EQUAL 17) + # This serves as a reminder to update checkPandaVersion.h.in when we upgrade + # to C++17, which supports inline variables - a cleaner way of depending on + # the Panda version symbol from a header than what we're currently doing. + message(FATAL_ERROR "Developer notice: Update checkPandaVersion.h.in for C++17!") +endif() + set(P3DTOOLBASE_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/checkPandaVersion.h ${CMAKE_CURRENT_BINARY_DIR}/pandaVersion.h