Added examples folder and CMakeLists.txt in repo root directory

This commit is contained in:
Andreas Tsouchlos 2022-02-13 17:40:33 +01:00
parent 9c5a73e2bd
commit 9626f5efc4
4 changed files with 38 additions and 18 deletions

23
CMakeLists.txt Normal file
View File

@ -0,0 +1,23 @@
cmake_minimum_required(VERSION 3.21)
project(const_fmt)
set(CMAKE_CXX_STANDARD 20)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
include_directories(.)
add_subdirectory(examples)
option(PACKAGE_TESTS "Build the tests" ON)
if(PACKAGE_TESTS)
enable_testing()
include(GoogleTest)
add_subdirectory(test)
endif()

7
examples/CMakeLists.txt Normal file
View File

@ -0,0 +1,7 @@
add_executable(const_fmt_example src/examples.cpp)
if(MSVC)
target_compile_options(const_fmt_example PRIVATE /W4 /WX)
else()
target_compile_options(const_fmt_example PRIVATE -O3 -Wall -Wextra -pedantic -fno-exceptions)
endif()

View File

@ -0,0 +1,8 @@
#include <const_fmt/format.h>
#include <iostream>
int main() {
// TODO
return 0;
}

View File

@ -1,21 +1,3 @@
cmake_minimum_required(VERSION 3.21)
project(logger)
set(CMAKE_CXX_STANDARD 20)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
include_directories(..)
enable_testing()
include(GoogleTest)
add_subdirectory("googletest")
mark_as_advanced(