Skip to content

Commit

Permalink
Try to fix NCRYSTAL_ENABLE_EXAMPLES
Browse files Browse the repository at this point in the history
  • Loading branch information
tkittel committed Nov 22, 2024
1 parent 057bdc5 commit 3320c23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/basictest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ jobs:
run: |
set -eux
${{github.workspace}}/install/bin/ncrystal-config --summary
echo "listing bindir"
ls -l ${{github.workspace}}/install/bin
echo "listing bindir done"
#Expose ncrystal-config and examples:
export PATH="${{github.workspace}}/install/bin:${PATH:-}"
#Add python modules and cmdline scripts:
Expand Down
8 changes: 4 additions & 4 deletions ncrystal_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,8 @@ function( get_datafile_list output_var )
set( ${output_var} "${tmp}" PARENT_SCOPE )
endfunction()
file_globsrc( SRCS_NC "src/*.cc")
file_globsrc( EXAMPLES_NC "examples/ncrystal_example_c*.c*")
file_globsrc( HDRS_NCG4 "ncrystal_geant4/include/G4NCrystal/*.*")
file_globsrc( SRCS_NCG4 "ncrystal_geant4/src/*.cc")
file_globsrc( EXAMPLES_NCG4 "examples/ncrystal_example_g4*.cc")

#The ncapi.h header needs expansion of CMake variables, so we copy ALL header
#files to a temporary directory and edit just that one file:
Expand Down Expand Up @@ -588,7 +586,8 @@ ncinstall(FILES ${HDRS_NC} DESTINATION ${NCrystal_INCDIR}/NCrystal)
ncinstall(FILES ${HDRS_INTERNAL_NC} DESTINATION ${NCrystal_INCDIR}/NCrystal/internal)

#Examples:
if ( NCRYSTAL_ENABLE_EXAMPLES AND EXAMPLES_NC )
if ( NCRYSTAL_ENABLE_EXAMPLES )
file_globsrc( EXAMPLES_NC "${PROJECT_SOURCE_DIR}/../examples/ncrystal_example_c*.c*")
foreach(ex ${EXAMPLES_NC})
get_filename_component(exbn "${ex}" NAME_WE)
add_executable(${exbn} "${ex}")
Expand Down Expand Up @@ -661,7 +660,8 @@ if ( NCRYSTAL_GEANT4 )
endif()

#examples if needed:
if ( NCRYSTAL_ENABLE_EXAMPLES AND EXAMPLES_NCG4 )
if ( NCRYSTAL_ENABLE_EXAMPLES )
file_globsrc( EXAMPLES_NCG4 "${PROJECT_SOURCE_DIR}/../examples/ncrystal_example_g4*.cc")
foreach(ex ${EXAMPLES_NCG4})
get_filename_component(exbn "${ex}" NAME_WE)
add_executable(${exbn} "${ex}")
Expand Down

0 comments on commit 3320c23

Please sign in to comment.