Skip to content
Snippets Groups Projects
Commit 34fb0125 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

CMake: include files with path BornAgain/*

to avoid ambiguities while allowing for concise file names
parent 052ec521
No related branches found
No related tags found
No related merge requests found
Showing
with 23 additions and 23 deletions
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR) cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
set(CMAKE_MODULE_PATH set(CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/cmake/modules # CMake modules specific for BornAgain
${CMAKE_SOURCE_DIR}/cmake/extensions # CMake modules for use in various projects ${CMAKE_SOURCE_DIR}/cmake/extensions # CMake modules for use in various projects
${CMAKE_SOURCE_DIR}/cmake/
) )
set(CONFIGURABLES_DIR ${CMAKE_SOURCE_DIR}/cmake/configurables) set(CONFIGURABLES_DIR ${CMAKE_SOURCE_DIR}/cmake/configurables)
...@@ -64,20 +64,30 @@ if(ALLCONFIG) ...@@ -64,20 +64,30 @@ if(ALLCONFIG)
endif() endif()
# include CMake macros and functions # include CMake macros and functions
#--- Setup details depending on the major platform type ---
if(CMAKE_SYSTEM_NAME MATCHES Linux)
include(BornAgain/Linux)
elseif(APPLE)
include(BornAgain/MacOS)
elseif(WIN32)
include(BornAgain/Windows)
endif()
include(GetFilenameComponent) # overwrite CMake command include(GetFilenameComponent) # overwrite CMake command
include(Directories) include(BornAgain/Directories)
include(CheckCompiler) include(BornAgain/Compiler)
include(Dependences) include(BornAgain/Dependences)
if(ZERO_TOLERANCE) if(ZERO_TOLERANCE)
string(APPEND CMAKE_CXX_FLAGS " -Werror -Wfatal-errors") string(APPEND CMAKE_CXX_FLAGS " -Werror -Wfatal-errors")
endif() endif()
if(BORNAGAIN_GUI) if(BORNAGAIN_GUI)
include(SearchQt) include(BornAgain/Qt)
string(APPEND CMAKE_CXX_FLAGS " -DHAVE_QT=ON") string(APPEND CMAKE_CXX_FLAGS " -DHAVE_QT=ON")
endif() endif()
include(BornAgainConfiguration) include(BornAgain/Config)
include(GeneratePythonDocs) include(BornAgain/PythonDocs)
include(BALineLength) include(BornAgain/LineLength)
# debug optimization # debug optimization
if(BORNAGAIN_DEBUG_OPTIMIZATION) if(BORNAGAIN_DEBUG_OPTIMIZATION)
...@@ -87,7 +97,7 @@ endif() ...@@ -87,7 +97,7 @@ endif()
# code coverage analysis # code coverage analysis
if(BORNAGAIN_COVERAGE) if(BORNAGAIN_COVERAGE)
include(CoverageFunction) include(CoverageFunction)
include(BACoverage) include(BornAgain/Coverage)
endif() endif()
# recurse into the given subdirectories # recurse into the given subdirectories
...@@ -133,4 +143,4 @@ add_subdirectory(Tests/Functional) ...@@ -133,4 +143,4 @@ add_subdirectory(Tests/Functional)
add_subdirectory(cmake) add_subdirectory(cmake)
# make package targets # make package targets
include(BornAgainCPack) include(BornAgain/Pack)
...@@ -14,16 +14,6 @@ message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") ...@@ -14,16 +14,6 @@ message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
find_package(Threads) find_package(Threads)
#--- Setup details depending on the major platform type ---
if(CMAKE_SYSTEM_NAME MATCHES Linux)
include(SetUpLinux)
elseif(APPLE)
include(SetUpMacOS)
elseif(WIN32)
include(SetUpWindows)
endif()
#--- Print the final compiler flags --- #--- Print the final compiler flags ---
message(STATUS "BornAgain Platform: ${BORNAGAIN_PLATFORM}") message(STATUS "BornAgain Platform: ${BORNAGAIN_PLATFORM}")
......
File moved
File moved
File moved
File moved
File moved
File moved
...@@ -19,11 +19,11 @@ endif() ...@@ -19,11 +19,11 @@ endif()
if(WIN32) if(WIN32)
include(CPackWindows) include(BornAgain/PackWindows)
elseif(APPLE) elseif(APPLE)
include(CPackApple) include(BornAgain/PackMacOS)
elseif(UNIX AND BUILD_DEBIAN) # one can build debian package only on UNIX system elseif(UNIX AND BUILD_DEBIAN) # one can build debian package only on UNIX system
include(CPackDebian) include(BornAgain/PackDebian)
else() else()
set(CPACK_GENERATOR "TGZ") set(CPACK_GENERATOR "TGZ")
endif() endif()
......
File moved
File moved
File moved
File moved
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