We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc23e0c commit 3101857Copy full SHA for 3101857
1 file changed
CMakeLists.txt
@@ -733,13 +733,17 @@ if(openPMD_USE_INVASIVE_TESTS)
733
target_compile_definitions(openPMD PRIVATE openPMD_USE_INVASIVE_TESTS=1)
734
endif()
735
736
-foreach(target openPMD openPMD.py)
+function(set_filesystem_header_for_target target)
737
if(openPMD_USE_FILESYSTEM_HEADER)
738
target_compile_definitions(${target} PRIVATE openPMD_USE_FILESYSTEM_HEADER=1)
739
else()
740
target_compile_definitions(${target} PRIVATE openPMD_USE_FILESYSTEM_HEADER=0)
741
742
-endforeach()
+endfunction()
743
+set_filesystem_header_for_target(openPMD)
744
+if(openPMD_HAVE_PYTHON)
745
+ set_filesystem_header_for_target(openPMD.py)
746
+endif()
747
748
if(openPMD_BUILD_TESTING)
749
# compile Catch2 implementation part separately
0 commit comments