-# This could be improved in many ways (patches welcome):
-# - Not finding SimGrid is fatal. But who would want to
-# overcome such a desperate situation anyway? ;)
-# - No way to specify a minimal version
-# - No proper find_package() integration
+# With older CMake (< 2.8.12), it simply defines several variables:
+# SimGrid_INCLUDE_DIR - the SimGrid include directories
+# SimGrid_LIBRARY - link your simulator against it to use SimGrid
+# Use as:
+# include_directories("${SimGrid_INCLUDE_DIR}" SYSTEM)
+# target_link_libraries(your-simulator ${SimGrid_LIBRARY})
+#
+# In both cases, it also define a SimGrid_VERSION macro, that you
+# can use to deal with API evolutions as follows:
+#
+# #if SimGrid_VERSION < 31800
+# (code to use if the installed version is lower than v3.18)
+# #elif SimGrid_VERSION < 31900
+# (code to use if we are using SimGrid v3.18.x)
+# #else
+# (code to use with SimGrid v3.19+)
+# #endif
+#
+# Since SimGrid header files require C++14, so we set CMAKE_CXX_STANDARD to 14.
+# Change this variable in your own file if you need a later standard.
+
+#
+# IMPROVING THIS FILE
+# -------------------
+# - Use automatic SimGridConfig.cmake creation via export/install(EXPORT in main CMakeLists.txt:
+# https://cliutils.gitlab.io/modern-cmake/chapters/exporting.html
+# https://cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file
+# https://github.com/boostcon/cppnow_presentations_2017/blob/master/05-19-2017_friday/effective_cmake__daniel_pfeifer__cppnow_05-19-2017.pdf
+
+cmake_minimum_required(VERSION 2.8)
+
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)