mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
Initial folder structure
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
|
||||
|
||||
project(sim_us_server LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set (VERSION_MAJOR 1)
|
||||
set (VERSION_MINOR 0)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
|
||||
set(PROJECT_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
# defines targets and sources
|
||||
add_subdirectory(src)
|
||||
|
||||
# contains an "external" library we will link to
|
||||
add_subdirectory(external)
|
||||
|
||||
# defines the executable
|
||||
add_subdirectory(tools)
|
||||
|
||||
# enable testing and define tests
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
Vendored
@@ -0,0 +1,31 @@
|
||||
# Third Party
|
||||
include_directories(${GTEST_INCLUDE_DIR})
|
||||
|
||||
link_directories(${GTEST_LIB_DIR})
|
||||
|
||||
find_package(GTest REQUIRED)
|
||||
|
||||
# tests
|
||||
file(GLOB_RECURSE TEST_SOURCES "*.cpp")
|
||||
add_executable(tests ${TEST_SOURCES})
|
||||
target_link_libraries(tests ${LIBS})
|
||||
|
||||
target_compile_options(tests PRIVATE $<$<CONFIG:Debug>:
|
||||
-Wall -Wextra -pedantic-errors -Wconversion -Wsign-conversion
|
||||
>)
|
||||
target_link_libraries(tests
|
||||
PRIVATE
|
||||
gtest
|
||||
GTest::gtest_main
|
||||
)
|
||||
|
||||
target_include_directories(tests
|
||||
PUBLIC
|
||||
${CMAKE_MAIN_SOURCE_DIR}/external/**
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
${CMAKE_MAIN_SOURCE_DIR}/src/**
|
||||
${PROJECT_BINARY_DIR}
|
||||
)
|
||||
|
||||
include(GoogleTest)
|
||||
gtest_discover_tests(tests)
|
||||
Reference in New Issue
Block a user