Skip to content

Commit

Permalink
fix bug in cmake; ensure opacity datafile is available to target
Browse files Browse the repository at this point in the history
  • Loading branch information
Piyush Sharda authored and Piyush Sharda committed Aug 26, 2024
1 parent 9f00a85 commit e6dbe56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,8 @@ endif()
#set a cache variable that controls whether
#we want to build the unit test or not
set(BUILD_UNIT_TEST_PC false CACHE BOOL "Do you want to build the primordial chem unit test? (true/false)")
message("Building primordial chem unit test")

set(BUILD_UNIT_TEST_MC false CACHE BOOL "Do you want to build the metal chem unit test? (true/false)")
message("Building metal chem unit test")

add_compile_options(-Werror -Wall -Wextra)

Expand Down
4 changes: 3 additions & 1 deletion unit_test/burn_cell_metal_chem/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#all .cpp files that need to be compiled for the test go here
configure_file(Semenov_PlanckOpacity.dat ${CMAKE_CURRENT_BINARY_DIR}/Semenov_PlanckOpacity.dat COPYONLY)

add_executable(test_burn_cell_metal_chem main.cpp ${metal_chem_sources})

#test needs to find burn_cell.H, unit_test.H, and extern_parameters.H
Expand All @@ -14,4 +16,4 @@ if(AMReX_GPU_BACKEND MATCHES "CUDA")
setup_target_for_cuda_compilation(test_burn_cell_metal_chem)
endif(AMReX_GPU_BACKEND MATCHES "CUDA")

add_test(NAME burn_cell_metal_chem COMMAND test_burn_metal_chem inputs_metal_chem WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_test(NAME burn_cell_metal_chem COMMAND test_burn_cell_metal_chem inputs_metal_chem WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

0 comments on commit e6dbe56

Please sign in to comment.