Skip to content

Commit

Permalink
Straighten out the protobuf-cpp vs zlib mess.
Browse files Browse the repository at this point in the history
The protobuf-cpp CMakefile uses find_package() to detect zlib. For some
reason, CMake decides to add the include path of zlib's headers with
-isystem. This is bad, as it causes us to include <math.h> and friends
in the wrong order.

Pass in CMAKE_NO_SYSTEM_FROM_IMPORTED to CMake to prevent it from adding
-isystem flags.
  • Loading branch information
EdSchouten committed Feb 19, 2017
1 parent 3e78f4f commit f5bf3fb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ def cmake(self, builddir, sourcedir, args):
'-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY',
'-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER',
'-DCMAKE_INSTALL_PREFIX=' + self.get_prefix(),
'-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON',
'-DCMAKE_PREFIX_PATH=' + self._localbase,
'-DCMAKE_RANLIB=' + self._tool('ranlib'),
'-DCMAKE_SYSTEM_NAME=Generic',
Expand Down

0 comments on commit f5bf3fb

Please sign in to comment.