1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 21:49:07 +00:00

Require GCC >=4.4.

This commit is contained in:
Brenden Matthews 2009-12-10 15:19:45 -08:00
parent 07e2002b03
commit 01c01671e5
2 changed files with 17 additions and 0 deletions

View File

@ -1,5 +1,14 @@
# vim: ts=4 sw=4 noet ai cindent syntax=cmake
# Conky 2.x requires GCC 4.4 or newer
try_compile(GCC4_WORKS
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_MODULE_PATH}/gcc44test.cc
)
if(NOT GCC4_WORKS)
message(FATAL_ERROR "Conky 2.x requires GCC 4.4.0 or newer")
endif(NOT GCC4_WORKS)
# Set system vars
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(OS_LINUX true)

8
cmake/gcc44test.cc Normal file
View File

@ -0,0 +1,8 @@
/* Test for GCC >= 4.4.0 */
#define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#if GCC_VERSION < 40400
#error "GCC 4.4.0 or newer required"
#endif
int main() { return 1; }