Skip to content

Commit

Permalink
[CMake] Improve styling of configuration output
Browse files Browse the repository at this point in the history
  • Loading branch information
chnoblouch committed Oct 30, 2023
1 parent 87e3254 commit 04e8e23
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
15 changes: 12 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ include(cmake/CustomCommands.cmake)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "")

set_policy(CMP0111 OLD) # Avoids warnings for new policy CMP0111 from cmake 3.19 onwards
# set_policy(CMP0111 OLD) # Avoids warnings for new policy CMP0111 from cmake 3.19 onwards

set(META_PROJECT_NAME "SLProject")

Expand Down Expand Up @@ -62,8 +62,10 @@ endif ()

option(LIBIGL_USE_STATIC_LIBRARY "Specifies if LibIGL should be built statically" ON)

message(STATUS "Current System Name: ${SYSTEM_NAME_UPPER}")
message(STATUS "--------------------------------------------")
message(STATUS "----------------------------------------------------------------")
message(STATUS "System: ${SYSTEM_NAME_UPPER}")
message(STATUS "Architecture: ${CMAKE_SYSTEM_PROCESSOR}")
message(STATUS "----------------------------------------------------------------")
message(STATUS "SL_DOWNLOAD_PREBUILTS: ${SL_DOWNLOAD_PREBUILTS}")
message(STATUS "SL_BUILD_WAI: ${SL_BUILD_WAI}")
message(STATUS "SL_BUILD_APPS: ${SL_BUILD_APPS}")
Expand All @@ -75,15 +77,20 @@ message(STATUS "SL_BUILD_WITH_OPENSSL: ${SL_BUILD_WITH_OPENSSL}")
message(STATUS "SL_BUILD_WITH_ASSIMP: ${SL_BUILD_WITH_ASSIMP}")
message(STATUS "SL_BUILD_WITH_MEDIAPIPE: ${SL_BUILD_WITH_MEDIAPIPE}")
message(STATUS "LIBIGL_USE_STATIC_LIBRARY: ${LIBIGL_USE_STATIC_LIBRARY}")
message(STATUS "----------------------------------------------------------------")

if (SL_DOWNLOAD_DATA)
include(cmake/DownloadData.cmake)
endif ()

message(STATUS "----------------------------------------------------------------")

if (SL_DOWNLOAD_PREBUILTS)
include(cmake/DownloadPrebuilts.cmake)
endif ()

message(STATUS "----------------------------------------------------------------")

if ("${CMAKE_SYSTEM_NAME}" MATCHES "Android")
message(STATUS "SL_APP: ${SL_APP}")
option(SL_APP
Expand All @@ -104,3 +111,5 @@ endif ()
if (SL_BUILD_APPS)
add_subdirectory(apps)
endif ()

message(STATUS "----------------------------------------------------------------")
2 changes: 0 additions & 2 deletions cmake/CompileOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#
# Get upper case system name
string(TOUPPER ${CMAKE_SYSTEM_NAME} SYSTEM_NAME_UPPER)
message(STATUS "SYSTEM_NAME_UPPER: ${SYSTEM_NAME_UPPER} (CompileOptions.cmake)")

# Determine architecture (32/64 bit)
set(X64 OFF)
Expand Down Expand Up @@ -37,7 +36,6 @@ set(DEFAULT_COMPILE_DEFINITIONS
SL_GIT_DATE="${GitDate}"
GL_SILENCE_DEPRECATION
)
message(STATUS "DEFAULT_COMPILE_DEFINITIONS: ${DEFAULT_COMPILE_DEFINITIONS}")

if (SL_BUILD_WAI)
set(DEFAULT_COMPILE_DEFINITIONS
Expand Down
12 changes: 6 additions & 6 deletions modules/sl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(platform_specific_include_dirs)
#########################

if (DEFINED ENV{CUDA_PATH} AND SL_BUILD_WITH_OPTIX)
message("CUDA_PATH is defined")
message(STATUS "[OptiX] CUDA_PATH is defined")
find_package(CUDA 10 REQUIRED)
find_package(OptiX 7.2 REQUIRED)
set(DEFAULT_COMPILE_DEFINITIONS
Expand All @@ -24,15 +24,15 @@ if (DEFINED ENV{CUDA_PATH} AND SL_BUILD_WITH_OPTIX)
SL_BUILD_WITH_OPTIX)
else ()
if (DEFINED ENV{CUDA_PATH})
message("Has CUDA but OPTIX will not be built.")
message("Please download Optix at: https://developer.nvidia.com/designworks/optix/download")
message(STATUS "[OptiX] Has CUDA but OPTIX will not be built.")
message(STATUS "[OptiX] Please download Optix at: https://developer.nvidia.com/designworks/optix/download")
endif ()
if (SL_BUILD_WITH_OPTIX)
if ("${SYSTEM_NAME_UPPER}" STREQUAL "WINDOWS" OR "${SYSTEM_NAME_UPPER}" STREQUAL "LINUX")
message("For Optix you have to install the latest CUDA Toolkit ")
message("and the latest Optix SDK from NVidia.")
message(STATUS "[OptiX] For Optix you have to install the latest CUDA Toolkit ")
message(STATUS "[OptiX] and the latest Optix SDK from NVidia.")
else ()
message("Optix is so far only available on Windows or Linux")
message(STATUS "[OptiX] Optix is so far only available on Windows or Linux")
endif ()
endif ()
endif ()
Expand Down
6 changes: 0 additions & 6 deletions modules/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
#
# CMake configuration of the cpvrlab/utils repository
#

cmake_minimum_required(VERSION 3.3 FATAL_ERROR)

# The FOLDER properties are needed in Visual Studio and XCode generated projects for nested folders
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "")
Expand Down
1 change: 0 additions & 1 deletion modules/utils/externals/zlib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)

project(zlib C)
Expand Down
8 changes: 4 additions & 4 deletions modules/wai/externals/fbow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU"
set(CMAKE_CXX_FLAGS_DEBUG "${VECTORIAL_INSTRUCTIONS} -g3 -DDEBUG -D_DEBUG -std=c++11")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${VECTORIAL_INSTRUCTIONS} -O2 -g3 -DDEBUG -D_DEBUG -std=c++11")

message(STATUS "vec=${VECTORIAL_INSTRUCTIONS}")
MESSAGE( STATUS "-------------------------------------------------------------------------------" )
message( STATUS "GNU COMPILER")
MESSAGE( STATUS "-------------------------------------------------------------------------------" )
# message(STATUS "vec=${VECTORIAL_INSTRUCTIONS}")
# MESSAGE( STATUS "-------------------------------------------------------------------------------" )
# message( STATUS "GNU COMPILER")
# MESSAGE( STATUS "-------------------------------------------------------------------------------" )

# When compiling with clang-cl, use the DLL-specific version of the run-time library to link against libsl_wai
# https://stackoverflow.com/a/18635749
Expand Down

0 comments on commit 04e8e23

Please sign in to comment.