-
Notifications
You must be signed in to change notification settings - Fork 101
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
can not compile example standalone #582
Comments
Probably the find_package(DD4hep REQUIRED) Or: IF(NOT TARGET DD4hep::DDCore)
find_package ( DD4hep REQUIRED )
include ( ${DD4hep_DIR}/cmake/DD4hep.cmake )
include ( ${DD4hep_DIR}/cmake/DD4hepBuild.cmake )
find_package ( ROOT REQUIRED COMPONENTS Geom GenVector )
dd4hep_set_compiler_flags()
ENDIF() |
@dannielliu have you tried adding the lines to the Now the question is, do we want that all examples can be build stand alone, or make it very clear that they shouldn't be build stand alone? Or add a DD4HEP_BUILD_EXAMPLES variable to the examples/CMakeLists.txt that would alone one to just build individual examples, similar to DD4HEP_BUILD_PACKAGES? |
Yes, I intend to tell you it works, but not with gcc6.2.0. I have to change to a higher version of gcc, which I use is gcc8.3. And I have to recompile all related packages. It is not only the case of example, we need to know how to build our own detectors. If the example is not work stand alone, it would be harder to users to build their own detectors. Best regards, |
Thanks for your feedback, @dannielliu What exactly is not working with gcc62? |
Sorry, I do not remember it clearly. When I try to repeat the error, It also works with gcc62. Previous error may due to the wrong configuration of my example. Sorry & Thank you very much! |
Dear Markus,
When I try to compile the example OpticalSurface standalone, some problem happen. Here is the information.
Thank you!
Dong LIU
-- Including DD4hepBuild.cmake
-- The C compiler identification is GNU 6.2.0
-- The CXX compiler identification is GNU 6.2.0
-- Check for working C compiler: /software/STCF/gcc620-install/bin/gcc
-- Check for working C compiler: /software/STCF/gcc620-install/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /software/STCF/gcc620-install/bin/g++
-- Check for working CXX compiler: /software/STCF/gcc620-install/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CXX_FLAG_WORKS__Wall
-- Performing Test CXX_FLAG_WORKS__Wall - Success
-- Performing Test CXX_FLAG_WORKS__Wextra
-- Performing Test CXX_FLAG_WORKS__Wextra - Success
-- Performing Test CXX_FLAG_WORKS__pedantic
-- Performing Test CXX_FLAG_WORKS__pedantic - Success
-- Performing Test CXX_FLAG_WORKS__Wshadow
-- Performing Test CXX_FLAG_WORKS__Wshadow - Success
-- Performing Test CXX_FLAG_WORKS__Wformat_security
-- Performing Test CXX_FLAG_WORKS__Wformat_security - Success
-- Performing Test CXX_FLAG_WORKS__Wno_long_long
-- Performing Test CXX_FLAG_WORKS__Wno_long_long - Success
-- Performing Test CXX_FLAG_WORKS__Wdeprecated
-- Performing Test CXX_FLAG_WORKS__Wdeprecated - Success
-- Performing Test CXX_FLAG_WORKS__fdiagnostics_color=auto
-- Performing Test CXX_FLAG_WORKS__fdiagnostics_color=auto - Success
-- Performing Test CXX_FLAG_WORKS_FTLS_global_dynamic
-- Performing Test CXX_FLAG_WORKS_FTLS_global_dynamic - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- |++> OpticalSurfaces: ROOT version:
-- |++> Building optical surface test
-- |++> dd4hep_configure_output: CMAKE_INSTALL_PREFIX is /home/liud/stcf/example/OpticalSurfaces1.10.3 - overwrite with -D CMAKE_INSTALL_PREFIX
-- |++> Building Plugin: OpticalSurfacesExample
-- |++> Setting up test environment for OpticalSurfaces: Testing: Setup:TRUE With Tests(TRUE): DIRS: OpticalSurfaces
-- Configuring done
CMake Error at /ustcfs/bes3user/2013/liud/software/DD4hep/DD4hep1.10.3/cmake/DD4hepBuild.cmake:616 (add_library):
Target "OpticalSurfacesExample" links to target "DD4hep::DDCore" but the
target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
CMakeLists.txt:31 (dd4hep_add_plugin)
CMake Error at /ustcfs/bes3user/2013/liud/software/DD4hep/DD4hep1.10.3/cmake/DD4hepBuild.cmake:616 (add_library):
Target "OpticalSurfacesExample" links to target "DD4hep::DDCond" but the
target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
CMakeLists.txt:31 (dd4hep_add_plugin)
-- Generating done
The text was updated successfully, but these errors were encountered: