From 3fa60044e77be14b187baac779a5ea72f800ab75 Mon Sep 17 00:00:00 2001 From: Georg Sauthoff Date: Sat, 27 Aug 2016 11:18:43 +0200 Subject: don't use variable eval syntax in if() because it is substituted before if() is executed cf. the last section of e.g.: https://cmake.org/cmake/help/v3.1/command/if.html --- cmake_unofficial/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake_unofficial/CMakeLists.txt b/cmake_unofficial/CMakeLists.txt index d2cac20..c7f1dab 100644 --- a/cmake_unofficial/CMakeLists.txt +++ b/cmake_unofficial/CMakeLists.txt @@ -9,7 +9,7 @@ include(CPack) cmake_minimum_required (VERSION 2.6) INCLUDE (CheckTypeSize) check_type_size("void *" SIZEOF_VOID_P) -IF( "${SIZEOF_VOID_P}" STREQUAL "8" ) +IF(SIZEOF_VOID_P STREQUAL "8") set (CMAKE_SYSTEM_PROCESSOR "64bit") MESSAGE( STATUS "64 bit architecture detected size of void * is " ${SIZEOF_VOID_P}) ENDIF() @@ -18,8 +18,8 @@ option(BUILD_TOOLS "Build the command line tools" ON) option(BUILD_LIBS "Build the libraries in addition to the tools" ON) option(LINK_TOOLS_WITH_LIB "Link the command line tools with the (shared) library" OFF) -IF("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR - "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") +IF(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR + CMAKE_C_COMPILER_ID STREQUAL "Clang") SET(GNU_COMPATIBLE_COMPILER 1) ENDIF() -- cgit v0.12