Commit 18fcff30 authored by John Biddiscombe's avatar John Biddiscombe
Browse files

Add "_hpx" to any tests that use hpx threading (for easy test verification)

parent ba345411
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -81,16 +81,19 @@ function(dca_add_gtest name)
    return()
  endif()

  if (DCA_ADD_GTEST_LIBS MATCHES "parallel_hpx")
    set(oldname ${name})
    set(name ${name}_hpx)
    add_executable(${name} ${oldname}.cpp ${DCA_ADD_GTEST_SOURCES})
    hpx_setup_target(${name})
  else()
    add_executable(${name} ${name}.cpp ${DCA_ADD_GTEST_SOURCES})
  endif()

  # Create a macro with the project source dir. We use this as the root path for reading files in
  # tests.
  target_compile_definitions(${name} PRIVATE DCA_SOURCE_DIR=\"${PROJECT_SOURCE_DIR}\")

  if (DCA_ADD_GTEST_LIBS MATCHES "parallel_hpx")
      hpx_setup_target(${name})
  endif()

  if (DCA_ADD_GTEST_GTEST_MAIN)
    # Use gtest main.
    target_link_libraries(${name} PRIVATE ${DCA_ADD_GTEST_LIBS} gtest_main)