Skip to content

Commit 381820c

Browse files
committed
SEND_ERROR instead of AUTHOR_WARNING in CMake
"Author warning are meant to warn the author (developer) of a CMakeLists.txt, but not a user of it." https://stackoverflow.com/questions/50082358/what-are-author-warning-messages-in-cmake I had a few too much support Issues of people using CMake instead of pip as no one reads error messages, as long as make works
1 parent 4268ee9 commit 381820c

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
cmake_minimum_required(VERSION 3.12)
22
project(scorep_bindings)
33

4-
message(AUTHOR_WARNING
4+
option(DEV_MODE "Set this to ON to use CMake. However: NO SUPPORT IS PROVIDED, PIP IS THE SUPPORTED INSTALL MODE" OFF)
5+
6+
if(NOT DEV_MODE)
7+
message(SEND_ERROR
58
"CMake is only useful to develop this project, no support is provided."
6-
"To install the module properly use pip. See the Readme for details.")
9+
"To install the module properly use pip. See the Readme for details."
10+
"To override this you might set DEV_MODE to ON"
11+
"However: AGAIN NO SUPPORT IS PROVIDED, PIP IS THE SUPPORTED INSTALL MODE")
12+
endif()
713

814
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
915

0 commit comments

Comments
 (0)