Added examples folder and CMakeLists.txt in repo root directory
This commit is contained in:
parent
9c5a73e2bd
commit
9626f5efc4
23
CMakeLists.txt
Normal file
23
CMakeLists.txt
Normal 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
7
examples/CMakeLists.txt
Normal 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()
|
||||||
8
examples/src/examples.cpp
Normal file
8
examples/src/examples.cpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#include <const_fmt/format.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@ -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")
|
add_subdirectory("googletest")
|
||||||
|
|
||||||
mark_as_advanced(
|
mark_as_advanced(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user