Skip to content

Commit

Permalink
made mitsuba.conf message more noisy
Browse files Browse the repository at this point in the history
  • Loading branch information
wjakob committed Jan 29, 2020
1 parent e1a97fe commit 7f2ccf6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/resource
# ---------- Setup mitsuba.conf ----------

if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/mitsuba.conf)
message(WARNING "Copying template mitsuba.conf to root directory")
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/resources/mitsuba.conf.template
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
file(RENAME mitsuba.conf.template mitsuba.conf)
set(MITSUBA_COPIED_CONFIG_FILE 1)
endif()


# ---------- Detect renderer variants ----------

# We want CMake to re-run whenever 'mitsuba.conf' changes because the build
Expand Down Expand Up @@ -554,3 +555,15 @@ if (Sphinx_FOUND)
COMMENT "Building HTML documentation with Sphinx"
USES_TERMINAL)
endif()

if(NOT WIN32)
string(ASCII 27 Esc)
set(ColorReset "${Esc}[m")
set(BoldRed "${Esc}[1;31m")
endif()

if (MITSUBA_COPIED_CONFIG_FILE)
message(WARNING "\n${BoldRed}Created a default 'mitsuba.conf' configuration file. "
"You will probably want to edit this file to specify the "
"desired configurations before starting to compile.${ColorReset}")
endif()

0 comments on commit 7f2ccf6

Please sign in to comment.