Skip to content

Commit

Permalink
[irods#7548] CMake: Consolidate calls to cmake_minimum_required
Browse files Browse the repository at this point in the history
  • Loading branch information
SwooshyCueb authored and alanking committed Mar 7, 2024
1 parent 7811ad3 commit 8677339
Show file tree
Hide file tree
Showing 38 changed files with 5 additions and 106 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets
# CURL::libcurl target
# install() NAMELINK_COMPONENT argument

list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
include(RequireOutOfSourceBuild)

Expand Down
3 changes: 3 additions & 0 deletions cmake/Modules/ObjectTargetHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ functions for working with these targets.

include_guard(GLOBAL)

cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

cmake_policy(PUSH)
cmake_policy(SET CMP0054 NEW)
cmake_policy(SET CMP0051 NEW)
Expand Down
4 changes: 0 additions & 4 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets
# install() NAMELINK_COMPONENT argument

# create irods_common target first, as it's needed in core
add_library(
irods_common
Expand Down
3 changes: 0 additions & 3 deletions lib/administration/resource/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

foreach(variant IN ITEMS client server)
set(target_name "irods_resource_administration_${variant}")

Expand Down
1 change: 0 additions & 1 deletion lib/administration/ticket/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
foreach(variant IN ITEMS client server)
set(target_name "irods_ticket_administration_${variant}")

Expand Down
3 changes: 0 additions & 3 deletions lib/administration/user/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_library(
irods_user_administration_common
OBJECT
Expand Down
3 changes: 0 additions & 3 deletions lib/administration/zone/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

foreach(variant IN ITEMS client server)
set(target_name "irods_zone_administration_${variant}")

Expand Down
3 changes: 0 additions & 3 deletions lib/api/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

foreach(variant IN ITEMS client server)
add_library(
irods_lib_api_${variant}
Expand Down
4 changes: 0 additions & 4 deletions lib/core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets
# install() NAMELINK_COMPONENT argument

configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/include/irods/irods_default_paths.hpp.in"
"${CMAKE_CURRENT_BINARY_DIR}/include/irods/irods_default_paths.hpp"
Expand Down
3 changes: 0 additions & 3 deletions lib/filesystem/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_library(
irods_filesystem_path
OBJECT
Expand Down
3 changes: 0 additions & 3 deletions lib/hasher/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_library(
irods_hasher
OBJECT
Expand Down
2 changes: 0 additions & 2 deletions lib/metadata/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)

foreach(variant IN ITEMS server client)
add_library(
irods_lib_metadata_${variant}
Expand Down
3 changes: 0 additions & 3 deletions lib/rbudp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_library(
irods_rbudp
OBJECT
Expand Down
3 changes: 0 additions & 3 deletions plugins/api/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

# create phony target to build everything in plugins/api folder
add_custom_target(all-plugins-api)
add_dependencies(all-plugins_no_database all-plugins-api)
Expand Down
2 changes: 0 additions & 2 deletions plugins/auth/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# auth plugins using 4.3.0 framework
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

# create phony target to build everything in plugins/auth folder
add_custom_target(all-plugins-auth)
Expand Down
2 changes: 0 additions & 2 deletions plugins/auth_legacy/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# original auth plugins - these are required to exist to talk to older servers
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

# create phony target to build everything in plugins/auth_legacy folder
add_custom_target(all-plugins-auth_legacy)
Expand Down
3 changes: 0 additions & 3 deletions plugins/database/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

# create phony target to build everything in plugins/database folder
add_custom_target(all-plugins-database)
add_dependencies(all-plugins all-plugins-database)
Expand Down
3 changes: 0 additions & 3 deletions plugins/experimental/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

# create phony target to build everything in plugins/experimental folder
add_custom_target(all-plugins-experimental)
add_dependencies(all-plugins_no_database all-plugins-experimental)
Expand Down
3 changes: 0 additions & 3 deletions plugins/microservices/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

set(IRODS_MICROSERVICE_TEST_PLUGINS_BUILD OFF CACHE BOOL "Build microservice plugins designed for testing.")

# create phony target to build everything in plugins/microservices folder
Expand Down
3 changes: 0 additions & 3 deletions plugins/network/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

# create phony target to build everything in plugins/network folder
add_custom_target(all-plugins-network)
add_dependencies(all-plugins_no_database all-plugins-network)
Expand Down
3 changes: 0 additions & 3 deletions plugins/resources/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

# create phony target to build everything in plugins/resources folder
add_custom_target(all-plugins-resources)
add_dependencies(all-plugins_no_database all-plugins-resources)
Expand Down
3 changes: 0 additions & 3 deletions plugins/resources/replication/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_library(
irods_resource_plugin-replication
MODULE
Expand Down
3 changes: 0 additions & 3 deletions plugins/resources/unixfilesystem/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

# anything being unit tested needs to be split out into an object library.
add_library(
irods_resource_plugin_obj-unixfilesystem
Expand Down
3 changes: 0 additions & 3 deletions plugins/rule_engines/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

# create phony target to build everything in plugins/rule_engines folder
add_custom_target(all-plugins-rule_engines)
add_dependencies(all-plugins_no_database all-plugins-rule_engines)
Expand Down
3 changes: 0 additions & 3 deletions plugins/rule_engines/irods_rule_language/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_library(
irods_rule_engine_plugin-irods_rule_language
MODULE
Expand Down
4 changes: 0 additions & 4 deletions server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets
# install() NAMELINK_COMPONENT argument

# create phony target to build everything in server folder
add_custom_target(all-server)

Expand Down
3 changes: 0 additions & 3 deletions server/api/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_library(
irods_server_api
OBJECT
Expand Down
3 changes: 0 additions & 3 deletions server/auth/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

if (NOT PAM_LIBRARY)
find_library(PAM_LIBRARY pam)
if (PAM_LIBRARY)
Expand Down
3 changes: 0 additions & 3 deletions server/control_plane/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/include/irods/"
COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/include/irods/"
Expand Down
3 changes: 0 additions & 3 deletions server/core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_library(
irods_server_core
OBJECT
Expand Down
3 changes: 0 additions & 3 deletions server/delay_server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_executable(
irodsDelayServer
"${CMAKE_CURRENT_SOURCE_DIR}/src/irodsDelayServer.cpp"
Expand Down
3 changes: 0 additions & 3 deletions server/drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_library(
irods_server_drivers
OBJECT
Expand Down
3 changes: 0 additions & 3 deletions server/harness/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

foreach(harness IN ITEMS api configuration)
add_executable(
irods_${harness}_test_harness
Expand Down
3 changes: 0 additions & 3 deletions server/hostname_resolves_to_local_address/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_executable(
hostname_resolves_to_local_address
"${CMAKE_CURRENT_SOURCE_DIR}/src/hostname_resolves_to_local_address.cpp"
Expand Down
3 changes: 0 additions & 3 deletions server/icat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_library(
irods_server_icat
OBJECT
Expand Down
3 changes: 0 additions & 3 deletions server/irods_grid/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# irods-grid was previously part of the iCommands repo

cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_executable(
irods-grid
"${CMAKE_CURRENT_SOURCE_DIR}/src/irods-grid.cpp"
Expand Down
3 changes: 0 additions & 3 deletions server/main_server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_executable(
irodsServer
"${CMAKE_CURRENT_SOURCE_DIR}/src/rodsServer.cpp"
Expand Down
3 changes: 0 additions & 3 deletions server/re/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
# target_link_libraries for object targets

add_library(
irods_server_re
OBJECT
Expand Down

0 comments on commit 8677339

Please sign in to comment.