Comments (22)
I tested the latest revision and the problem still occurs.
from cmakepchcompiler.
It should be fixed by acd3166
from cmakepchcompiler.
Now it's:
FAILED: E:\RosBE\i386\bin\g++.exe -DDBG=1 -DKDBG=1 -DUSE_COMPILER_EXCEPTIONS -DWINVER=0x502 -D_DLL -D_M_IX86 -D_NETSHELL_ -D_SEH_ENABLE_TRACE -D_SETUPAPI_VER=0x502 -D_USE_32BIT_TIME_T -D_USE_PSEH3=1 -D_WIN32_IE=0x600 -D_WIN32_WINDOWS=0x502 -D_WIN32_WINNT=0x600 -D_X86_ -D__REACTOS__ -D__USE_CRTIMP -D__i386__ -D_inline=__inline -Di386 -Dnetshell_EXPORTS -pipe -fms-extensions -fno-strict-aliasing -mstackrealign -fno-rtti -fno-exceptions -fdebug-prefix-map="e:\reactos-vanilla"=ReactOS -gdwarf-2 -gstrict-dwarf -femit-struct-debug-detailed=none -feliminate-unused-debug-symbols -march=pentium -mtune=i686 -Werror -Wall -Wpointer-arith -Wno-char-subscripts -Wno-multichar -Wno-unused-value -Wno-maybe-uninitialized -Wno-error=unused-but-set-variable -Wno-error=type-limits -O1 -fno-optimize-sibling-calls -fno-omit-frame-pointer -mpreferred-stack-boundary=3 -fno-set-stack-executable -Winvalid-pch -Werror=invalid-pch -std=c++11 -g -Idll/shellext/netshell -Ie:/reactos-vanilla/dll/shellext/netshell -Ie:/reactos-vanilla/include -Ie:/reactos-vanilla/include/psdk -Ie:/reactos-vanilla/include/dxsdk -Iinclude -Iinclude/psdk -Iinclude/dxsdk -Iinclude/reactos -Ie:/reactos-vanilla/include/crt -Ie:/reactos-vanilla/include/ddk -Ie:/reactos-vanilla/include/ndk -Ie:/reactos-vanilla/include/reactos -Ie:/reactos-vanilla/include/reactos/libs -include E:/testing_new_pch/reactos/CMakeFiles/netshell.pch.dir/precomp.h -MMD -MT dll/shellext/netshell/CMakeFiles/netshell.dir/lanconnectui.cpp.obj -MF dll/shellext/netshell/CMakeFiles/netshell.dir/lanconnectui.cpp.obj.d -o dll/shellext/netshell/CMakeFiles/netshell.dir/lanconnectui.cpp.obj -c e:/reactos-vanilla/dll/shellext/netshell/lanconnectui.cpp
cc1plus.exe: fatal error: E:/testing_new_pch/reactos/CMakeFiles/netshell.pch.dir/precomp.h: No such file or directory
compilation terminated.
The "-include" should pass something like E:/testing_new_pch/reactos/dll/shellext/netshell/CMakeFiles/netshell.pch.dir/precomp.h instead of E:/testing_new_pch/reactos/CMakeFiles/netshell.pch.dir/precomp.h.
from cmakepchcompiler.
Should be addressed by 9c6e030
And please wrap compiler output with markdowns ~~~
or ```. Thanks for testing :)
from cmakepchcompiler.
Nice! didn't know about this ;)
from cmakepchcompiler.
Now we get:
build dll/shellext/netshell/CMakeFiles/netshell.dir/precomp.h.gch: CXXPCH_COMPILER e$:/reactos-vanilla/dll/shellext/netshell/precomp.h || cmake_order_depends_target_netshell
DEFINES = -DDBG=1 -DKDBG=1 -DUSE_COMPILER_EXCEPTIONS -DWINVER=0x502 -D_DLL -D_M_IX86 -D_NETSHELL_ -D_SEH_ENABLE_TRACE -D_SETUPAPI_VER=0x502 -D_USE_32BIT_TIME_T -D_USE_PSEH3=1 -D_WIN32_IE=0x600 -D_WIN32_WINDOWS=0x502 -D_WIN32_WINNT=0x600 -D_X86_ -D__REACTOS__ -D__USE_CRTIMP -D__i386__ -D_inline=__inline -Di386 -Dnetshell_EXPORTS
DEP_FILE = dll/shellext/netshell/CMakeFiles/netshell.dir/precomp.h.gch.d
FLAGS = -pipe -fms-extensions -fno-strict-aliasing -mstackrealign -fno-rtti -fno-exceptions -fdebug-prefix-map="e:
eactos-vanilla"=ReactOS -gdwarf-2 -gstrict-dwarf -femit-struct-debug-detailed=none -feliminate-unused-debug-symbols -march=pentium -mtune=i686 -Werror -Wall -Wpointer-arith -Wno-char-subscripts -Wno-multichar -Wno-unused-value -Wno-maybe-uninitialized -Wno-error=unused-but-set-variable -Wno-error=type-limits -O1 -fno-optimize-sibling-calls -fno-omit-frame-pointer -mpreferred-stack-boundary=3 -fno-set-stack-executable -Winvalid-pch -Werror=invalid-pch -std=c++11 -g -Idll/shellext/netshell -Ie:/reactos-vanilla/dll/shellext/netshell -Ie:/reactos-vanilla/include -Ie:/reactos-vanilla/include/psdk -Ie:/reactos-vanilla/include/dxsdk -Iinclude -Iinclude/psdk -Iinclude/dxsdk -Iinclude/reactos -Ie:/reactos-vanilla/include/crt -Ie:/reactos-vanilla/include/ddk -Ie:/reactos-vanilla/include/ndk -Ie:/reactos-vanilla/include/reactos -Ie:/reactos-vanilla/include/reactos/libs -include E:/testing_new_pch/reactos/dll/shellext/netshell/CMakeFiles/netshell.pch.dir/precomp.h -x c++-header
Notice that it's two lines instead of one, because
-fdebug-prefix-map="e:\reactos-vanilla"=ReactOS
In normal source files rules, is in this PCH case:
-fdebug-prefix-map="e:
eactos-vanilla"=ReactOS
Meaning the \r wasn't escaped properly and led to a new line.
from cmakepchcompiler.
Seems like some CMake bug (or fancy behavior), anyways applied a fix at 596f28e
from cmakepchcompiler.
Now:
FAILED: E:\RosBE\i386\bin\g++.exe -DDBG=1 -DKDBG=1 -DUSE_COMPILER_EXCEPTIONS -DWINVER=0x502 -D_DLL -D_M_IX86 -D_NETSHELL_ -D_SEH_ENABLE_TRACE -D_SETUPAPI_VER=0x502 -D_USE_32BIT_TIME_T -D_USE_PSEH3=1 -D_WIN32_IE=0x600 -D_WIN32_WINDOWS=0x502 -D_WIN32_WINNT=0x600 -D_X86_ -D__REACTOS__ -D__USE_CRTIMP -D__i386__ -D_inline=__inline -Di386 -Dnetshell_EXPORTS -pipe -fms-extensions -fno-strict-aliasing -mstackrealign -fno-rtti -fno-exceptions -fdebug-prefix-map="e:\reactos-vanilla"=ReactOS -gdwarf-2 -gstrict-dwarf -femit-struct-debug-detailed=none -feliminate-unused-debug-symbols -march=pentium -mtune=i686 -Werror -Wall -Wpointer-arith -Wno-char-subscripts -Wno-multichar -Wno-unused-value -Wno-maybe-uninitialized -Wno-error=unused-but-set-variable -Wno-error=type-limits -O1 -fno-optimize-sibling-calls -fno-omit-frame-pointer -mpreferred-stack-boundary=3 -fno-set-stack-executable -Winvalid-pch -Werror=invalid-pch -std=c++11 -g -Idll/shellext/netshell -Ie:/reactos-vanilla/dll/shellext/netshell -Ie:/reactos-vanilla/include -Ie:/reactos-vanilla/include/psdk -Ie:/reactos-vanilla/include/dxsdk -Iinclude -Iinclude/psdk -Iinclude/dxsdk -Iinclude/reactos -Ie:/reactos-vanilla/include/crt -Ie:/reactos-vanilla/include/ddk -Ie:/reactos-vanilla/include/ndk -Ie:/reactos-vanilla/include/reactos -Ie:/reactos-vanilla/include/reactos/libs -include E:/testing_new_pch/reactos/dll/shellext/netshell/CMakeFiles/netshell.pch.dir/precomp.h -MMD -MT dll/shellext/netshell/CMakeFiles/netshell.dir/netshell.cpp.obj -MF dll/shellext/netshell/CMakeFiles/netshell.dir/netshell.cpp.obj.d -o dll/shellext/netshell/CMakeFiles/netshell.dir/netshell.cpp.obj -c e:/reactos-vanilla/dll/shellext/netshell/netshell.cpp
cc1plus.exe: error: E:/testing_new_pch/reactos/dll/shellext/netshell/CMakeFiles/netshell.pch.dir/precomp.h.gch: not used because `_DLL' is defined [-Werror=invalid-pch]
cc1plus.exe: error: one or more PCH files were found, but they were invalid
cc1plus.exe: fatal error: E:/testing_new_pch/reactos/dll/shellext/netshell/CMakeFiles/netshell.pch.dir/precomp.h: No such file or directory
cc1plus.exe: all warnings being treated as errors
compilation terminated.
ninja: build stopped: subcommand failed.
It seems like you're missing the addition of target COMPILE_DEFINITIONS property? because that's where we add _DLL and __USE_CRTIMP in some specific cases.
from cmakepchcompiler.
Well, I know the reason of this one. PCH is simply in different target suffixed with .pch
and it does not inherit COMPILE_DEFINITIONS
property from its originating main target.
I cannot either put pch in the main target, since then it will try to link damn pch
file, and there is no way to prevent that.
So I need to think of it more. Maybe tomorrow I find some solution.
from cmakepchcompiler.
Hmm, can't you simply use the target name that we input to target_precompiled_header() in order to get this property from this target, and apply it to the pch target?
This target idea btw means in ReactOS for example there will be extra 900+ targets. Is there a better way? The current PCH solution (from Peter) doesn't involve any additional targets, only two properties added to CMake (code).
from cmakepchcompiler.
Okay I think I managed to solve it with 9f3102e
Let me know how it works for you now.
Hmm, can't you simply use the target name that we input to target_precompiled_header() in order to get this property from this target, and apply it to the pch target?
See: https://github.com/nanoant/CMakePCHCompiler#how-does-it-work
from cmakepchcompiler.
Now:
CMake Error at cmake/CMakePCHCompiler.cmake:224 (set_target_properties):
set_target_properties called with incorrect number of arguments.
Call Stack (most recent call first):
Some weird path:9999 (__watch_pch_last_hook)
from cmakepchcompiler.
Wrrr.... okay I made little mistake in property checking. Fixed in 8df5ad5. Please try again.
from cmakepchcompiler.
Tons and tons of
CMake Warning (dev) at cmake/CMakePCHCompiler.cmake:217 (get_target_property):
Policy CMP0045 is not set: Error on non-existent target in
get_target_property. Run "cmake --help-policy CMP0045" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
get_target_property() called with non-existent target "NOTFOUND".
Call Stack (most recent call first):
Some weird path:9999 (__watch_pch_last_hook)
This warning is for project developers. Use -Wno-dev to suppress it.
from cmakepchcompiler.
Can you tell me which CMake version you are using?
from cmakepchcompiler.
cmake version 3.1
from cmakepchcompiler.
Okie, this seems like you fault as you are passing "NOTFOUND"
target as parameter. I have added check a7ec70e that should make cmake fail with more reasonable message.
from cmakepchcompiler.
I'm doing:
target_precompiled_header(netshell precomp.h)
What NOTFOUND ?
Also the issue persists with the latest revision.
from cmakepchcompiler.
I am sorry, you are right, I was running last step hook unconditionally, now fixed with 3329f66
Please re-test.
from cmakepchcompiler.
The line became cmake/CMakePCHCompiler.cmake:228
from cmakepchcompiler.
I also ran into the same problem. Why is this issue marked as fixed?
from cmakepchcompiler.
Here is a fix for this problem in my case: #11
from cmakepchcompiler.
Related Issues (20)
- Ad: Much better version exists in pull-request #13 HOT 1
- clang from llvm does not seem to work on osx HOT 1
- Investigate and clarify better /Z7 necessity for MSVC 2010 and higher when using PCH HOT 8
- TYPE is c++-header? What is this for anyway? HOT 2
- Wrong C++ standard - GNU extensions enabled in PCH file but disabled in CMake HOT 3
- Can't find PCH file during build. HOT 8
- Does not work when target is linked against "rich" targets declaring their own include directories and defines
- Doesn't work on linux cmake 3.10.2 HOT 3
- Doesn't work with multiple language targets. HOT 9
- Static libraries not supported HOT 1
- pch.h generates without c++ standard HOT 2
- wrong -isystem /usr/include in pch.h compilations flags HOT 7
- Compile your code with -fPIC or -fPIE HOT 4
- Improve documentation about auto-include "pch.h" HOT 1
- -iframework flag is not applied for pch target HOT 6
- Alternative to separate CXXPCH compiler definition HOT 8
- PCH breaks clang code model in Qt Creator.
- OpenGL::GL causes build failure HOT 2
- Setting CMAKE_CXX_STANDARD leads to error HOT 1
- Comparison between CMakePCHCompiler and CMake's new implementation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmakepchcompiler.