I have a project where I use Google Tests. I have the following CMake file in the root directory:
set(CMAKE_C_COMPILER gcc) cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) project(PROJECT) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(SOURCES src/a.cpp src/b.cpp) set(TESTSOURCES test/tests.cpp src/a.cpp src/br.cpp) set(HEADERS src/a.h src/b.h src/c.h src/c.h) set(CMAKE_CXX_FLAGS "${MAKE_CXX_FLAGS} -std=c++0x") find_package(Qt5 COMPONENTS Core Widgets REQUIRED) find_package(CURL REQUIRED) # Locate GTest find_package(GTest REQUIRED) include_directories(${GTEST_INCLUDE_DIRS}) if(CMAKE_COMPILER_IS_GNUCC) add_definitions(-Wall -Werror -lcurl) endif(CMAKE_COMPILER_IS_GNUCC) add_executable(tests ${TESTSOURCES} ${HEADERS} ) target_link_libraries(beergame-tests curl Qt5::Widgets ${GTEST_LIBRARIES} pthread) For now, I have not added anything about the documentation into the CMakeLists.txt. To generate documentation, I just use doxygen config-file, which creates html/latex documentation in my latex folder. However, it doesn't really open the documentation and its main page.
How can I edit my CMakeLists.txt in such a way that it automatically opens the documentation and with what command?
To run the tests.cpp, I do this:
cd build cmake .. make
doxygencommand outside of CMake. Thank you for clarifying.