[CMake] How to suppress output like "-- Checking whether C ", etc.?

Peng Yu pengyu.ut at gmail.com
Mon Aug 13 15:42:07 EDT 2012


Hi,

I just want "Hello World!" to be shown and everything else be
suppressed. "-Wno-dev" seems not relevant. I don't find other options
seem to be useful in the manual. In case I miss anything in the
manual, is there an option to suppress these messages? Thanks!

~/linux/test/cmake/lang/command/message/build$ cat ../src1/CMakeLists.txt
message("Hello World!")
~/linux/test/cmake/lang/command/message/build$ rm -rf *
~/linux/test/cmake/lang/command/message/build$ cmake ../src1/
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Hello World!
-- Configuring done
-- Generating done
-- Build files have been written to:
/Users/pengy/linux/test/cmake/lang/command/message/build


-- 
Regards,
Peng


More information about the CMake mailing list