summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
Diffstat (limited to 'c++')
-rw-r--r--c++/CMakeLists.txt28
-rw-r--r--c++/examples/CMakeLists.txt30
-rw-r--r--c++/examples/CMakeTests.cmake32
-rw-r--r--c++/src/CMakeLists.txt30
-rw-r--r--c++/test/CMakeLists.txt14
-rw-r--r--c++/test/CMakeTests.cmake20
6 files changed, 77 insertions, 77 deletions
diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt
index 50ea838..9b560a6 100644
--- a/c++/CMakeLists.txt
+++ b/c++/CMakeLists.txt
@@ -4,16 +4,16 @@ PROJECT (HDF5_CPP)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF5_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Shared/Static Libs
#-----------------------------------------------------------------------------
-IF (BUILD_SHARED_LIBS)
- SET (CPP_BUILT_AS_DYNAMIC_LIB 1)
-ELSE (BUILD_SHARED_LIBS)
- SET (CPP_BUILT_AS_STATIC_LIB 1)
-ENDIF (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS)
+ set (CPP_BUILT_AS_DYNAMIC_LIB 1)
+else (BUILD_SHARED_LIBS)
+ set (CPP_BUILT_AS_STATIC_LIB 1)
+endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Generate configure file
@@ -31,23 +31,23 @@ INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR})
#-----------------------------------------------------------------------------
# Parallel/MPI, prevent spurious cpp/cxx warnings
#-----------------------------------------------------------------------------
-IF (H5_HAVE_PARALLEL)
- ADD_DEFINITIONS ("-DMPICH_SKIP_MPICXX")
- ADD_DEFINITIONS ("-DMPICH_IGNORE_CXX_SEEK")
-ENDIF (H5_HAVE_PARALLEL)
+if (H5_HAVE_PARALLEL)
+ add_definitions ("-DMPICH_SKIP_MPICXX")
+ add_definitions ("-DMPICH_IGNORE_CXX_SEEK")
+endif (H5_HAVE_PARALLEL)
ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/src ${HDF5_CPP_BINARY_DIR}/src)
#-----------------------------------------------------------------------------
# Build the CPP Examples
#-----------------------------------------------------------------------------
-IF (HDF5_BUILD_EXAMPLES)
+if (HDF5_BUILD_EXAMPLES)
ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/examples ${HDF5_CPP_BINARY_DIR}/examples)
-ENDIF (HDF5_BUILD_EXAMPLES)
+endif (HDF5_BUILD_EXAMPLES)
#-----------------------------------------------------------------------------
# Build the CPP unit tests
#-----------------------------------------------------------------------------
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/test ${HDF5_CPP_BINARY_DIR}/test)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt
index c79f6c2..b6b1afa 100644
--- a/c++/examples/CMakeLists.txt
+++ b/c++/examples/CMakeLists.txt
@@ -10,7 +10,7 @@ PROJECT (HDF5_CPP_EXAMPLES)
# Define examples
#-----------------------------------------------------------------------------
-SET (examples
+set (examples
create
readdata
writedata
@@ -20,7 +20,7 @@ SET (examples
h5group
)
-SET (tutr_examples
+set (tutr_examples
h5tutr_cmprss
h5tutr_crtdat
h5tutr_crtatt
@@ -32,22 +32,22 @@ SET (tutr_examples
h5tutr_subset
)
-FOREACH (example ${examples})
- ADD_EXECUTABLE (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
+foreach (example ${examples})
+ add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE})
TARGET_C_PROPERTIES (cpp_ex_${example} " " " ")
- TARGET_LINK_LIBRARIES (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
-ENDFOREACH (example ${examples})
+ target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
+endforeach (example ${examples})
-FOREACH (example ${tutr_examples})
- ADD_EXECUTABLE (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
+foreach (example ${tutr_examples})
+ add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE})
TARGET_C_PROPERTIES (cpp_ex_${example} " " " ")
- TARGET_LINK_LIBRARIES (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
-ENDFOREACH (example ${tutr_examples})
+ target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
+endforeach (example ${tutr_examples})
-IF (BUILD_TESTING)
- INCLUDE (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+if (BUILD_TESTING)
+ include (CMakeTests.cmake)
+endif (BUILD_TESTING)
diff --git a/c++/examples/CMakeTests.cmake b/c++/examples/CMakeTests.cmake
index b39dcfe..5725f8e 100644
--- a/c++/examples/CMakeTests.cmake
+++ b/c++/examples/CMakeTests.cmake
@@ -15,18 +15,18 @@
SDSextendible.h5
Select.h5
)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (cpp_ex-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "cpp_ex-clear-objects")
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "cpp_ex-clear-objects")
- FOREACH (example ${examples})
+ foreach (example ${examples})
ADD_TEST (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "cpp_ex_${example}")
- ENDFOREACH (example ${examples})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "cpp_ex_${example}")
+ endforeach (example ${examples})
#the following dependicies are handled by the order of the files
# SET_TESTS_PROPERTIES(cpp_ex_readdata PROPERTIES DEPENDS cpp_ex_create)
# SET_TESTS_PROPERTIES(cpp_ex_chunks PROPERTIES DEPENDS cpp_ex_extend_ds)
@@ -42,18 +42,18 @@
h5tutr_groups.h5
h5tutr_subset.h5
)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (cpp_ex_tutr-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "cpp_ex_tutr-clear-objects")
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "cpp_ex_tutr-clear-objects")
- FOREACH (example ${tutr_examples})
+ foreach (example ${tutr_examples})
ADD_TEST (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "cpp_ex_${example}")
- ENDFOREACH (example ${tutr_examples})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "cpp_ex_${example}")
+ endforeach (example ${tutr_examples})
#the following dependicies are handled by the order of the files
# SET_TESTS_PROPERTIES(cpp_ex_h5tutr_crtatt PROPERTIES DEPENDS cpp_ex_h5tutr_crtdat)
# SET_TESTS_PROPERTIES(cpp_ex_h5tutr_rdwt PROPERTIES DEPENDS cpp_ex_h5tutr_crtdat)
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index af6283a..15eeacc 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -4,9 +4,9 @@ PROJECT (HDF5_CPP_SRC)
#-----------------------------------------------------------------------------
# Shared/Static Libs
#-----------------------------------------------------------------------------
-IF (BUILD_SHARED_LIBS)
- SET (CPP_BUILT_AS_DYNAMIC_LIB 1)
-ENDIF (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS)
+ set (CPP_BUILT_AS_DYNAMIC_LIB 1)
+endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Generate configure file
@@ -18,7 +18,7 @@ CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
#-----------------------------------------------------------------------------
# Define cpp Library
#-----------------------------------------------------------------------------
-SET (CPP_SRCS
+set (CPP_SRCS
${HDF5_CPP_SRC_SOURCE_DIR}/H5AbstractDs.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5ArrayType.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5AtomType.cpp
@@ -48,7 +48,7 @@ SET (CPP_SRCS
${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.cpp
)
-SET (CPP_HDRS
+set (CPP_HDRS
${HDF5_CPP_SRC_SOURCE_DIR}/H5AbstractDs.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5Alltypes.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5ArrayType.h
@@ -83,17 +83,17 @@ SET (CPP_HDRS
${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.h
)
-ADD_LIBRARY (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} ${CPP_SRCS} ${CPP_HDRS})
+add_library (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} ${CPP_SRCS} ${CPP_HDRS})
TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} " " " ")
-TARGET_LINK_LIBRARIES (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}")
+target_link_libraries (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} ${LIB_TYPE})
-SET_TARGET_PROPERTIES (${HDF5_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/cpp)
+set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/cpp)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-INSTALL (
+install (
FILES
${CPP_HDRS}
DESTINATION
@@ -105,12 +105,12 @@ INSTALL (
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
-IF (HDF5_EXPORTED_TARGETS)
- IF (BUILD_SHARED_LIBS)
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} cpplibraries)
- ENDIF (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS)
- INSTALL (
+ install (
TARGETS
${HDF5_CPP_LIB_TARGET}
EXPORT
@@ -119,4 +119,4 @@ IF (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT cpplibraries
)
-ENDIF (HDF5_EXPORTED_TARGETS)
+endif (HDF5_EXPORTED_TARGETS)
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index e498fc5..01a0179 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -11,7 +11,7 @@ PROJECT (HDF5_CPP_TEST)
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
-SET (CPP_TEST_SRCS
+set (CPP_TEST_SRCS
${HDF5_CPP_TEST_SOURCE_DIR}/testhdf5.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/tattr.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/tcompound.cpp
@@ -29,27 +29,27 @@ SET (CPP_TEST_SRCS
#-----------------------------------------------------------------------------
# Generate the H5srcdir_str.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
-SET (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
+set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
CONFIGURE_FILE (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR} )
-ADD_EXECUTABLE (cpp_testhdf5 ${CPP_TEST_SRCS} )
+add_executable (cpp_testhdf5 ${CPP_TEST_SRCS} )
TARGET_NAMING (cpp_testhdf5 ${LIB_TYPE})
TARGET_C_PROPERTIES (cpp_testhdf5 " " " ")
-TARGET_LINK_LIBRARIES (cpp_testhdf5
+target_link_libraries (cpp_testhdf5
${HDF5_CPP_LIB_TARGET}
${HDF5_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
)
-SET_TARGET_PROPERTIES (cpp_testhdf5 PROPERTIES FOLDER test/cpp)
+set_target_properties (cpp_testhdf5 PROPERTIES FOLDER test/cpp)
-ADD_CUSTOM_COMMAND (
+add_custom_command (
TARGET cpp_testhdf5
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_CPP_TEST_SOURCE_DIR}/th5s.h5 ${PROJECT_BINARY_DIR}/th5s.h5
)
-INCLUDE (CMakeTests.cmake)
+include (CMakeTests.cmake)
diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake
index 3e4f6d9..ac1f111 100644
--- a/c++/test/CMakeTests.cmake
+++ b/c++/test/CMakeTests.cmake
@@ -20,9 +20,9 @@ ADD_TEST (
ADD_TEST (NAME cpp_testhdf5 COMMAND $<TARGET_FILE:cpp_testhdf5>)
SET_TESTS_PROPERTIES (cpp_testhdf5 PROPERTIES DEPENDS cpp_testhdf5-clear-objects)
-IF (HDF5_TEST_VFD)
+if (HDF5_TEST_VFD)
- SET (VFD_LIST
+ set (VFD_LIST
sec2
stdio
core
@@ -31,12 +31,12 @@ IF (HDF5_TEST_VFD)
family
)
- IF (DIRECT_VFD)
- SET (VFD_LIST ${VFD_LIST} direct)
- ENDIF (DIRECT_VFD)
+ if (DIRECT_VFD)
+ set (VFD_LIST ${VFD_LIST} direct)
+ endif (DIRECT_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME VFD-${vfdname}-cpp_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -60,12 +60,12 @@ IF (HDF5_TEST_VFD)
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
)
SET_TESTS_PROPERTIES (VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS VFD-${vfdname}-cpp_testhdf5-clear-objects)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_VFD_TEST)
# Run test with different Virtual File Driver
- FOREACH (vfd ${VFD_LIST})
+ foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)
- ENDFOREACH (vfd ${VFD_LIST})
+ endforeach (vfd ${VFD_LIST})
-ENDIF (HDF5_TEST_VFD)
+endif (HDF5_TEST_VFD)