1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2025-02-19 12:04:54 +00:00

Define all case combinations of cmake_on/off.

This saves having to remember to do STRING(TOUPPER) in every cmake file.
At times that's really not convenient if possible at all.
For example when a top-level project is guessing what option some
subproject is going to use and tries to use it for the builtin options
view. The acutal OPTION statement is not there, and it's not nice to put
a string(toupper) on a variable that seems to come from nowhere (and in
fact it might not be there at all).
This commit is contained in:
King_DuckZ 2016-04-27 01:29:40 +02:00
parent 804a02c63b
commit 1ef879e9c1
2 changed files with 10 additions and 1 deletions

View file

@ -20,9 +20,19 @@
#if !defined(CMAKE_ON)
# define CMAKE_ON 1
# define CMAKE_on 1
# define CMAKE_On 1
# define CMAKE_oN 1
#endif
#if !defined(CMAKE_OFF)
# define CMAKE_OFF 0
# define CMAKE_OFf 0
# define CMAKE_OfF 0
# define CMAKE_Off 0
# define CMAKE_oFF 0
# define CMAKE_oFf 0
# define CMAKE_ofF 0
# define CMAKE_off 0
#endif
#endif

View file

@ -4,7 +4,6 @@ include(WithMediaAutodetect)
find_package(Magic REQUIRED)
option(DINDEXER_WITH_NICE_MEDIA_TYPES "Enable this if C++14 is available in order to get some nicer media type names, like CD-Rom instead of CDRom" OFF)
string(TOUPPER ${DINDEXER_WITH_NICE_MEDIA_TYPES} DINDEXER_WITH_NICE_MEDIA_TYPES)
add_library(${PROJECT_NAME} SHARED
pathname.cpp