diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..7173ca1 --- /dev/null +++ b/CMakeLists.txt @@ -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() diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000..a78653a --- /dev/null +++ b/examples/CMakeLists.txt @@ -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() \ No newline at end of file diff --git a/examples/src/examples.cpp b/examples/src/examples.cpp new file mode 100644 index 0000000..6b857e9 --- /dev/null +++ b/examples/src/examples.cpp @@ -0,0 +1,8 @@ +#include +#include + +int main() { + // TODO + + return 0; +} \ No newline at end of file diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a5d2cc1..e17b605 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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(