Skip to content

Commit

Permalink
test case for freestanding
Browse files Browse the repository at this point in the history
  • Loading branch information
Viatorus committed Apr 21, 2024
1 parent ef62b3a commit fec0d5d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
11 changes: 10 additions & 1 deletion test/compile_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,21 @@ if (PROJECT_IS_TOP_LEVEL)
enable_testing()
endif ()

add_executable(emio_compile ../compile_test/compile.cpp)
add_executable(emio_compile compile.cpp)

target_link_libraries(emio_compile
emio::emio
)

target_compile_features(emio_compile PRIVATE cxx_std_20)

add_executable(emio_compile_freestanding compile.cpp)

target_link_libraries(emio_compile_freestanding
emio::emio
)

target_compile_features(emio_compile_freestanding PRIVATE cxx_std_20)
target_compile_options(emio_compile_freestanding PRIVATE -ffreestanding)

add_folders(CompileTest)
7 changes: 3 additions & 4 deletions test/compile_test/compile.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
//
// Created by neubertt on 09.03.2024.
//
#include "emio/emio.hpp"
#include <emio/emio.hpp>

consteval auto created_with_span_buffer() {
std::array<char, 5> storage{};
Expand Down Expand Up @@ -40,4 +37,6 @@ int main() {
created_with_static_buffer();
created_with_memory_buffer();
created_with_iterator_buffer();

return 0;
}

0 comments on commit fec0d5d

Please sign in to comment.