kst-plot doesn't compile with cmake 3.
Symptom:
[ 0%] Generating kstcore_pch.h.gch
<command-line>:0:1: error: macro names must be identifiers
Reason:
a stray "-D" on the command line, with no identifier.
Added debug output (attached), and got this:
-- kst_add_pch_rule
_definitions=KST_HAVE_REVISION_H;$<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>;QT_GUI_LIB;QT_CORE_LIB;BUILD_KSTAPP
-- -DKST_HAVE_REVISION_H
-- -D$<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>
-- -DQT_GUI_LIB
-- -DQT_CORE_LIB
-- -DBUILD_KSTAPP
The new template expression thingie whose real name I forgot, breaks such code.
I don't know what the fix is, though.
Proper support for PCH seems unfinished.
http://www.cmake.org/Bug/view.php?id=1260
Meanwhile maybe we can just disable PCH support in kst-plot when cmake version
>= 3?
--
David Faure, [email protected], http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5
diff --git a/cmake/modules/KstPchSupport.cmake b/cmake/modules/KstPchSupport.cmake
index 16da9d5..1bb2f80 100644
--- a/cmake/modules/KstPchSupport.cmake
+++ b/cmake/modules/KstPchSupport.cmake
@@ -40,7 +40,9 @@ macro(kst_add_pch_rule _header _sources _lib_type)
if(CMAKE_COMPILER_IS_GNUCC)
# first we have to find all compiler arguments
get_directory_property(_definitions COMPILE_DEFINITIONS)
+ message(STATUS "kst_add_pch_rule _definitions=${_definitions}")
foreach (_it ${_definitions})
+ message(STATUS " -D${_it}")
list(APPEND _args "-D${_it}")
endforeach()
_______________________________________________
Kde-buildsystem mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem