diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-01-10 17:27:41 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-01-10 17:27:41 (GMT) |
commit | e994a90cdf664113b443aa93a83b8bed0159d2f3 (patch) | |
tree | c22fa3642fea7126c93186928559b9a65c0c8846 /fortran/test | |
parent | 7bd06dccb543a35763a967e3f84f3c8d89f0c538 (diff) | |
download | hdf5-e994a90cdf664113b443aa93a83b8bed0159d2f3.zip hdf5-e994a90cdf664113b443aa93a83b8bed0159d2f3.tar.gz hdf5-e994a90cdf664113b443aa93a83b8bed0159d2f3.tar.bz2 |
HDFFV-10385 fix CMAKE_BUILD_TYPE usage
Diffstat (limited to 'fortran/test')
-rw-r--r-- | fortran/test/CMakeLists.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index c362564..eefb62f 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -4,13 +4,21 @@ PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- # Setup include Directories #----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) +INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) + +if (BUILD_SHARED_LIBS) + file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared") + set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF5_CFG_BUILD_TYPE}) +endif () +file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static") +set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF5_CFG_BUILD_TYPE}) #----------------------------------------------------------------------------- # Add Test Lib #----------------------------------------------------------------------------- add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c) set_source_files_properties (t.c PROPERTIES LANGUAGE C) +target_include_directories(${HDF5_F90_C_TEST_LIB_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/static) TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} @@ -24,6 +32,7 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES ) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c) + target_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET} PRIVATE ${HDF5_F90_BINARY_DIR}/shared) TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} |