5 Commits

Author SHA1 Message Date
Tom Finegan
2b2c196558 cmake: Fix required flag check.
It always passed after first test due to lack of CACHE in unset()
call. Also:

- Fix flag name in error message.
- Use actual flag instead of hard coded -std=c++11

Change-Id: I29c0dc4fd0f5ce97f658919a5739e15831a00281
2017-01-23 10:58:45 -08:00
Tom Finegan
166e40fa97 Cmake refactor.
- Split sources from targets. Source files are stored in list variables,
  and targets now use the list vars.
- Surface all build settings control in CMakeLists.txt.
- Remove individual C++11 tests in favor of requiring support
  for --std=c++11.
- Improve organization; stop reopening the same if's.

Change-Id: I1989803fdfd9c032f417a5fc12985671455148bd
2017-01-19 08:40:31 -08:00
Tom Finegan
54f155986d cmake: Cache results of CXX flag tests.
Avoid re-testing to improve cmake build and regen speed.

Change-Id: I8e2fe6601036cc7d176cdc3738616261a2da408b
2016-11-14 19:45:51 -08:00
Tom Finegan
5cf549f582 cmake: Log compiler flag at check time.
Output the flag being checked before checking the flag to make it easier
to determine exactly which check failed.

Change-Id: I692f5287f985acb4a3061dd54f7c5a8729def83b
2016-04-21 16:56:12 -07:00
Tom Finegan
f47cbd50e9 cmake: Move cxx flag testing/setup into its own file.
- Move CXX flags stuff into build/cxx_flags.cmake.
- include CMake modules where they're used.
- Add ENABLE_WERROR flag-- enables warnings as errors.
- Add -Wshorten-64-to-32 and -Wnarrowing to CXX flags.

Change-Id: I5d93a39a3eff6ae81f9e094927b8f0cb9f36bbb0
2016-04-07 14:49:26 -07:00