build: Remove C compiler

There isn't a single .c file in the project. It just added bloat
This commit is contained in:
patrick96 2018-12-23 22:46:34 +01:00 committed by Patrick Ziegler
parent a67b824e25
commit 0251a80e75
6 changed files with 1 additions and 17 deletions

View File

@ -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

View File

@ -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}"\

View File

@ -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

View File

@ -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")

View File

@ -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}" \

View File

@ -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}"