mirror of
https://github.com/boostorg/safe_numerics.git
synced 2026-02-22 03:32:24 +00:00
added CTestConfig.cmake to library root.
This commit is contained in:
@@ -142,9 +142,30 @@ foreach(dir ${dirs})
|
||||
message(STATUS " ${dir}")
|
||||
endforeach()
|
||||
|
||||
# create script to run all tests and examples
|
||||
include(CTest)
|
||||
|
||||
#use folders in organization of the IDE
|
||||
set(USE_FOLDERS TRUE)
|
||||
|
||||
###########################
|
||||
# testing and submitting test results to the test dashboard
|
||||
|
||||
# create script to run all tests and examples
|
||||
include(CTest)
|
||||
|
||||
if(0)
|
||||
|
||||
## Create a file named CTestConfig.cmake adjacent to the current file.
|
||||
## This new file should contain the following:
|
||||
|
||||
set(CTEST_PROJECT_NAME "Safe Numerics")
|
||||
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "my.cdash.org")
|
||||
# set(CTEST_DROP_LOCATION "/cdash/submit.php?project=MyProject")
|
||||
set(CTEST_DROP_LOCATION "/index.php?project=Safe+Numerics")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ include("CMake/CMakeLists.txt")
|
||||
include_directories("${Boost_INCLUDE_DIRS}")
|
||||
include_directories("include")
|
||||
|
||||
# create target to run test andpwd examples
|
||||
include (CTest)
|
||||
|
||||
add_subdirectory("include")
|
||||
add_subdirectory("examples")
|
||||
add_subdirectory("test")
|
||||
|
||||
11
CTestConfig.cmake
Normal file
11
CTestConfig.cmake
Normal file
@@ -0,0 +1,11 @@
|
||||
## This file should be placed in the root directory of your project.
|
||||
## Then modify the CMakeLists.txt file in the root directory of your
|
||||
## project to incorporate the testing dashboard.
|
||||
## # The following are required to uses Dart and the Cdash dashboard
|
||||
set(CTEST_PROJECT_NAME "Safe Numerics")
|
||||
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "my.cdash.org")
|
||||
set(CTEST_DROP_LOCATION "/submit.php?project=Safe+Numerics")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||
@@ -8,12 +8,11 @@ include("../CMake/CMakeLists.txt" )
|
||||
include_directories("${Boost_INCLUDE_DIRS}")
|
||||
include_directories("../include")
|
||||
|
||||
# create target to run test of examples
|
||||
include (CTest)
|
||||
|
||||
###########################
|
||||
# examples
|
||||
|
||||
message( STATUS "Runtimes are stored in ${CMAKE_CURRENT_BINARY_DIR}" )
|
||||
|
||||
file(GLOB example_list
|
||||
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
|
||||
@@ -24,7 +23,7 @@ foreach(file_name ${example_list})
|
||||
message(STATUS ${base_name})
|
||||
add_executable(${base_name} ${file_name})
|
||||
add_test(NAME ${base_name} COMMAND ${base_name})
|
||||
set_target_properties(${base_name} PROPERTIES FOLDER "examples")
|
||||
set_target_properties(${base_name} PROPERTIES FOLDER "example")
|
||||
endforeach(file_name)
|
||||
|
||||
set_target_properties(example84 PROPERTIES
|
||||
@@ -37,3 +36,16 @@ set_target_properties(example81 example93 PROPERTIES
|
||||
|
||||
# end examples targets
|
||||
####################
|
||||
|
||||
###########################
|
||||
# add misc files to IDE
|
||||
|
||||
file(GLOB misc_files
|
||||
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.c"
|
||||
)
|
||||
add_custom_target(miscellaneous SOURCES ${misc_files})
|
||||
set_target_properties(miscellaneous PROPERTIES FOLDER "example")
|
||||
|
||||
# end headers in IDE
|
||||
####################
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
####################
|
||||
# add include headers to IDE
|
||||
|
||||
set(USE_FOLDERS TRUE)
|
||||
|
||||
file(GLOB include_files
|
||||
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/*.hpp"
|
||||
|
||||
@@ -8,30 +8,11 @@ include("../CMake/CMakeLists.txt" )
|
||||
include_directories("${Boost_INCLUDE_DIRS}")
|
||||
include_directories("../include")
|
||||
|
||||
###########################
|
||||
# testing and submitting test results to the test dashboard
|
||||
|
||||
include (CTest)
|
||||
|
||||
if(0)
|
||||
|
||||
## Create a file named CTestConfig.cmake adjacent to the current file.
|
||||
## This new file should contain the following:
|
||||
|
||||
set(CTEST_PROJECT_NAME "Safe Numerics")
|
||||
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "my.cdash.org")
|
||||
# set(CTEST_DROP_LOCATION "/cdash/submit.php?project=MyProject")
|
||||
set(CTEST_DROP_LOCATION "/index.php?project=Safe+Numerics")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||
|
||||
endif()
|
||||
|
||||
###########################
|
||||
# test targets
|
||||
|
||||
message( STATUS "Runtimes are stored in ${CMAKE_CURRENT_BINARY_DIR}" )
|
||||
|
||||
file(GLOB test_list
|
||||
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
|
||||
@@ -46,3 +27,16 @@ endforeach(file_name)
|
||||
|
||||
# end test targets
|
||||
####################
|
||||
|
||||
###########################
|
||||
# add headers to IDE
|
||||
|
||||
file(GLOB include_files
|
||||
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/*.hpp"
|
||||
)
|
||||
add_custom_target(include SOURCES ${include_files})
|
||||
set_target_properties(include PROPERTIES FOLDER "tests")
|
||||
|
||||
# end headers in IDE
|
||||
####################
|
||||
|
||||
Reference in New Issue
Block a user