fix a bug introduced by previous lua-bcc build fix commit
authorYonghong Song <yhs@fb.com>
Thu, 24 Aug 2017 06:56:56 +0000 (23:56 -0700)
committerBrenden Blanco <bblanco@gmail.com>
Fri, 25 Aug 2017 23:42:41 +0000 (16:42 -0700)
commit917f4c76db4391bb2ef955b6bf659857e8a35f8d
tree04920c5b09b67e37078a3a74d6a112581e999001
parent84757cec955d710d710c371a10cc689056a5ae81
fix a bug introduced by previous lua-bcc build fix commit

The bug does not show up in my previous test probably because
I did not clean up the build directory and did not have a clean cmake.

In gcc 4.8.5 environment where -no-pie is not supported,
a clean cmake will trigger the issue as subsequent other
cxx compile test will fail due to additional -no-pie flag.

The fix is to reset the CMAKE_REQUIRED_FLAGS to its previous value
after the specific test.

Signed-off-by: Yonghong Song <yhs@fb.com>
cmake/FindCompilerFlag.cmake