Skip to content

Commit

Permalink
Merge pull request #1943 from ERGO-Code/rename-cxx-test
Browse files Browse the repository at this point in the history
rename cmake cxx test function
  • Loading branch information
galabovaa authored Sep 23, 2024
2 parents 5af3a67 + f637ea2 commit b210168
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions cmake/cpp-highs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ write_basic_package_version_file(
"${PROJECT_BINARY_DIR}/${PACKAGE_PREFIX}-config-version.cmake"
COMPATIBILITY SameMajorVersion)

# add_cxx_test()
# highs_cxx_test()
# CMake function to generate and build C++ test.
# Parameters:
# the C++ filename
# e.g.:
# add_cxx_test(foo.cc)
function(add_cxx_test FILE_NAME)
# highs_cxx_test(foo.cc)
function(highs_cxx_test FILE_NAME)
message(STATUS "Configuring test ${FILE_NAME}: ...")
get_filename_component(TEST_NAME ${FILE_NAME} NAME_WE)
get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY)
Expand All @@ -114,13 +114,13 @@ endfunction()
# set_target_properties(highs PROPERTIES INTERFACE_${PROJECT_NAME}_MAJOR_VERSION ${PROJECT_VERSION_MAJOR})
# set_target_properties(highs PROPERTIES COMPATIBLE_INTERFACE_STRING ${PROJECT_NAME}_MAJOR_VERSION)

# add_c_test()
# highs_c_test()
# CMake function to generate and build C++ test.
# Parameters:
# the C filename
# e.g.:
# add_c_test(foo.c)
function(add_c_test FILE_NAME)
# highs_c_test(foo.c)
function(highs_c_test FILE_NAME)
message(STATUS "Configuring test ${FILE_NAME}: ...")
get_filename_component(TEST_NAME ${FILE_NAME} NAME_WE)
get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY)
Expand Down
4 changes: 2 additions & 2 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ endif()
if(BUILD_CXX_EXAMPLE)
file(GLOB CXX_SRCS "*.cpp")
foreach(FILE_NAME IN LISTS CXX_SRCS)
add_cxx_test(${FILE_NAME})
highs_cxx_test(${FILE_NAME})
endforeach()
endif()

Expand All @@ -21,6 +21,6 @@ if(BUILD_CXX_EXAMPLE)
# set(C_SRCS "call_highs_from_c_minimal.c")
foreach(FILE_NAME IN LISTS C_SRCS)
message(${FILE_NAME})
add_c_test(${FILE_NAME})
highs_c_test(${FILE_NAME})
endforeach()
endif()

0 comments on commit b210168

Please sign in to comment.