Skip to content

Commit

Permalink
Bump min CMake version and separate dragonbox.h from dragonbox_to_cha…
Browse files Browse the repository at this point in the history
…rs project
  • Loading branch information
jk-jeon committed Aug 28, 2024
1 parent 78cf82e commit 1dee717
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 16 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(dragonbox
VERSION 1.1.3
Expand All @@ -19,11 +19,11 @@ endif()

# ---- Declare library (dragonbox) ----

add_library(dragonbox INTERFACE)
add_library(dragonbox::dragonbox ALIAS dragonbox)

set(dragonbox_headers include/dragonbox/dragonbox.h)

add_library(dragonbox INTERFACE ${dragonbox_headers})
add_library(dragonbox::dragonbox ALIAS dragonbox)

target_include_directories(dragonbox
${dragonbox_warning_guard}
INTERFACE
Expand All @@ -33,9 +33,7 @@ target_compile_features(dragonbox INTERFACE cxx_std_17)

# ---- Declare library (dragonbox_to_chars) ----

set(dragonbox_to_chars_headers
${dragonbox_headers}
include/dragonbox/dragonbox_to_chars.h)
set(dragonbox_to_chars_headers include/dragonbox/dragonbox_to_chars.h)

set(dragonbox_to_chars_sources source/dragonbox_to_chars.cpp)

Expand All @@ -49,6 +47,8 @@ target_include_directories(dragonbox_to_chars
PUBLIC
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>")

target_link_libraries(dragonbox_to_chars PUBLIC dragonbox)

target_compile_features(dragonbox_to_chars PUBLIC cxx_std_17)

# ---- Install ----
Expand Down
2 changes: 1 addition & 1 deletion subproject/3rdparty/grisu_exact/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(grisu_exact LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion subproject/3rdparty/ryu/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(ryu_cmake LANGUAGES C)

Expand Down
2 changes: 1 addition & 1 deletion subproject/3rdparty/schubfach/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(schubfach LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion subproject/benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(benchmark LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion subproject/common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(dragonbox_common LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion subproject/meta/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(dragonbox_meta LANGUAGES CXX)

Expand Down
6 changes: 4 additions & 2 deletions subproject/simple/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(dragonbox_simple LANGUAGES CXX)

add_library(dragonbox_simple INTERFACE include/simple_dragonbox.h)
set(dragonbox_simple_headers include/simple_dragonbox.h)

add_library(dragonbox_simple INTERFACE ${dragonbox_simple_headers})
add_library(dragonbox::simple ALIAS dragonbox_simple)

target_include_directories(dragonbox_simple
Expand Down
2 changes: 1 addition & 1 deletion subproject/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(dragonboxTests LANGUAGES CXX)

Expand Down

0 comments on commit 1dee717

Please sign in to comment.