Make a libc++ gtest build
This commit is contained in:
parent
f11a967444
commit
ff7da41124
@ -32,5 +32,8 @@ git fetch --depth 1 origin f8d7d77c06936315286eb55f8de22cd23c188571
|
||||
git checkout FETCH_HEAD
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -GNinja
|
||||
cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=/tmp/gtest_install
|
||||
sudo ninja install
|
||||
rm -rf *
|
||||
cmake .. -GNinja -DCMAKE_CXX_COMPILER=clang++-16 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_INSTALL_PREFIX=/tmp/gtest_install_libcxx
|
||||
sudo ninja install
|
||||
|
||||
@ -17,6 +17,10 @@ def get_c_compiler_counterpart(compiler: str) -> str:
|
||||
def build(runner: MatrixRunner):
|
||||
if platform.system() == "Linux":
|
||||
matrix = runner.current_config()
|
||||
if "stdlib" in matrix and matrix["stdlib"] == "libc++":
|
||||
gtest_path = "/tmp/gtest_install_libcxx"
|
||||
else:
|
||||
gtest_path = "/tmp/gtest_install"
|
||||
args = [
|
||||
"cmake",
|
||||
"..",
|
||||
@ -35,6 +39,7 @@ def build(runner: MatrixRunner):
|
||||
f"-DCPPTRACE_USE_EXTERNAL_LIBDWARF=On",
|
||||
f"-DCPPTRACE_USE_EXTERNAL_ZSTD=On",
|
||||
f"-DCPPTRACE_USE_EXTERNAL_GTEST=On",
|
||||
f"-DCMAKE_PREFIX_PATH={gtest_path}",
|
||||
*(["-DCMAKE_CXX_FLAGS=-stdlib=libc++"] if "stdlib" in matrix and matrix["stdlib"] == "libc++" else [])
|
||||
]
|
||||
return runner.run_command(*args) and runner.run_command("ninja")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user