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

[CMake] Re-ordered CMakeSetup.cmake a bit.

parent 30b0b4b5
No related branches found
No related tags found
No related merge requests found
......@@ -22,10 +22,7 @@ endif()
# Project name
project( OGS-6 )
list(APPEND CMAKE_PREFIX_PATH
$ENV{HOMEBREW_ROOT} # Homebrew package manager on Mac OS
$ENV{CMAKE_LIBRARY_SEARCH_PATH} # Environment variable, Windows
${CMAKE_LIBRARY_SEARCH_PATH}) # CMake option, Windows
include(scripts/cmake/CMakeSetup.cmake)
###########################
### Preliminary Options ###
......@@ -49,22 +46,21 @@ if(OGS_USE_PETSC)
endif()
### CMake includes ###
include(scripts/cmake/PreFind.cmake)
include(scripts/cmake/CheckTypeSizes.cmake)
include(scripts/cmake/Functions.cmake)
include(scripts/cmake/SubmoduleSetup.cmake)
include(scripts/cmake/CMakeSetup.cmake)
include(scripts/cmake/ConanSetup.cmake)
include(scripts/cmake/CompilerSetup.cmake)
include(scripts/cmake/Find.cmake)
include(scripts/cmake/CCacheSetup.cmake)
include(scripts/cmake/ProjectSetup.cmake)
include(scripts/cmake/DocumentationSetup.cmake)
include(scripts/cmake/test/Test.cmake)
include(PreFind)
include(CheckTypeSizes)
include(Functions)
include(SubmoduleSetup)
include(ConanSetup)
include(CompilerSetup)
include(Find)
include(CCacheSetup)
include(ProjectSetup)
include(DocumentationSetup)
include(test/Test)
if(OGS_COVERAGE AND NOT IS_SUBPROJECT)
include(scripts/cmake/Coverage.cmake)
include(Coverage)
endif()
include(scripts/cmake/Web.cmake)
include(Web)
####################
### More Options ###
......
# Disallow in-source builds as the git project cluttered with generated files
# probably confuses people. source/build* is still allowed!
if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
message(FATAL_ERROR "In-source builds are not allowed!\n"
"Make sure to remove CMakeCache.txt and CMakeFiles/ "
"from the source directory!")
endif()
# Set additional CMake modules path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/ThirdParty/cmake-modules")
list(APPEND CMAKE_PREFIX_PATH
$ENV{HOMEBREW_ROOT} # Homebrew package manager on Mac OS
$ENV{CMAKE_LIBRARY_SEARCH_PATH} # Environment variable, Windows
${CMAKE_LIBRARY_SEARCH_PATH}) # CMake option, Windows
# Load addional modules
include(UseBackportedModules)
include(OptionRequires)
include(CppcheckTargets)
include(GNUInstallDirs)
include(ProcessorCount)
ProcessorCount(NUM_PROCESSORS)
set(NUM_PROCESSORS ${NUM_PROCESSORS} CACHE STRING "Processor count")
......
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