CMake/CPack/CTest/CDash Open Source Tools to Build Test and Deploy C++ Software

Google TechTalks · 57K views · 2010 · 1:08:04

Open on YouTube

Testing, debugging & developer toolsC, C++, Rust, Go & systems languagestalkdated

Why Stack Overflow recommends it

Stack Overflow users link it when recommending CMake over hand-written makefiles or autoconf and want a thorough introduction to CMake, CTest, CPack and CDash.

Recommended by 3 people across 4 different months, 2010 to 2012.

What it is

A Google Tech Talk from December 2009 in which Bill Hoffman of Kitware presents the CMake family of tools: CMake for generating native build files, CTest for running tests, CPack for packaging, and CDash for web dashboards of build and test results. It covers how CMake works with makefiles and IDE projects and how nightly builds support cross-platform C++ development.

What people said

Recommends Michael Aaron Safyan · 2010-03 · Stack Overflow · on “setting library include paths in c++”

Rather than invoke g++ directly, I strongly advise you to use CMake [LINK] (watch the CMake Google Techtalk [this video] if you'd like to learn more) as it will make your life way easier and greatly simplifies locating and linking against a variety of libraries. That said, I believe the problem with your invocation is that you have not specified the library, which you would do with -lgd . Your -L/opt/local/lib correctly tells g++ to look in /opt/local/lib , but you never told it what to look for. As for finding the appropriate header, you can use -I/opt/local/include to put /opt/local/include in the compiler's include search path. If you were to heed my advice to use CMake, doing this would look

Recommends matiu · 2011-11 · Stack Overflow · on “Making autoconf search for C++ libraries”

Hope this helps. My suggestion would be to use CMake instead of Autoconf. This CMakeLists.txt file should get you started: cmake_minimum_required(VERSION 2.8) # [LINK] find_package(libxml2 2.6 REQUIRED) # [LINK] include_directories(${LIBXML2_INCLUDE_DIR}) # [LINK] add_executable(myApp main.cpp other.cpp) # [LINK] target_link_libraries(myApp ${LIBXML2_LIBRARIES}) # [LINK] To use the file, after adjusting for your project of course. Put it in your Source dir as CMakeLists.txt, then: mkdir build cd build cmake .. # This is like autoconf and generates the make files make If it sounds intriguing check out the giant youtube vid on all the benefits: [this video] It's good to use CMake, CTest, CDash, and

Recommends matiu · 2012-08 · Stack Overflow · on “How to portably detect whether a compiler supports <iostream> vs <iostream.h>”

Coolness, I'm glad you got a working solution DavidO. If you're gonna do a lot of C++, I personally recommend investing some time in learning CMake+CTest+CPack; it does have a pretty steep leaning curve, but is like having magic powers when you're building stuff. I got started/interested after watching this hour long vid: [this video] then went on just following the reference docs to get stuff done: [LINK]

Recommends axis · 2012-10 · Stack Overflow · on “G++ Compilation Statistics”

I know one, it's called Cdash [LINK] and it's part of a larger and ideal suite that virtually includes Cmake, Ctest and Cpack. This [this video] will probably be an interesting video for you

Cites Michael Aaron Safyan · 2010-03 · Stack Overflow · on “Is everything to be explicit for makefile of c++?”

To answer what seems to be your question... make will only look in the current directory (although you can invoke make with the "-f" option to specify a makefile that isn't named "Makefile" or that is located in a different directory, you can also invoke make with the "-C" option to run in a different directory, and you can include one makefile --possibly located elsewhere -- from inside another makefile); however, to answer the more general question of whether everything in your makefile needs to be given explicitly... Not everything in a Makefile needs to be given explicitly. Make has several builtin rules that allow it to build things automatically. For example, $(CXX), the C++ compiler i