summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-08-11 15:06:50 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-08-11 15:06:50 (GMT)
commit39b216eb4ff63d4d81bdd793afdf6ba23b2f8c6b (patch)
tree7bd933f0f14b869f89de1e4ad09dc33a7ae71213
parent2a3349fc21653f9896074dac8295a4146eaceb70 (diff)
downloadhdf5-39b216eb4ff63d4d81bdd793afdf6ba23b2f8c6b.zip
hdf5-39b216eb4ff63d4d81bdd793afdf6ba23b2f8c6b.tar.gz
hdf5-39b216eb4ff63d4d81bdd793afdf6ba23b2f8c6b.tar.bz2
[svn-r19225] Moved subfolder checked outside of OPTION command. If folder doesn't exists, there is no reason to have option enabled.
Tested: local linux
-rw-r--r--CMakeLists.txt71
1 files changed, 34 insertions, 37 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0e44caa..118b617 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -509,65 +509,62 @@ ENDIF (BUILD_TESTING)
# Make sure this appears before the CONFIGURE_FILE step
# so that fortran name mangling is detected before writing H5pubconf.h
#-----------------------------------------------------------------------------
-OPTION (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF)
-IF (HDF5_BUILD_FORTRAN)
- # Set default name mangling : overridden by Fortran detection in fortran dir
- SET (H5_FC_FUNC "H5_FC_FUNC(name,NAME) name ## _")
- SET (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _")
- IF(EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
+# Set default name mangling : overridden by Fortran detection in fortran dir
+SET (H5_FC_FUNC "H5_FC_FUNC(name,NAME) name ## _")
+SET (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _")
+IF(EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
+ OPTION (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF)
+ IF (HDF5_BUILD_FORTRAN)
ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/fortran ${PROJECT_BINARY_DIR}/fortran)
- ENDIF(EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
- IF (HDF5_BUILD_HL_LIB)
- IF(EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran")
- #-- Build the High Level Fortran source codes
- ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/hl/fortran ${HDF5_BINARY_DIR}/hl/fortran)
- ENDIF(EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran")
- ENDIF (HDF5_BUILD_HL_LIB)
-ELSE (HDF5_BUILD_FORTRAN)
- SET (H5_FC_FUNC "H5_FC_FUNC(name,NAME) name ## _")
- SET (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _")
-ENDIF (HDF5_BUILD_FORTRAN)
+ IF (HDF5_BUILD_HL_LIB)
+ IF(EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran")
+ #-- Build the High Level Fortran source codes
+ ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/hl/fortran ${HDF5_BINARY_DIR}/hl/fortran)
+ ENDIF(EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran")
+ ENDIF (HDF5_BUILD_HL_LIB)
+ ENDIF (HDF5_BUILD_FORTRAN)
+ENDIF(EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
#-----------------------------------------------------------------------------
# Option to build examples
#-----------------------------------------------------------------------------
-OPTION (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" OFF)
-IF (HDF5_BUILD_EXAMPLES)
- IF(EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
+IF(EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
+ OPTION (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" OFF)
+ IF (HDF5_BUILD_EXAMPLES)
ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/examples ${PROJECT_BINARY_DIR}/examples)
- ENDIF(EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
-ENDIF (HDF5_BUILD_EXAMPLES)
+ ENDIF (HDF5_BUILD_EXAMPLES)
+ENDIF(EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
#-----------------------------------------------------------------------------
# Option to build HDF5 C++ Library
#-----------------------------------------------------------------------------
-OPTION (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF)
-IF (HDF5_BUILD_CPP_LIB)
- IF(EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
+IF(EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
+ OPTION (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF)
+ IF (HDF5_BUILD_CPP_LIB)
ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/c++ ${PROJECT_BINARY_DIR}/c++)
- ENDIF(EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
-ENDIF (HDF5_BUILD_CPP_LIB)
+ ENDIF (HDF5_BUILD_CPP_LIB)
+ENDIF(EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
#-----------------------------------------------------------------------------
# Option to build HDF5 Tools
#-----------------------------------------------------------------------------
-OPTION (HDF5_BUILD_TOOLS "Build HDF5 Tools" OFF)
-IF (HDF5_BUILD_TOOLS)
- IF(EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
+IF(EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
+ OPTION (HDF5_BUILD_TOOLS "Build HDF5 Tools" OFF)
+ IF (HDF5_BUILD_TOOLS)
ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools)
- ENDIF(EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
-ENDIF (HDF5_BUILD_TOOLS)
+ ENDIF (HDF5_BUILD_TOOLS)
+ENDIF(EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
#-----------------------------------------------------------------------------
# Option to build High Level API's
#-----------------------------------------------------------------------------
-OPTION (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" OFF)
-IF (HDF5_BUILD_HL_LIB)
- IF(EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
+IF(EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
+ OPTION (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" OFF)
+ IF (HDF5_BUILD_HL_LIB)
SET (H5_INCLUDE_HL 1)
ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/hl ${PROJECT_BINARY_DIR}/hl)
- ENDIF(EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
-ENDIF (HDF5_BUILD_HL_LIB)
+ ENDIF (HDF5_BUILD_HL_LIB)
+ENDIF(EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
#-----------------------------------------------------------------------------
# Generate the H5pubconf.h file containing user settings needed by compilation