diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-01-10 23:09:53 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-01-10 23:10:03 (GMT) |
commit | e1bcae8a6a804490aa941a654e99b1dd18251411 (patch) | |
tree | ef2ea266500b5bfea473b15495d850c5640ab1ed /fortran | |
parent | a4cd30d418838bee49ca112fdfbcc199889b4a21 (diff) | |
download | hdf5-e1bcae8a6a804490aa941a654e99b1dd18251411.zip hdf5-e1bcae8a6a804490aa941a654e99b1dd18251411.tar.gz hdf5-e1bcae8a6a804490aa941a654e99b1dd18251411.tar.bz2 |
Update cmake min version and cmake command convention
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/CMakeLists.txt | 12 | ||||
-rw-r--r-- | fortran/examples/CMakeLists.txt | 16 | ||||
-rw-r--r-- | fortran/examples/CMakeTests.cmake | 14 | ||||
-rw-r--r-- | fortran/src/CMakeLists.txt | 56 | ||||
-rw-r--r-- | fortran/test/CMakeLists.txt | 60 | ||||
-rw-r--r-- | fortran/test/CMakeTests.cmake | 10 | ||||
-rw-r--r-- | fortran/testpar/CMakeLists.txt | 6 |
7 files changed, 87 insertions, 87 deletions
diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index c725047..f7179cf 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.1.0) +cmake_minimum_required (VERSION 3.2.2) PROJECT (HDF5_F90 C CXX Fortran) if (H5_HAVE_PARALLEL) @@ -6,8 +6,8 @@ if (H5_HAVE_PARALLEL) set (LINK_LIBS ${LINK_LIBS} ${MPI_Fortran_LIBRARIES}) if (MPI_Fortran_LINK_FLAGS) set (CMAKE_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") - endif (MPI_Fortran_LINK_FLAGS) -endif (H5_HAVE_PARALLEL) + endif () +endif () #----------------------------------------------------------------------------- # Traverse source subdirectory @@ -19,7 +19,7 @@ add_subdirectory (${HDF5_F90_SOURCE_DIR}/src ${HDF5_F90_BINARY_DIR}/src) #----------------------------------------------------------------------------- if (HDF5_BUILD_EXAMPLES) add_subdirectory (${HDF5_F90_SOURCE_DIR}/examples ${HDF5_F90_BINARY_DIR}/examples) -endif (HDF5_BUILD_EXAMPLES) +endif () #----------------------------------------------------------------------------- # Testing @@ -28,5 +28,5 @@ if (BUILD_TESTING) add_subdirectory (${HDF5_F90_SOURCE_DIR}/test ${HDF5_F90_BINARY_DIR}/test) if (MPI_Fortran_FOUND) add_subdirectory (${HDF5_F90_SOURCE_DIR}/testpar ${HDF5_F90_BINARY_DIR}/testpar) - endif (MPI_Fortran_FOUND) -endif (BUILD_TESTING) + endif () +endif () diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index aad5f33..a5c3422 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.1.0) +cmake_minimum_required (VERSION 3.2.2) PROJECT (HDF5_F90_EXAMPLES C CXX Fortran) # -------------------------------------------------------------------- # Notes: When creating examples they should be prefixed @@ -66,8 +66,8 @@ foreach (example ${examples}) FOLDER examples/fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) - endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) -endforeach (example ${examples}) + endif () +endforeach () foreach (example ${F2003_examples}) add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) @@ -97,8 +97,8 @@ foreach (example ${F2003_examples}) FOLDER examples/fortran03 Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) - endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) -endforeach (example ${F2003_examples}) + endif () +endforeach () if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) @@ -130,9 +130,9 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) FOLDER examples/fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) - endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) -endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) + endif () +endif () if (BUILD_TESTING) include (CMakeTests.cmake) -endif (BUILD_TESTING) +endif () diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake index 34230c8..f150130 100644 --- a/fortran/examples/CMakeTests.cmake +++ b/fortran/examples/CMakeTests.cmake @@ -28,7 +28,7 @@ ) if (NOT "${last_test}" STREQUAL "") set_tests_properties (f90_ex-clear-objects PROPERTIES DEPENDS ${last_test}) - endif (NOT "${last_test}" STREQUAL "") + endif () set (last_test "f90_ex-clear-objects") if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) add_test ( @@ -53,24 +53,24 @@ ) if (NOT "${last_test}" STREQUAL "") set_tests_properties (f90_ex-shared-clear-objects PROPERTIES DEPENDS ${last_test}) - endif (NOT "${last_test}" STREQUAL "") + endif () set (last_test "f90_ex-shared-clear-objects") - endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) + endif () foreach (example ${examples}) add_test (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>) if (NOT "${last_test}" STREQUAL "") set_tests_properties (f90_ex_${example} PROPERTIES DEPENDS ${last_test}) - endif (NOT "${last_test}" STREQUAL "") + endif () set (last_test "f90_ex_${example}") if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) add_test (NAME f90_ex-shared_${example} COMMAND $<TARGET_FILE:f90_ex_${example}-shared>) if (NOT "${last_test}" STREQUAL "") set_tests_properties (f90_ex-shared_${example} PROPERTIES DEPENDS ${last_test}) - endif (NOT "${last_test}" STREQUAL "") + endif () set (last_test "f90_ex-shared_${example}") - endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) -endforeach (example ${examples}) + endif () +endforeach () if (HDF5_ENABLE_F2003) foreach (example ${F2003_examples}) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index a74459f..5d03b3f 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.1.0) +cmake_minimum_required (VERSION 3.2.2) PROJECT (HDF5_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- @@ -8,16 +8,16 @@ if (WIN32) if (MSVC) if (NOT H5_HAVE_PARALLEL) set (H5_NOPAREXP ";") - endif (NOT H5_HAVE_PARALLEL) + endif () if (NOT HDF5_ENABLE_F2003) set (H5_NOF03EXP ";") - else (NOT HDF5_ENABLE_F2003) + else () set (H5_F03EXP ";") - endif (NOT HDF5_ENABLE_F2003) + endif () configure_file (${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def.in ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def @ONLY) - endif (MSVC) - endif (BUILD_SHARED_LIBS) -endif (WIN32) + endif () + endif () +endif () # configure for Fortran preprocessor @@ -25,12 +25,12 @@ endif (WIN32) set (CMAKE_H5_HAVE_PARALLEL 0) if (H5_HAVE_PARALLEL) set (CMAKE_H5_HAVE_PARALLEL 1) -endif (H5_HAVE_PARALLEL) +endif () set (CMAKE_H5_HAVE_FLOAT128 0) if (HAVE_FLOAT128) set (CMAKE_H5_HAVE_FLOAT128 1) -endif(HAVE_FLOAT128) +endif () configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${CMAKE_BINARY_DIR}/H5config_f.inc @ONLY) configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.in ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h @ONLY) @@ -53,12 +53,12 @@ if (WIN32 AND MSVC) PROPERTIES COMPILE_FLAGS "/MT" ) - endif (BUILD_SHARED_LIBS) + endif () set_target_properties (H5_buildiface PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE" ) -endif (WIN32 AND MSVC) +endif () set_target_properties (H5_buildiface PROPERTIES LINKER_LANGUAGE Fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} @@ -68,15 +68,15 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared") if (WIN32) set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE}) - else (WIN32) + else () set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - endif (WIN32) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) + endif () +endif () if (WIN32) set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${CMAKE_BUILD_TYPE}) -else (WIN32) +else () set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) -endif (WIN32) +endif () INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) @@ -150,7 +150,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 ) set (install_targets ${install_targets} ${HDF5_F90_C_LIBSH_TARGET}) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () #----------------------------------------------------------------------------- # Fortran Modules @@ -186,7 +186,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) DEPENDS ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 ) set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 PROPERTIES GENERATED TRUE) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () set (f90_F_BASE_SOURCES # normal distribution @@ -233,7 +233,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) # normal distribution ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90 ) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () #----------------------------------------------------------------------------- # Add Main fortran library @@ -244,7 +244,7 @@ TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET}) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_link_libraries (${HDF5_F90_LIB_TARGET} ${MPI_Fortran_LIBRARIES}) -endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) +endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC) set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES @@ -257,7 +257,7 @@ if (WIN32) set_property (TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "HDF5F90_WINDOWS" ) -endif (WIN32) +endif () set (install_targets ${install_targets} ${HDF5_F90_LIB_TARGET}) add_dependencies(${HDF5_F90_LIB_TARGET} H5gen) @@ -266,12 +266,12 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) set (SHARED_LINK_FLAGS " ") if (WIN32 AND MSVC) set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") - endif (WIN32 AND MSVC) + endif () TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) target_link_libraries (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) target_link_libraries (${HDF5_F90_LIBSH_TARGET} ${MPI_Fortran_LIBRARIES}) - endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) + endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED ${HDF5_F_PACKAGE_SOVERSION}) set_target_properties (${HDF5_F90_LIBSH_TARGET} PROPERTIES @@ -286,10 +286,10 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) set_property (TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_DLL;HDF5F90_WINDOWS" ) - endif (WIN32) + endif () set (install_targets ${install_targets} ${HDF5_F90_LIBSH_TARGET}) add_dependencies(${HDF5_F90_LIBSH_TARGET} H5genSH) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () #----------------------------------------------------------------------------- # Add file(s) to CMake Install @@ -367,7 +367,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) COMPONENT fortheaders ) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () #----------------------------------------------------------------------------- # Add Target(s) to CMake Install for import into other projects @@ -376,7 +376,7 @@ if (HDF5_EXPORTED_TARGETS) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) INSTALL_TARGET_PDB (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries) #INSTALL_TARGET_PDB (${HDF5_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries) - endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) + endif () install ( TARGETS @@ -389,4 +389,4 @@ if (HDF5_EXPORTED_TARGETS) FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT fortlibraries INCLUDES DESTINATION include ) -endif (HDF5_EXPORTED_TARGETS) +endif () diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 5b11a0a..1661a10 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.1.0) +cmake_minimum_required (VERSION 3.2.2) PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- @@ -21,12 +21,12 @@ if (WIN32 AND MSVC) PROPERTIES COMPILE_FLAGS "/MT" ) - endif (BUILD_SHARED_LIBS) + endif () set_target_properties (H5_test_buildiface PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE" ) -endif (WIN32 AND MSVC) +endif () set_target_properties (H5_test_buildiface PROPERTIES LINKER_LANGUAGE Fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} @@ -36,15 +36,15 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared") if (WIN32) set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE}) - else (WIN32) + else () set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - endif (WIN32) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) + endif () +endif () if (WIN32) set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${CMAKE_BUILD_TYPE}) -else (WIN32) +else () set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) -endif (WIN32) +endif () INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${MOD_BUILD_DIR}) @@ -79,7 +79,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1 ) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () set (CMD $<TARGET_FILE:H5_test_buildiface>) add_custom_command ( @@ -107,7 +107,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) DEPENDS ${HDF5_F90_BINARY_DIR}/shared/tf_gen.F90 ) set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/tf_gen.F90 PROPERTIES GENERATED TRUE) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () set (HDF5_F90_TF_SOURCES # generated files @@ -126,7 +126,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) tf.F90 ) set_source_files_properties (${HDF5_F90_TF_SOURCES_SHARED} PROPERTIES LANGUAGE Fortran) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC ${HDF5_F90_TF_SOURCES}) TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} STATIC " " " ") @@ -147,7 +147,7 @@ if (WIN32) set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "HDF5F90_WINDOWS" ) -endif (WIN32) +endif () add_dependencies(${HDF5_F90_TEST_LIB_TARGET} H5testgen) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) @@ -155,7 +155,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) set (SHARED_LINK_FLAGS " ") if (WIN32 AND MSVC) set (SHARED_LINK_FLAGS "/DLL") - endif (WIN32 AND MSVC) + endif () TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS}) target_link_libraries (${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_C_TEST_LIBSH_TARGET} @@ -176,9 +176,9 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) set_property (TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_TEST_DLL;HDF5F90_WINDOWS" ) - endif (WIN32) + endif () add_dependencies(${HDF5_F90_TEST_LIBSH_TARGET} H5testgenSH) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () #----------------------------------------------------------------------------- # Add Tests @@ -211,7 +211,7 @@ target_link_libraries (testhdf5_fortran ) if (WIN32 AND MSVC) target_link_libraries (testhdf5_fortran "ws2_32.lib") -endif (WIN32 AND MSVC) +endif () target_include_directories (testhdf5_fortran PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran @@ -247,7 +247,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) ) if (WIN32 AND MSVC) target_link_libraries (testhdf5_fortran-shared "ws2_32.lib") - endif (WIN32 AND MSVC) + endif () target_include_directories (testhdf5_fortran-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) set_target_properties (testhdf5_fortran-shared PROPERTIES LINKER_LANGUAGE Fortran @@ -255,7 +255,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) add_dependencies (testhdf5_fortran-shared ${HDF5_F90_TEST_LIBSH_TARGET}) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () #-- Adding test for testhdf5_fortran_1_8 add_executable (testhdf5_fortran_1_8 @@ -275,7 +275,7 @@ target_link_libraries (testhdf5_fortran_1_8 ) if (WIN32 AND MSVC) target_link_libraries (testhdf5_fortran_1_8 "ws2_32.lib") -endif (WIN32 AND MSVC) +endif () target_include_directories (testhdf5_fortran_1_8 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran @@ -302,7 +302,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) ) if (WIN32 AND MSVC) target_link_libraries (testhdf5_fortran_1_8-shared "ws2_32.lib") - endif (WIN32 AND MSVC) + endif () target_include_directories (testhdf5_fortran_1_8-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) set_target_properties (testhdf5_fortran_1_8-shared PROPERTIES LINKER_LANGUAGE Fortran @@ -310,7 +310,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) add_dependencies (testhdf5_fortran_1_8-shared ${HDF5_F90_TEST_LIBSH_TARGET}) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () #-- Adding test for fortranlib_test_F03 add_executable (fortranlib_test_F03 @@ -332,7 +332,7 @@ target_link_libraries (fortranlib_test_F03 ) if (WIN32 AND MSVC) target_link_libraries (fortranlib_test_F03 "ws2_32.lib") -endif (WIN32 AND MSVC) +endif () target_include_directories (fortranlib_test_F03 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (fortranlib_test_F03 PROPERTIES LINKER_LANGUAGE Fortran @@ -361,7 +361,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) ) if (WIN32 AND MSVC) target_link_libraries (fortranlib_test_F03-shared "ws2_32.lib") - endif (WIN32 AND MSVC) + endif () target_include_directories (fortranlib_test_F03-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) set_target_properties (fortranlib_test_F03-shared PROPERTIES @@ -370,7 +370,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) add_dependencies (fortranlib_test_F03-shared ${HDF5_F90_TEST_LIBSH_TARGET}) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () #-- Adding test for fflush1 add_executable (fflush1 fflush1.F90) @@ -383,7 +383,7 @@ target_link_libraries (fflush1 ) if (WIN32 AND MSVC) target_link_libraries (fflush1 "ws2_32.lib") -endif (WIN32 AND MSVC) +endif () target_include_directories (fflush1 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (fflush1 PROPERTIES LINKER_LANGUAGE Fortran @@ -403,7 +403,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) ) if (WIN32 AND MSVC) target_link_libraries (fflush1-shared "ws2_32.lib") - endif (WIN32 AND MSVC) + endif () target_include_directories (fflush1-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) set_target_properties (fflush1-shared PROPERTIES LINKER_LANGUAGE Fortran @@ -411,7 +411,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) add_dependencies (fflush1-shared ${HDF5_F90_TEST_LIBSH_TARGET}) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () #-- Adding test for fflush2 add_executable (fflush2 fflush2.F90) @@ -424,7 +424,7 @@ target_link_libraries (fflush2 ) if (WIN32 AND MSVC) target_link_libraries (fflush2 "ws2_32.lib") -endif (WIN32 AND MSVC) +endif () target_include_directories (fflush2 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (fflush2 PROPERTIES LINKER_LANGUAGE Fortran @@ -444,7 +444,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) ) if (WIN32 AND MSVC) target_link_libraries (fflush2-shared "ws2_32.lib") - endif (WIN32 AND MSVC) + endif () target_include_directories (fflush2-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) set_target_properties (fflush2-shared PROPERTIES LINKER_LANGUAGE Fortran @@ -452,6 +452,6 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) add_dependencies (fflush2-shared ${HDF5_F90_TEST_LIBSH_TARGET}) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () include (CMakeTests.cmake) diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake index e91e820..6c86cfa 100644 --- a/fortran/test/CMakeTests.cmake +++ b/fortran/test/CMakeTests.cmake @@ -6,7 +6,7 @@ ############################################################################## if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/fshared") -endif (BUILD_SHARED_LIBS) +endif () # Remove any output file left over from previous test run add_test ( @@ -49,7 +49,7 @@ add_test ( ) if (NOT "${last_test}" STREQUAL "") set_tests_properties (FORTRAN_testhdf5-clear-objects PROPERTIES DEPENDS ${last_test}) -endif (NOT "${last_test}" STREQUAL "") +endif () set (last_test "FORTRAN_testhdf5-clear-objects") add_test (NAME FORTRAN_testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>) @@ -66,7 +66,7 @@ if (HDF5_ENABLE_F2003) add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>) set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") set_tests_properties (FORTRAN_fortranlib_test_F03 PROPERTIES DEPENDS FORTRAN_testhdf5_fortran_1_8) -endif (HDF5_ENABLE_F2003) +endif () #-- Adding test for fflush1 add_test (NAME FORTRAN_fflush1 COMMAND $<TARGET_FILE:fflush1>) @@ -133,7 +133,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) add_test (NAME FORTRAN_fortranlib_test_F03-shared COMMAND $<TARGET_FILE:fortranlib_test_F03-shared>) set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s") set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES DEPENDS FORTRAN_fortranlib_test_F03) - endif (HDF5_ENABLE_F2003) + endif () #-- Adding test for fflush1 add_test (NAME FORTRAN_fflush1-shared COMMAND $<TARGET_FILE:fflush1-shared>) @@ -142,4 +142,4 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) #-- Adding test for fflush2 add_test (NAME FORTRAN_fflush2-shared COMMAND $<TARGET_FILE:fflush2-shared>) set_tests_properties (FORTRAN_fflush2-shared PROPERTIES DEPENDS FORTRAN_fflush1-shared) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +endif () diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index 4f21419..ae88ebc 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.1.0) +cmake_minimum_required (VERSION 3.2.2) PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran) #----------------------------------------------------------------------------- @@ -18,7 +18,7 @@ add_executable (parallel_test ) TARGET_NAMING (parallel_test STATIC) TARGET_FORTRAN_PROPERTIES (parallel_test STATIC " " " ") -target_link_libraries (parallel_test +target_link_libraries (parallel_test ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} @@ -26,7 +26,7 @@ target_link_libraries (parallel_test ) if (WIN32 AND MSVC) target_link_libraries (parallel_test "ws2_32.lib") -endif (WIN32 AND MSVC) +endif () target_include_directories (parallel_test PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static) set_target_properties (parallel_test PROPERTIES LINKER_LANGUAGE Fortran) set_target_properties (parallel_test PROPERTIES FOLDER test/fortran) |