summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXCompilerId.cpp.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-11-18 15:12:25 (GMT)
committerBrad King <brad.king@kitware.com>2015-11-18 15:12:25 (GMT)
commitc3dc8935ee5fe9415d37ec138b6c087f85f15d43 (patch)
treed8b565c11272cd882d9c7291c2607723610fc756 /Modules/CMakeCXXCompilerId.cpp.in
parentb4a2ada297214119647b26df8abe394cd73ca53a (diff)
downloadCMake-c3dc8935ee5fe9415d37ec138b6c087f85f15d43.zip
CMake-c3dc8935ee5fe9415d37ec138b6c087f85f15d43.tar.gz
CMake-c3dc8935ee5fe9415d37ec138b6c087f85f15d43.tar.bz2
Make C and C++ default dialect detection robust to advanced optimizations
In commit v3.4.0-rc1~71^2 (Project: Determine default language dialect for the compiler, 2015-09-15) we added an "INFO:..." string to the compiler id detection binary. The value can be optimized out of the compiler id binary unless we force it to be included by making the program behavior depend on it at runtime. Add references to the value as we do for the other info strings already. Gentoo-Issue: https://bugs.gentoo.org/show_bug.cgi?id=565744
Diffstat (limited to 'Modules/CMakeCXXCompilerId.cpp.in')
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index d467507..61cd790 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -49,6 +49,7 @@ int main(int argc, char* argv[])
#ifdef SIMULATE_VERSION_MAJOR
require += info_simulate_version[argc];
#endif
+ require += info_language_dialect_default[argc];
(void)argv;
return require;
}