Skip to content
Snippets Groups Projects
Commit 054320ec authored by Lars Bilke's avatar Lars Bilke
Browse files

[CMake] Added variable OGS_CHECK_HEADER_COMPILATION.

parent 30816851
No related branches found
No related tags found
No related merge requests found
......@@ -181,6 +181,8 @@ option(OGS_ENABLE_ELEMENT_CUBOID "Build FEM elements for cuboids (quads, hexahe
option(OGS_ENABLE_ELEMENT_PRISM "Build FEM elements for prisms." ON)
option(OGS_ENABLE_ELEMENT_PYRAMID "Build FEM elements for pyramids." ON)
option(OGS_CHECK_HEADER_COMPILATION "Check header for standalone compilation." OFF)
###################
### Definitions ###
###################
......
......@@ -6,6 +6,9 @@ set(CMAKE_REQUIRED_QUIET TRUE)
# Checks header for standalone compilation
function(check_header_compilation)
if(NOT OGS_CHECK_HEADER_COMPILATION)
return()
endif()
string(REPLACE "${PROJECT_SOURCE_DIR}/" "" DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
message(STATUS "Checking header compilation for ${DIRECTORY} ...")
include(CheckCXXSourceCompiles)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment