From 0251a80e7531ecd56462a147c66dd0b682ea7849 Mon Sep 17 00:00:00 2001
From: patrick96
Date: Sun, 23 Dec 2018 22:46:34 +0100
Subject: [PATCH] build: Remove C compiler
There isn't a single .c file in the project. It just added bloat
---
CMakeLists.txt | 2 +-
build.sh | 5 -----
cmake/01-core.cmake | 5 -----
cmake/05-summary.cmake | 1 -
common/travis/configure.sh | 1 -
common/travis/summary.sh | 4 ----
6 files changed, 1 insertion(+), 17 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ccb3993..e26cbe28 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,7 +20,7 @@ if(ENABLE_CCACHE)
endif()
endif()
-project(polybar C CXX)
+project(polybar CXX)
# Extract version information from version.txt. The first line that looks like
# a version string is used, so the file supports comments
diff --git a/build.sh b/build.sh
index e6787621..07fe2f1d 100755
--- a/build.sh
+++ b/build.sh
@@ -149,21 +149,17 @@ set_build_opts() {
CXX="c++"
- CC="cc"
if [[ "$USE_GCC" == OFF ]]; then
if command -v clang++ >/dev/null; then
msg "Using compiler: clang++/clang"
CXX="clang++"
- CC="clang"
elif command -v g++ >/dev/null; then
msg "Using compiler: g++/gcc"
CXX="g++"
- CC="gcc"
fi
else
CXX="g++"
- CC="gcc"
fi
}
@@ -189,7 +185,6 @@ main() {
msg "Executing cmake command"
cmake \
- -DCMAKE_C_COMPILER="${CC}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-DENABLE_ALSA:BOOL="${ENABLE_ALSA}" \
-DENABLE_PULSEAUDIO:BOOL="${ENABLE_PULSEAUDIO}"\
diff --git a/cmake/01-core.cmake b/cmake/01-core.cmake
index 87985f44..2bc6e91a 100644
--- a/cmake/01-core.cmake
+++ b/cmake/01-core.cmake
@@ -97,23 +97,18 @@ endif()
# Custom build type ; SANITIZE
SET(CMAKE_CXX_FLAGS_SANITIZE "-O0 -g -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls"
CACHE STRING "Flags used by the C++ compiler during sanitize builds." FORCE)
-SET(CMAKE_C_FLAGS_SANITIZE ""
- CACHE STRING "Flags used by the C compiler during sanitize builds." FORCE)
SET(CMAKE_EXE_LINKER_FLAGS_SANITIZE ""
CACHE STRING "Flags used for linking binaries during sanitize builds." FORCE)
SET(CMAKE_SHARED_LINKER_FLAGS_SANITIZE ""
CACHE STRING "Flags used by the shared libraries linker during sanitize builds." FORCE)
MARK_AS_ADVANCED(
CMAKE_CXX_FLAGS_SANITIZE
- CMAKE_C_FLAGS_SANITIZE
CMAKE_EXE_LINKER_FLAGS_SANITIZE
CMAKE_SHARED_LINKER_FLAGS_SANITIZE)
# Custom build type ; Coverage
SET(CMAKE_CXX_FLAGS_COVERAGE
"${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_COVERAGE} --coverage")
-SET(CMAKE_C_FLAGS_COVERAGE
- "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS_COVERAGE} --coverage")
SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE
"${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${CMAKE_EXE_LINKER_FLAGS_COVERAGE}")
SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
diff --git a/cmake/05-summary.cmake b/cmake/05-summary.cmake
index 02b0106b..45a62e4d 100644
--- a/cmake/05-summary.cmake
+++ b/cmake/05-summary.cmake
@@ -5,7 +5,6 @@
message(STATUS " Build:")
message_colored(STATUS " Version: ${APP_VERSION}" "32;1")
message_colored(STATUS " Type: ${CMAKE_BUILD_TYPE}" "37;2")
-message_colored(STATUS " CC: ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UPPER}}" "37;2")
message_colored(STATUS " CXX: ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UPPER}}" "37;2")
message_colored(STATUS " LD: ${CMAKE_LINKER} ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UPPER}}" "37;2")
diff --git a/common/travis/configure.sh b/common/travis/configure.sh
index 1965a2a7..bd3d22b1 100755
--- a/common/travis/configure.sh
+++ b/common/travis/configure.sh
@@ -24,7 +24,6 @@ if [ "$POLYBAR_BUILD_TYPE" == "minimal" ]; then
fi
cmake \
- -DCMAKE_C_COMPILER="${CC}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
diff --git a/common/travis/summary.sh b/common/travis/summary.sh
index be91f660..708d6f7b 100755
--- a/common/travis/summary.sh
+++ b/common/travis/summary.sh
@@ -2,15 +2,11 @@
echo "${CXX} --version"
eval "${CXX} --version"
-echo "${CC} --version"
-eval "${CC} --version"
-
echo "cmake --version"
cmake --version
echo "PATH=${PATH}"
echo "CXX=${CXX}"
-echo "CC=${CC}"
echo "CXXFLAGS=${CXXFLAGS}"
echo "LDFLAGS=${LDFLAGS}"
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"