Cmake does not display the displayed message

Fedora 15
cmake version 2.8.4

I am using the following CMakeLists.txt. However, the status message is not displayed when I runcmake .

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

PROJECT(proj2 C)

IF(CMAKE_COMPILER_IS_GNUCXX)
    MESSAGE(STATUS "==== GCC detected - Adding compiler flags")
    SET(CMAKE_C_FLAGS "-pthread -ggdb -Wextra -Wall")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)

ADD_EXECUTABLE(crypto_app main.c)

TARGET_LINK_LIBRARIES(crypto_app crypt)

All I get is the following:

-- The C compiler identification is GNU
-- Check for working C compiler: /usr/lib64/ccache/gcc
-- Check for working C compiler: /usr/lib64/ccache/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/projects/proj1/

Thanks so much for any suggestions on this.

+3
source share
1 answer

You tell cmake that this is a C project, and then check out the CXX compiler (e.g. C ++). CMAKE_COMPILER_IS_GNUCXXwill never be true in this case. That's why.

+6
source

All Articles