|
1 | | -cmake_minimum_required (VERSION 3.0) |
2 | | - |
3 | | -option(BUILD_TESTING "Build tests" ON) |
4 | | - |
5 | | -if (WIN32) |
6 | | - set(CMAKE_CXX_STANDARD_LIBRARIES "-static-libgcc -static-libstdc++ ${CMAKE_CXX_STANDARD_LIBRARIES}") |
7 | | - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive") |
8 | | -endif (WIN32) |
9 | | - |
10 | | -set(CMAKE_AUTOMOC ON) |
11 | | -set(CMAKE_AUTORCC ON) |
12 | | -set(CMAKE_AUTOUIC ON) |
13 | | - |
14 | | -find_package(Qt5 COMPONENTS Core Gui Widgets REQUIRED) |
15 | | - |
16 | | -project(fva) |
17 | | - |
18 | | -add_subdirectory(src) |
19 | | - |
20 | | -# Enable testing for the project |
21 | | -if(BUILD_TESTING) |
22 | | - |
23 | | - # Add GoogleTest as a subdirectory. |
24 | | - add_subdirectory(googletest) |
25 | | - |
26 | | - enable_testing() |
27 | | - add_subdirectory(tests) |
28 | | -endif() |
29 | | - |
30 | | - |
31 | | -# Code coverage |
32 | | -if(ENABLE_COVERAGE) |
33 | | - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g -fprofile-arcs -ftest-coverage") |
34 | | - message("Code coverage is enabled and provided with GCC.") |
35 | | -endif() |
| 1 | +cmake_minimum_required(VERSION 3.0) |
| 2 | + |
| 3 | +option(BUILD_TESTING "Build tests" ON) |
| 4 | + |
| 5 | +if (WIN32) |
| 6 | + set(CMAKE_CXX_STANDARD_LIBRARIES |
| 7 | + "-static-libgcc -static-libstdc++ ${CMAKE_CXX_STANDARD_LIBRARIES}") |
| 8 | + set(CMAKE_EXE_LINKER_FLAGS |
| 9 | + "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive") |
| 10 | +endif (WIN32) |
| 11 | + |
| 12 | +set(CMAKE_AUTOMOC ON) |
| 13 | +set(CMAKE_AUTORCC ON) |
| 14 | +set(CMAKE_AUTOUIC ON) |
| 15 | + |
| 16 | +find_package( |
| 17 | + Qt5 |
| 18 | + COMPONENTS Core Gui Widgets |
| 19 | + REQUIRED) |
| 20 | + |
| 21 | +project(fva) |
| 22 | + |
| 23 | +add_subdirectory(src) |
| 24 | + |
| 25 | +# Enable testing for the project |
| 26 | +if (BUILD_TESTING) |
| 27 | + |
| 28 | + # Add GoogleTest as a subdirectory. |
| 29 | + add_subdirectory(googletest) |
| 30 | + |
| 31 | + enable_testing() |
| 32 | + add_subdirectory(tests) |
| 33 | +endif () |
| 34 | + |
| 35 | +# Code coverage |
| 36 | +if (ENABLE_COVERAGE) |
| 37 | + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g -fprofile-arcs -ftest-coverage") |
| 38 | + message("Code coverage is enabled and provided with GCC.") |
| 39 | +endif () |
0 commit comments