45 lines
1.3 KiB
CMake
45 lines
1.3 KiB
CMake
# /cmake_modules/common.cmake
|
|
|
|
message(DEBUG "Entering ${CMAKE_CURRENT_LIST_FILE}")
|
|
message(DEBUG "Platform: ${CMAKE_CXX_PLATFORM_ID}")
|
|
message(DEBUG "Compiler: ${CMAKE_CXX_COMPILER_ID}")
|
|
message(DEBUG "Compiler: ${CMAKE_CXX_COMPILER}")
|
|
set(BINARY_FOLDER "${CMAKE_BINARY_DIR}/bin")
|
|
include(utils)
|
|
include(qt)
|
|
|
|
if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR (${CMAKE_CXX_PLATFORM_ID} STREQUAL "MinGW"))
|
|
include(gcc)
|
|
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
|
include(clang)
|
|
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
|
include(msvc)
|
|
else ()
|
|
message(WARNING "Unknown Compiler")
|
|
#Define dummy PreCompilerSetup for unknown compilers. Later on, this will be replaced by a proper error message
|
|
function(PreCompilerSetup)
|
|
message(WARNING "Unknown Compiler! Dummy PreCompilerSetup")
|
|
endfunction()
|
|
function(PostCompilerSetup)
|
|
message(WARNING "Unknown Compiler! Dummy PostCompilerSetup")
|
|
endfunction()
|
|
endif ()
|
|
|
|
if ((WIN32))
|
|
message(DEBUG "Compiling for Windows")
|
|
include(win32)
|
|
elseif (APPLE)
|
|
message(DEBUG "Compiling for Apple")
|
|
elseif (UNIX)
|
|
message(DEBUG "Compiling for Unix")
|
|
include(linux)
|
|
else ()
|
|
message(DEBUG "Unknown Platform")
|
|
endif ()
|
|
|
|
include(feature_checks)
|
|
include(versioninfo)
|
|
include(profiling)
|
|
include(docs)
|
|
message(DEBUG "Leaving ${CMAKE_CURRENT_LIST_FILE}")
|