Skip to content

Commit e2925d4

Browse files
authored
Remove/Improve some TODOs (#24)
1 parent a4281f9 commit e2925d4

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
cmake_minimum_required(VERSION 3.12.4)
2+
# when increasing the minium required version, consider updating in examples as well
23

34
file(STRINGS "version.txt" __CPP_BINDGEN_VERSION)
45
project(cpp_bindgen VERSION ${__CPP_BINDGEN_VERSION} LANGUAGES CXX)

example/simple/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.12.4) #TODO replace with generated version
1+
cmake_minimum_required(VERSION 3.12.4)
22
project(simple_example LANGUAGES CXX C Fortran)
33

44
# 1) find installed c_bindings version
@@ -10,4 +10,3 @@ cpp_bindgen_add_library(simple SOURCES simple.cpp)
1010
# 3) link the library to a fortran executable
1111
add_executable(driver driver.f90)
1212
target_link_libraries(driver simple_fortran)
13-

example/simple_fetch_content/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
cmake_minimum_required(VERSION 3.12.4) #TODO replace with generated version
1+
cmake_minimum_required(VERSION 3.12.4)
22
project(simple_example_with_fetch_content LANGUAGES CXX Fortran)
33

44
# 1) fetch cpp_bindgen from the repository
5-
# TODO: use FetchContent_MakeAvailable() once we require CMake 3.14+
65
include(FetchContent)
76
FetchContent_Declare(
87
cpp_bindgen
@@ -12,7 +11,7 @@ FetchContent_Declare(
1211
# GIT_REPOSITORY https://github.com/GridTools/cpp_bindgen.git
1312
# GIT_TAG master # consider replacing master by a tagged version
1413
)
15-
# FetchContent_MakeAvailable(cpp_bindgen) for CMake >= 3.14
14+
# FetchContent_MakeAvailable(cpp_bindgen) for CMake >= 3.14, otherwise:
1615
FetchContent_GetProperties(cpp_bindgen)
1716
if(NOT c_bindings_POPULATED)
1817
FetchContent_Populate(cpp_bindgen)
@@ -25,4 +24,3 @@ cpp_bindgen_add_library(simple SOURCES simple.cpp)
2524
# 3) link the generated library to a fortran executable
2625
add_executable(driver driver.f90)
2726
target_link_libraries(driver simple_fortran)
28-

0 commit comments

Comments
 (0)