Skip to content

Commit

Permalink
Merge pull request #62 from andrsd/test-config-gone
Browse files Browse the repository at this point in the history
Removing config.h.in from tests
  • Loading branch information
andrsd authored Jul 9, 2024
2 parents 59b8d41 + a9d4c79 commit fc4d078
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ endif()
# Tests

if (EXODUSIICPP_BUILD_TESTS)
set(EXODUSIICPP_UNIT_TEST_ASSETS ${CMAKE_SOURCE_DIR}/test/assets CACHE PATH "" FORCE)
mark_as_advanced(FORCE EXODUSIICPP_UNIT_TEST_ASSETS)

enable_testing()
add_subdirectory(test)
endif()
Expand Down
8 changes: 4 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ target_link_libraries(
gmock_main
)

set(EXODUSIICPP_UNIT_TEST_ASSETS ${PROJECT_SOURCE_DIR}/assets CACHE PATH "" FORCE)
mark_as_advanced(FORCE EXODUSIICPP_UNIT_TEST_ASSETS)

configure_file(config.h.in config.h)
target_compile_definitions(${PROJECT_NAME}
PRIVATE
-DEXODUSIICPP_UNIT_TEST_ASSETS="${EXODUSIICPP_UNIT_TEST_ASSETS}"
)

add_test(
NAME ${PROJECT_NAME}
Expand Down
1 change: 0 additions & 1 deletion test/File_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "gmock/gmock.h"
#include "exodusIIcpp/exodusIIcpp.h"
#include "config.h"

using namespace exodusIIcpp;
using namespace testing;
Expand Down
3 changes: 0 additions & 3 deletions test/config.h.in

This file was deleted.

0 comments on commit fc4d078

Please sign in to comment.