Skip to content

Commit

Permalink
feat: usar print() y fmt en modo header
Browse files Browse the repository at this point in the history
Preparado para cuando venga en GCC std::print()

Refs: ull-esit-sistemas-operativos/ssoo-apuntes#16
  • Loading branch information
jesustorresdev committed Jun 29, 2023
1 parent d3ae9c4 commit 7678ee7
Show file tree
Hide file tree
Showing 41 changed files with 16,130 additions and 135 deletions.
15 changes: 6 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

Expand All @@ -25,16 +25,12 @@ else()
endif()

set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)

# Usar la librería {fmt} hasta que std::format esté disponible (C++20)
include(FetchContent)
FetchContent_Declare(fmtlib
GIT_REPOSITORY "https://github.com/fmtlib/fmt.git"
GIT_TAG "9.1.0"
include_directories(
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/lib
)
FetchContent_MakeAvailable(fmtlib)

add_subdirectory(src/cap04)
add_subdirectory(src/cap06)
Expand All @@ -44,4 +40,5 @@ add_subdirectory(src/cap11)
add_subdirectory(src/cap12)
add_subdirectory(src/cap13)
add_subdirectory(src/cap17)
add_subdirectory(src/cap19)
add_subdirectory(src/cap19)
add_subdirectory(src/otros)
27 changes: 27 additions & 0 deletions lib/fmt/LICENSE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2012 - present, Victor Zverovich and {fmt} contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

--- Optional exception to the license ---

As an exception, if, as a result of your compiling your source code, portions
of this Software are embedded into a machine-executable object form of such
source code, you may redistribute such embedded portions in such object form
without including the above copyright and permission notices.
Loading

0 comments on commit 7678ee7

Please sign in to comment.