summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3940c60..be0bf27 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -776,6 +776,8 @@ set (H5_GENERATED_HEADERS
${HDF5_SRC_DIR}/H5overflow.h
)
+option (HDF5_GENERATE_HEADERS "Rebuild Generated Files" ON)
+mark_as_advanced (HDF5_GENERATE_HEADERS)
if (HDF5_GENERATE_HEADERS)
find_package (Perl)
if (PERL_FOUND)
@@ -826,7 +828,11 @@ TARGET_C_PROPERTIES (H5detect STATIC " " " ")
if (MSVC OR MINGW)
target_link_libraries (H5detect "ws2_32.lib")
endif (MSVC OR MINGW)
-add_dependencies(H5detect generate_precompiled)
+if (HDF5_GENERATE_HEADERS)
+ add_dependencies(H5detect generate_precompiled)
+else (HDF5_GENERATE_HEADERS)
+ add_dependencies(H5detect "${HDF5_SRC_DIR}/H5version.h;${HDF5_SRC_DIR}/H5overflow.h")
+endif (HDF5_GENERATE_HEADERS)
set (CMD $<TARGET_FILE:H5detect>)
add_custom_command (
@@ -841,7 +847,11 @@ TARGET_C_PROPERTIES (H5make_libsettings STATIC " " " ")
if (MSVC OR MINGW)
target_link_libraries (H5make_libsettings "ws2_32.lib")
endif (MSVC OR MINGW)
-add_dependencies(H5make_libsettings generate_precompiled)
+if (HDF5_GENERATE_HEADERS)
+ add_dependencies(H5detect generate_precompiled)
+else (HDF5_GENERATE_HEADERS)
+ add_dependencies(H5make_libsettings "${HDF5_SRC_DIR}/H5version.h;${HDF5_SRC_DIR}/H5overflow.h")
+endif (HDF5_GENERATE_HEADERS)
set (CMD $<TARGET_FILE:H5make_libsettings>)
add_custom_command (