mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-29 18:07:16 +02:00
Update cmake/TestHeaders.cmake
Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
This commit is contained in:
@ -115,7 +115,7 @@ function(add_header_test target)
|
|||||||
set(source "${CMAKE_CURRENT_BINARY_DIR}/headers/${directory}/${filename}.cpp")
|
set(source "${CMAKE_CURRENT_BINARY_DIR}/headers/${directory}/${filename}.cpp")
|
||||||
if(NOT EXISTS "${source}")
|
if(NOT EXISTS "${source}")
|
||||||
file(WRITE "${source}" "#include <${header}>")
|
file(WRITE "${source}" "#include <${header}>")
|
||||||
file(WRITE "${source}" "#include <${header}>") # do it twice to ensure that header guards are provided
|
file(APPEND "${source}" "\n#include <${header}>") # do it twice to ensure that header guards are provided
|
||||||
endif()
|
endif()
|
||||||
list(APPEND sources "${source}")
|
list(APPEND sources "${source}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
Reference in New Issue
Block a user