Notes |
|
(0036512)
|
Rolf Eike Beer
|
2014-07-31 04:48
|
|
Can't this just be "if (NOT VAR)"? |
|
|
(0036515)
|
skvadrik
|
2014-07-31 05:33
|
|
Maybe it can, it's in the source code of cmake module CheckCXXSourceCompiles
(not in my source).
I just meant that the following call:
check_cxx_compiler_flag(-Weffc++ CXX_FLAG_-Weffc++)
shouldn't cause errors, because CXX_FLAG_-Weffc++ is a valid identifier.
So the bug is in CheckCXXSourceCompiles, not in cmake (see bug's category). |
|
|
(0036517)
|
Rolf Eike Beer
|
2014-07-31 05:51
|
|
Yes, absolutely. The question was more in the direction of Brad ;) |
|
|
(0036520)
|
Brad King
|
2014-07-31 08:39
|
|
Re 0014923:0036512: That logic is an ancient hack from before we had if(DEFINED). Try this patch:
diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake
index 6ce64a1..edd62a6 100644
--- a/Modules/CheckCXXSourceCompiles.cmake
+++ b/Modules/CheckCXXSourceCompiles.cmake
@@ -39,7 +39,7 @@
macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
- if("${VAR}" MATCHES "^${VAR}$")
+ if(NOT DEFINED "${VAR}")
set(_FAIL_REGEX)
set(_key)
foreach(arg ${ARGN}) |
|
|
(0036522)
|
skvadrik
|
2014-07-31 08:47
|
|
It works, thank you!
Is this patch in HEAD already? |
|
|
(0036526)
|
skvadrik
|
2014-07-31 08:57
|
|
By the way, other modules have this error too:
33:CheckFunctionExists.cmake 30:CheckCSourceRuns.cmake 45:CheckSymbolExists.cmake 30:CheckCXXSourceCompiles.cmake 32:CheckIncludeFile.cmake 30:CheckCXXSourceRuns.cmake 29:CheckIncludeFiles.cmake 30:CheckCSourceCompiles.cmake 32:CheckIncludeFileCXX.cmake 32:CheckVariableExists.cmake 32:CheckLibraryExists.cmake 282:ExternalData.cmake
I searched for regexp 'if\("\$\{.*\}" MATCHES "\^\$\{.*\}\$"\)' in /usr/share/cmake/Modules. |
|
|
(0036536)
|
Brad King
|
2014-07-31 10:10
|
|
|
|
(0036537)
|
skvadrik
|
2014-07-31 10:16
|
|
|
|
(0037603)
|
Robert Maynard
|
2015-01-05 08:39
|
|
Closing resolved issues that have not been updated in more than 4 months |
|