mirror of
https://github.com/progsource/maddy.git
synced 2026-03-24 23:40:39 +01:00
initial release 1.0.0
This commit is contained in:
55
CMakeLists.txt
Normal file
55
CMakeLists.txt
Normal file
@@ -0,0 +1,55 @@
|
||||
# This project is licensed under the MITlicense. For more information see the
|
||||
# LICENSE file.
|
||||
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(maddy)
|
||||
|
||||
enable_testing()
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
set(MADDY_CPP_VERSION 14)
|
||||
add_definitions(-DCPP_VERSION=${MADDY_CPP_VERSION})
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
set(CMAKE_BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build)
|
||||
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
|
||||
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
set(MADDY_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
|
||||
file(GLOB_RECURSE MADDY_TESTS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tests/maddy/*.cpp)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
set(
|
||||
CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} -g -std=c++${MADDY_CPP_VERSION} -Wall -Wpedantic -Wextra -Wno-ignored-qualifiers -fno-rtti -fno-exceptions" # -O2
|
||||
)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libs/gtest/googlemock)
|
||||
add_subdirectory(libs)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
include_directories(
|
||||
${LIBS_INCLUDE_DIRS}
|
||||
${MADDY_INCLUDE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tests
|
||||
)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
add_executable(
|
||||
MaddyTests
|
||||
${MADDY_TESTS_FILES}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tests/main.cpp
|
||||
)
|
||||
target_link_libraries(MaddyTests gmock_main)
|
||||
add_test(MaddyTests ${CMAKE_CURRENT_SOURCE_DIR}/build/MaddyTests)
|
||||
Reference in New Issue
Block a user