set ( file "Makefile" ) if ( file STREQUAL "makefile" ) .... endif () The above condition should PASS, since I want to ignore case, but as of right now it seems STREQUAL is case-sensitive. I need to do this without mutating either operand (i.e. i can't use string ( TOLOWER ) ) David Cole 10 years ago You can't.
Named boolean constants are case-insensitive. If the argument is not one of these specific constants, it is treated as a variable or string (see Variable Expansion further below) and one of the following two forms applies.
How can I perform a case-insensitive string comparison? I basically need to do this: set( file "Makefile" ) if( file STREQUAL "makefile" ) .... endif() The above ...
set( file "Makefile" ) if( file STREQUAL "makefile" ) .... endif() The above condition should PASS, since I want to ignore case, but as of right now it seems STREQUAL is case-sensitive. I need to do this without mutating either operand (i.e. i can't use string( TOLOWER ) ) -- Powered by www.kitware.com
07.07.2016 · Named boolean constants are case-insensitive. If the argument is not one of these constants, it is treated as a variable. if ... string > STREQUAL <variable ... 两种都可以验证这个变量有没有定义过,注意:仅仅代表定义过,比如你在CMake命令行中随便写了-Dvar=xxx, ...
18.12.2019 · If your CMakeLists.txt and source files use wrong case that doesn't match the name of the file, then the project is not compatible with linux and its filesystems. So, your options are: Use a case-insensitive filesystem, since that is what the project supports You could try a case-insensitive filesystem on linux, but that is a hacky solution.
25.01.2016 · CMake variables are case sensitive. See documentation. As a side note, commands are case insensitive, and their arguments are case sensitive. See wiki. Keywords like STATUS are case sensitive because they are arguments. Example: the second marked as …
Jan 26, 2016 · CMake variables are case sensitive. See documentation. As a side note, commands are case insensitive, and their arguments are case sensitive. See wiki. Keywords like STATUS are case sensitive because they are arguments. Example: the second marked as a warning (default message type).
[CMake] Case-insensitive string compare David Cole david.cole at kitware.com Thu Jun 7 18:51:36 EDT 2012. Previous message: [CMake] Case-insensitive string compare Next message: [CMake] CMAKE_CURRENT_SOURCE_DIR showing up in include directories Messages sorted by:
[CMake] Case-insensitive string compare ... > > The above condition should PASS, since I want to ignore case, but as of > right now it seems STREQUAL is case-sensitive.
How can I perform a case-insensitive string comparison? I basically need to do this: set ... since I want to ignore case, but as of right now it seems STREQUAL is case-sensitive. I need to do this without mutating either operand (i.e. i can't use string( TOLOWER ) ) David Cole 2012 ... [CMake] Case-insensitive string compare' (Questions and ...
The tests on CMAKE_BUILD_TYPE typically use a STREQUAL comparison which is case-sensitive. Therefore, the Project settings for ENABLE_DEBUG and ENABLE_DEBUG_SYMBOLS are only set to true if the build type is 'DEBUG' and not 'Debug'. Howev...
For a case-insensitive comparison, combine with a string transforming generator expression, $<STREQUAL:$<UPPER_CASE:${foo}>,"BAR"> # "1" if ${foo} is any of ...
Named boolean constants are case-insensitive. If the argument is not one of these specific constants, it is treated as a variable or string (see Variable Expansion further below) and one of the following two forms applies.
Dec 18, 2019 · The issue is not with cmake, but with the filesystem. The filesystems in linux are generally case sensitive. stdafx.h is not the same file as Stdafx.h. If your CMakeLists.txt and source files use wrong case that doesn't match the name of the file, then the project is not compatible with linux and its filesystems. So, your options are:
Named boolean constants are case-insensitive. ... if(<variable|string> STREQUAL <variable|string>): True if the given string or variable's value is ...