-
Notifications
You must be signed in to change notification settings - Fork 169
Cmake install and scripts #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
who builds in-source anyways? Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
provides functions to add targets for scanning: add the following to a CMakeLists: set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/opt/woboq.install/share/woboq/cmake") find_package(Woboq REQUIRED) CreateBrowsableDocumentation(TARGETS subtarget1 subtarget2 maintarget) then, after recreating the build-folder, call make like so: make -C build woboq-serve and open the stuff in the browser: xdg-open http://localhost:8000 Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
- two separate projects, for source and file generated inside the build folder - fixed data-argument for indexgenerator to be "/data" Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
even better Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution.
I haven't tought to use cmake this way.
Note that we don't support "incremental" change, so we should make sure the output directory is clean before running the generator.
Other than that i don't know cmake so much so it's hard to review all this code. It seems that it depends on python and on the simple http server, but that's not explicit.
Do the export-compile-command flag gets set on the project's root?
cmake . -DLLVM_CONFIG_EXECUTABLE=/opt/llvm/bin/llvm-config -DCMAKE_BUILD_TYPE=Release | ||
make | ||
mkdir -p build && cd build | ||
cmake .. -DLLVM_CONFIG_EXECUTABLE=llvm-config-3.8 -DCMAKE_INSTALL_PREFIX=$HOME/woboq.install -DCMAKE_BUILD_TYPE=Release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the README does not tell to create a build directory.
I personaly use shadow build., but i think in-source builod are simpler to explain. And anybody familiar with cmake knows how to make a shadow build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure it does, mkdir -p build && cd build
? What is a shadow build?
FindWoboq.cmake.in
Outdated
set(outdir ${WOBOQ_OUTDIR}) | ||
|
||
# this will (?) retrieve where the CMakeLists of this target is located. I | ||
# think this is what the second part of the "-p" switch needs... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's correct.
# the global build directory. this will pout all generated file into a | ||
# parallel page-tree in the served html. | ||
get_property(blddir TARGET ${trgt} PROPERTY BINARY_DIR) | ||
set(bldprjct ${trgt}/build:${blddir}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But i don't think "build" should be hard-coded here.
Note that because it is a sub directory, it will simply appear in a subdirectory of the project as normal .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does make sense, instead of hardcoding? Maybe an additional function parameter with a default-argument? Rename to "generated" or "builddirectory"?
…to running hope this catches everything... Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
f504a43
to
3ff9f54
Compare
Uh, hadn't realized the incremental aspect. It seems to work, but removing cpp/hpp files might cause problems? Yeah, cleaning the |
otherwise all this will not work if "data" is somewhere completely else Signed-off-by: Martin Zenzes <martin.zenzes@dfki.de>
FYI #58 was merged which partly overlaps here |
ui. Gut zu wissen. Wir müssten mal rebasen ;-)
…On 08/10/2017 12:02 PM, Markus Goetz wrote:
FYI #58 <#58> was
merged which partly overlaps here
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAN16kvHtwOlKI0c2H8MyHQ_WkY5rZsQks5sWtVFgaJpZM4L2mxl>.
--
M.Sc. Martin Zenzes
Space Robotics
Hauptgeschäftsstelle Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
Phone: +49 (0) 421 178 45 - 6658
Fax: +49 (0) 421 178 45 - 4150
E-Mail: martin.zenzes@dfki.de
Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
-----------------------------------------------------------------------
|
1d86342
to
1ba848f
Compare
too old |
Thanks for this nice tool, worked better than I expected ;-) This PR might not be finished or polished, but might be helpful to others. It allows to
FindWoboq.cmake
If
FindWoboq.cmake
is findable in$CMAKE_MODULE_PATH
, there is a new functionCreateBrowsableDocumentation(TARGET $trgt)
. It will create targets likewoboq-$trgt
,woboq
andwoboq-serve
. So adding the following to a CMakeLists:Then, after recreating the build-folder, start a python simple http server:
And open the stuff in the browser:
Works for me ;-) The indexer seems a bit buggy or wrongly used be me -- css is broken in some locations?
Sidenote: Generated files located inside the build-folder (Qt...) are missing if the build folder is not inside the src-folder. See ProjectManager::projectForFile. This is inconvenient in a CI-environment for example.