diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-01-20 19:52:41 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-01-20 19:52:41 (GMT) |
commit | 80161447bb08638ef4264208600ba1e0b0fcb57a (patch) | |
tree | e0f8f65a67d5cfa2310c4a664948f3b4e0d32a24 /fortran/examples/CMakeLists.txt | |
parent | 77ac7cb908055dd6f5a015207a126c73536685d5 (diff) | |
download | hdf5-80161447bb08638ef4264208600ba1e0b0fcb57a.zip hdf5-80161447bb08638ef4264208600ba1e0b0fcb57a.tar.gz hdf5-80161447bb08638ef4264208600ba1e0b0fcb57a.tar.bz2 |
Merfge changes to CMake test options and add sanitizers
Diffstat (limited to 'fortran/examples/CMakeLists.txt')
-rw-r--r-- | fortran/examples/CMakeLists.txt | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 4067e98..be98963 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -48,33 +48,33 @@ foreach (example ${examples}) if(MSVC) set_property(TARGET f90_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() - if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) + if (NOT BUILD_SHARED_LIBS) target_include_directories (f90_ex_${example} PRIVATE - "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared" + "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static" ) target_link_libraries (f90_ex_${example} PRIVATE - ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} + ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ) set_target_properties (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) else () target_include_directories (f90_ex_${example} PRIVATE - "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static" + "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared" ) target_link_libraries (f90_ex_${example} PRIVATE - ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} + ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ) set_target_properties (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) endif () endforeach () @@ -94,33 +94,33 @@ foreach (example ${F2003_examples}) if(MSVC) set_property(TARGET f03_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() - if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) + if (NOT ONLY_SHARED_LIBS) target_include_directories (f03_ex_${example} PRIVATE - "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared" + "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static" ) target_link_libraries (f03_ex_${example} PRIVATE - ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} + ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ) set_target_properties (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran03 - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) else () target_include_directories (f03_ex_${example} PRIVATE - "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static" + "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared" ) target_link_libraries (f03_ex_${example} PRIVATE - ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} + ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ) set_target_properties (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran03 - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) endif () endforeach () @@ -140,39 +140,39 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) if(MSVC) set_property(TARGET f90_ex_ph5example PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() - if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) + if (NOT ONLY_SHARED_LIBS) target_include_directories (f90_ex_ph5example PRIVATE - "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>" + "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>" ) target_link_libraries (f90_ex_ph5example PRIVATE - ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} + ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}> ) set_target_properties (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) else () target_include_directories (f90_ex_ph5example PRIVATE - "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>" + "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>" ) target_link_libraries (f90_ex_ph5example PRIVATE - ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} + ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}> ) set_target_properties (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran FOLDER examples/fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) endif () endif () -if (BUILD_TESTING) +if (BUILD_TESTING AND HDF5_TEST_FORTRAN AND HDF5_TEST_EXAMPLES) include (CMakeTests.cmake) endif () |