diff options
author | Brad King <brad.king@kitware.com> | 2015-11-18 10:12:25 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-11-18 10:12:25 -0500 |
commit | c3dc8935ee5fe9415d37ec138b6c087f85f15d43 (patch) | |
tree | d8b565c11272cd882d9c7291c2607723610fc756 /Modules/CMakeCCompilerId.c.in | |
parent | b4a2ada297214119647b26df8abe394cd73ca53a (diff) | |
download | cmake-c3dc8935ee5fe9415d37ec138b6c087f85f15d43.tar.gz |
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/CMakeCCompilerId.c.in')
-rw-r--r-- | Modules/CMakeCCompilerId.c.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index b224007807..63f8787c0b 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -55,6 +55,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; } |