Skip to content

Commit 5cbf1ef

Browse files
author
Roberto Di Remigio
committed
Catch main compiles
1 parent 2bf99bc commit 5cbf1ef

File tree

6 files changed

+37
-3
lines changed

6 files changed

+37
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ include(boost_version-components)
4444
include(autocmake_boost)
4545
include(pcmsolver)
4646
include(version)
47+
include(catch)
4748
include(cloc)
4849
include(eigen)
4950
include(libgetkw)

cmake/autocmake.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ fetch: http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.zip
4848
[general]
4949
source: custom/pcmsolver.cmake
5050
custom/version.cmake
51+
custom/catch.cmake
5152
custom/cloc.cmake
5253
custom/eigen.cmake
5354
custom/libgetkw.cmake

cmake/custom/catch.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
install(DIRECTORY ${PROJECT_SOURCE_DIR}/external/Catch DESTINATION ${PROJECT_BINARY_DIR}/external/include)
2+
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/external/Catch)

cmake/custom/test.cmake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ macro(add_reference reference_file where)
3434
endmacro()
3535

3636
if(ENABLE_TESTS)
37-
message(STATUS "Setting up Boost Test Unit Testing Framework")
38-
enable_testing()
39-
add_subdirectory(tests) # This must come last!!
37+
enable_testing()
38+
add_subdirectory(tests) # This must come last!!
4039
endif()

tests/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
2+
add_executable(catch.x catch.cpp)
3+
unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY)
4+
15
# Math utilities and helper classes
26
add_subdirectory(surface_function)
37
add_subdirectory(input)

tests/catch.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/* pcmsolver_copyright_start */
2+
/*
3+
* PCMSolver, an API for the Polarizable Continuum Model
4+
* Copyright (C) 2013 Roberto Di Remigio, Luca Frediani and contributors
5+
*
6+
* This file is part of PCMSolver.
7+
*
8+
* PCMSolver is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Lesser General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* PCMSolver is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU Lesser General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public License
19+
* along with PCMSolver. If not, see <http://www.gnu.org/licenses/>.
20+
*
21+
* For information on the complete list of contributors to the
22+
* PCMSolver API, see: <http://pcmsolver.github.io/pcmsolver-doc>
23+
*/
24+
/* pcmsolver_copyright_end */
25+
26+
#define CATCH_CONFIG_MAIN
27+
#include "catch.hpp"

0 commit comments

Comments
 (0)