Yanyg - Software Engineer

CMake

Modern CMake: 3.0.0.

Books: Large Scale C++ Software Design

add_library(Foo::Foo ALIAS Foo) set(CMAKE_PREFIX_PATH "/prefix") set(as_subproject Foo) macro(find_package) … endmacro()

add_subdirectory(Foo) add_subdirectory(App)

set(ENV{CXXFLAGS} "–coverage") set(CTEST_CMAKE_GENERATOR "Ninja") set(CTEST_COVERAGE_COMMAND "gcov") set(CTEST_MEMORYCHECK_COMMAND "valgrind") ctest_build() ctest_test() ctest_coverage() ctest_memcheck() ctest_submit() add_test(NAME Foo.Test COMMAND foo_test –number 0) ctest -R "Foo,*" -j4 –output-on-failure set(CMAKE_SYSTEM_NAME Windows) set(CMAKE_C_COMPILER "gcc") set(CMAKE_CXX_COMPILER "g++") set(CMAKE_ROOT_PATH /usr/x86_64)

<lang>_CPPLINT LINK_WHAT_YOU_USE -Wl,–no-as-needed, ldd -r -u.

install(TARGETS Foo EXPORT FooTargets)