<commit_before># -- fortran library
add_library(cudaclaw_f OBJECT
	fortran_source/cudaclaw_inlinelimiter.f
	fortran_source/cudaclaw_set_capacity.f
	fortran_source/cudaclaw_block.f
	fortran_source/cudaclaw_bc2_default.f
	fortran_source/cudaclaw_flux2.f
	fortran_source/cudaclaw_flux2fw.f
	fortran_source/cudaclaw_step2.f
	fortran_source/cudaclaw_step2_wrap.f
)

set_target_properties(cudaclaw_f PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include)

# -- add library
add_library(cudaclaw STATIC)
set_target_properties(cudaclaw PROPERTIES EXPORT_NAME CUDACLAW)

# device code needs to relcoateable since it is in a shared library
target_compile_options(cudaclaw PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:
                       --relocatable-device-code=true
                       >)
# needed because we have device code in a library
set_target_properties(cudaclaw PROPERTIES CUDA_SEPARABLE_COMPILATION ON)

target_sources(cudaclaw PRIVATE 
  fc2d_cudaclaw.cpp
	fc2d_cudaclaw_options.c
	cuda_source/cudaclaw_step2.cu
	cuda_source/cudaclaw_initialize.cu
	cuda_source/cudaclaw_limiters.cu
	cuda_source/cudaclaw_allocate.cu
	cuda_source/cudaclaw_flux2.cu
	fc2d_cuda_profiler.cu
	cuda_source/cudaclaw_store_patches.cu
  $<TARGET_OBJECTS:cudaclaw_f>
)

target_link_libraries(cudaclaw PUBLIC clawpatch CUDA::nvToolsExt)
target_include_directories(cudaclaw
  PUBLIC
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
  $<INSTALL_INTERFACE:include>
)

# -- install
install(FILES
	fc2d_cudaclaw.h
	fc2d_cudaclaw_cuda.h
	fc2d_cudaclaw_options.h
	cudaclaw_user_fort.h
	fc2d_cudaclaw_fort.h
  DESTINATION include
)

install(TARGETS cudaclaw
  EXPORT ${PROJECT_NAME}Targets
  ARCHIVE DESTINATION lib
  LIBRARY DESTINATION lib)<commit_msg>add cuda profiler to public headers<commit_after># -- fortran library
add_library(cudaclaw_f OBJECT
	fortran_source/cudaclaw_inlinelimiter.f
	fortran_source/cudaclaw_set_capacity.f
	fortran_source/cudaclaw_block.f
	fortran_source/cudaclaw_bc2_default.f
	fortran_source/cudaclaw_flux2.f
	fortran_source/cudaclaw_flux2fw.f
	fortran_source/cudaclaw_step2.f
	fortran_source/cudaclaw_step2_wrap.f
)

set_target_properties(cudaclaw_f PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include)

# -- add library
add_library(cudaclaw STATIC)
set_target_properties(cudaclaw PROPERTIES EXPORT_NAME CUDACLAW)

# device code needs to relcoateable since it is in a shared library
target_compile_options(cudaclaw PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:
                       --relocatable-device-code=true
                       >)
# needed because we have device code in a library
set_target_properties(cudaclaw PROPERTIES CUDA_SEPARABLE_COMPILATION ON)

target_sources(cudaclaw PRIVATE 
  fc2d_cudaclaw.cpp
	fc2d_cudaclaw_options.c
	cuda_source/cudaclaw_step2.cu
	cuda_source/cudaclaw_initialize.cu
	cuda_source/cudaclaw_limiters.cu
	cuda_source/cudaclaw_allocate.cu
	cuda_source/cudaclaw_flux2.cu
	fc2d_cuda_profiler.cu
	cuda_source/cudaclaw_store_patches.cu
  $<TARGET_OBJECTS:cudaclaw_f>
)

target_link_libraries(cudaclaw PUBLIC clawpatch CUDA::nvToolsExt)
target_include_directories(cudaclaw
  PUBLIC
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
  $<INSTALL_INTERFACE:include>
)

# -- install
install(FILES
	fc2d_cudaclaw.h
	fc2d_cudaclaw_cuda.h
	fc2d_cuda_profiler.h
	fc2d_cudaclaw_options.h
	cudaclaw_user_fort.h
	fc2d_cudaclaw_fort.h
  DESTINATION include
)

install(TARGETS cudaclaw
  EXPORT ${PROJECT_NAME}Targets
  ARCHIVE DESTINATION lib
  LIBRARY DESTINATION lib)
{'fraction_non_alphanumeric': 0.062393162393162394, 'fraction_numerical': 0.008262108262108263, 'mean_word_length': 6.064386317907445, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6802728', 'n_tokens_mistral': 1469, 'n_tokens_neox': 1422, 'n_words': 191}