mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-12 14:10:07 +00:00
Cleanup add-subdirectory-test
This commit is contained in:
parent
d0abe7c246
commit
2665afb515
@ -1,17 +1,17 @@
|
||||
cmake_minimum_required(VERSION 3.1...3.18)
|
||||
|
||||
project(fmt-test)
|
||||
project(fmt-test CXX)
|
||||
|
||||
add_subdirectory(../.. fmt)
|
||||
|
||||
add_executable(library-test "main.cc")
|
||||
target_link_libraries(library-test fmt::fmt)
|
||||
target_compile_options(library-test PRIVATE ${PEDANTIC_COMPILE_FLAGS})
|
||||
add_executable(library-test main.cc)
|
||||
target_include_directories(library-test PUBLIC SYSTEM .)
|
||||
target_compile_options(library-test PRIVATE ${PEDANTIC_COMPILE_FLAGS})
|
||||
target_link_libraries(library-test fmt::fmt)
|
||||
|
||||
if (TARGET fmt::fmt-header-only)
|
||||
add_executable(header-only-test "main.cc")
|
||||
target_link_libraries(header-only-test fmt::fmt-header-only)
|
||||
target_compile_options(header-only-test PRIVATE ${PEDANTIC_COMPILE_FLAGS})
|
||||
add_executable(header-only-test main.cc)
|
||||
target_include_directories(header-only-test PUBLIC SYSTEM .)
|
||||
target_compile_options(header-only-test PRIVATE ${PEDANTIC_COMPILE_FLAGS})
|
||||
target_link_libraries(header-only-test fmt::fmt-header-only)
|
||||
endif ()
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "fmt/format.h"
|
||||
#include "fmt/core.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
for(int i = 0; i < argc; ++i)
|
||||
fmt::print("{}: {}\n", i, argv[i]);
|
||||
for (int i = 0; i < argc; ++i) fmt::print("{}: {}\n", i, argv[i]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user