stc_rpncalc/CMakeLists.txt

28 lines
689 B
CMake
Raw Normal View History

2019-11-20 07:54:04 +01:00
cmake_minimum_required(VERSION 3.1)
2020-09-04 20:54:39 +02:00
project(stc_rpncalc C CXX)
2019-04-03 06:07:15 +02:00
# 3rd party tools
find_package(Qt5 COMPONENTS Widgets Qml Quick REQUIRED)
2020-09-09 19:06:49 +02:00
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
message(STATUS "using address sanitizer")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls")
link_libraries(asan)
2020-09-09 19:06:49 +02:00
endif()
2020-09-05 10:55:54 +02:00
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (for tests debug make sense)")
# Compiler warnings
if(MSVC)
add_compile_options(/W4 /WX)
else()
add_compile_options(-Wall -Wextra -pedantic)
endif()
# CTest Catch2 tests
enable_testing()
2019-04-03 06:07:15 +02:00
# Directory with source code
add_subdirectory(src)
add_subdirectory(qt_gui)