From 0acb53d55469f5778ae8abb4251dbd4464dd59b9 Mon Sep 17 00:00:00 2001 From: Bassem Girgis Date: Wed, 14 Aug 2019 22:44:49 -0500 Subject: [PATCH] update google scripts to build debug versions --- google/benchmark/build.sh | 25 +++++++++++++++++++++++-- google/log/build.sh | 18 ++++++++++++++++++ google/test/build.sh | 14 ++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/google/benchmark/build.sh b/google/benchmark/build.sh index fd7fe5e..59bcb83 100755 --- a/google/benchmark/build.sh +++ b/google/benchmark/build.sh @@ -44,7 +44,14 @@ if [ "${machineArch}" = "Linux" ]; then cmake \ -DCMAKE_BUILD_TYPE=Release \ -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \ + -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath/release \ + $libSrcPath && \ + make install -j) + ( cd $libBuildPath && \ + cmake \ + -DCMAKE_BUILD_TYPE=Debug \ + -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath/debug \ $libSrcPath && \ make install -j) elif [ "${machineArch}" = "MacOS" ]; then @@ -52,7 +59,17 @@ elif [ "${machineArch}" = "MacOS" ]; then cmake \ -DCMAKE_BUILD_TYPE=Release \ -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \ + -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath/release \ + -DLLVMAR_EXECUTABLE:PATH=/usr/bin/ar \ + -DLLVMNM_EXECUTABLE:PATH=/usr/bin/nm \ + -DLLVMRANLIB_EXECUTABLE:PATH=/usr/bin/ranlib \ + $libSrcPath && \ + make install -j) + ( cd $libBuildPath && \ + cmake \ + -DCMAKE_BUILD_TYPE=Debug \ + -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath/debug \ -DLLVMAR_EXECUTABLE:PATH=/usr/bin/ar \ -DLLVMNM_EXECUTABLE:PATH=/usr/bin/nm \ -DLLVMRANLIB_EXECUTABLE:PATH=/usr/bin/ranlib \ @@ -70,6 +87,10 @@ elif [ "${machineArch}" = "Windows" ]; then cmake \ --build . \ --config Release \ + --target INSTALL && \ + cmake \ + --build . \ + --config Debug \ --target INSTALL) else echo "unknown architecture" diff --git a/google/log/build.sh b/google/log/build.sh index 026d6f5..47ec4cd 100755 --- a/google/log/build.sh +++ b/google/log/build.sh @@ -47,6 +47,13 @@ if [ "${machineArch}" = "Linux" ]; then -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \ $libSrcPath && \ make install -j) + ( cd $libBuildPath && \ + cmake \ + -DCMAKE_BUILD_TYPE=Debug \ + -DBUILD_SHARED_LIBS:BOOL=TRUE \ + -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \ + $libSrcPath && \ + make install -j) elif [ "${machineArch}" = "MacOS" ]; then ( cd $libBuildPath && \ cmake \ @@ -55,6 +62,13 @@ elif [ "${machineArch}" = "MacOS" ]; then -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \ $libSrcPath && \ make install -j) + ( cd $libBuildPath && \ + cmake \ + -DCMAKE_BUILD_TYPE=Debug \ + -DBUILD_SHARED_LIBS:BOOL=TRUE \ + -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \ + $libSrcPath && \ + make install -j) elif [ "${machineArch}" = "Windows" ]; then ( cd $libBuildPath && \ cmake \ @@ -67,6 +81,10 @@ elif [ "${machineArch}" = "Windows" ]; then cmake \ --build . \ --config Release \ + --target INSTALL && \ + cmake \ + --build . \ + --config Debug \ --target INSTALL) else echo "unknown architecture" diff --git a/google/test/build.sh b/google/test/build.sh index e26e861..18b00f4 100755 --- a/google/test/build.sh +++ b/google/test/build.sh @@ -47,6 +47,13 @@ if [ "${machineArch}" = "Linux" ]; then -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \ $libSrcPath && \ make install -j) + ( cd $libBuildPath && \ + cmake \ + -DCMAKE_BUILD_TYPE=Debug \ + -DBUILD_SHARED_LIBS:BOOL=TRUE \ + -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \ + $libSrcPath && \ + make install -j) elif [ "${machineArch}" = "MacOS" ]; then ( cd $libBuildPath && \ cmake \ @@ -55,6 +62,13 @@ elif [ "${machineArch}" = "MacOS" ]; then -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \ $libSrcPath && \ make install -j) + ( cd $libBuildPath && \ + cmake \ + -DCMAKE_BUILD_TYPE=Debug \ + -DBUILD_SHARED_LIBS:BOOL=TRUE \ + -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \ + $libSrcPath && \ + make install -j) elif [ "${machineArch}" = "Windows" ]; then ( cd $libBuildPath && \ cmake \