Re: [CMake] check_c_source_compiles caching pitfalls

2017-04-22 Thread Alan W. Irwin
On 2017-04-22 18:16-0700 Tyson Nottingham wrote: The result of check_c_source_compiles and similar commands (check_c_source_runs, check_cxx_source_compiles, etc.) is cached by the variable name passed in. This caching makes those commands and ones that depend on them easy to misuse. To deal wi

[CMake] check_c_source_compiles caching pitfalls

2017-04-22 Thread Tyson Nottingham
The result of check_c_source_compiles and similar commands (check_c_source_runs, check_cxx_source_compiles, etc.) is cached by the variable name passed in. This caching makes those commands and ones that depend on them easy to misuse. For example, set(potential_flags -Wall -badflag) foreach(flag