Skip to content

Commit

Permalink
move cpp20 things to cpp20 subdir
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl committed Nov 21, 2024
1 parent 7f551b2 commit 30c4346
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 11 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ set(CMAKE_CXX_STANDARD 20 CACHE STRING "C++ Standard")
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_subdirectory(spffl)
add_subdirectory(spffl20)
add_subdirectory(lib)
add_subdirectory(cli)

enable_testing()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")
add_subdirectory(test)
add_subdirectory(test20)

# ----------------------------------------------------------------
install(
Expand Down
29 changes: 29 additions & 0 deletions cpp20/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cmake_minimum_required (VERSION 3.24)

project(spffl20)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

set(CMAKE_CXX_FLAGS_RELEASE "-O2")

set(CMAKE_CXX_STANDARD 20 CACHE STRING "C++ Standard")
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_subdirectory(spffl)
#add_subdirectory(lib)
#add_subdirectory(cli)

enable_testing()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")
add_subdirectory(test)

# ----------------------------------------------------------------
#install(
# DIRECTORY "spffl/" # The trailing slash is important so "spffl" isn't a part of the install path
# DESTINATION "include/spffl"
# FILES_MATCHING PATTERN "*.h"
#)
#install(TARGETS spffl DESTINATION lib)
#install(TARGETS spiff DESTINATION bin)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions cpp20/test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is Catch2 for `cpp20/spffl`.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project(test_base)
project(test_mod)

# ----------------------------------------------------------------
# catch2 has a set-but-unused-variable warning as of MacOS 13.3.
Expand Down
7 changes: 7 additions & 0 deletions cpp20/test/mod/test_mod.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <catch2/catch_test_macros.hpp>

#include "spffl/mod/foo.h"

TEST_CASE("spffl::mod::foo") {
CHECK(foo(2,3) == 5);
}
1 change: 0 additions & 1 deletion test20/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions test20/mod/test_mod.cpp

This file was deleted.

0 comments on commit 30c4346

Please sign in to comment.