include headers twice to check for header guards
This commit is contained in:
1 parent
c5fa2399af
commit
b88843f6b2
1 file changed
+1
@@ -115,6 +115,7 @@ function(add_header_test target)
|
||||
set(source "${CMAKE_CURRENT_BINARY_DIR}/headers/${directory}/${filename}.cpp")
|
||||
if(NOT EXISTS "${source}")
|
||||
file(WRITE "${source}" "#include <${header}>")
|
||||
file(WRITE "${source}" "#include <${header}>") # do it twice to ensure that header guards are provided
|
||||
endif()
|
||||
list(APPEND sources "${source}")
|
||||
endforeach()
|
||||
|
||||
Reference in new issue
Block a user