Browse Source

Updated styleguides

Added Test Suite
Updated CMake configuration
tempestpy_adaptions
PBerger 13 years ago
parent
commit
4cd75789ac
  1. 56
      CMakeLists.txt
  2. 1826
      doc/Doxyfile.in
  3. BIN
      resources/Google C++ Style Guide.pdf
  4. BIN
      resources/Google C++ Testing Framework.pdf
  5. 12
      test/mrmc-tests.cpp

56
CMakeLists.txt

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 2.6)
project (MRMC-cpp)
project (MRMC-cpp CXX C)
# The version number.
set (MRMC_CPP_VERSION_MAJOR 1)
@ -17,4 +17,56 @@ configure_file (
# so that we will find TutorialConfig.h
include_directories("${PROJECT_BINARY_DIR}")
add_executable(MRMC-cpp src/mrmc-cpp.cpp)
#add_executable(MRMC-cpp src/mrmc-cpp.cpp)
FILE(GLOB_RECURSE MRMCSources ${PROJECT_SOURCE_DIR}/src/*.cpp)
FILE(GLOB_RECURSE MRMCHeaders ${PROJECT_SOURCE_DIR}/src/*.h)
SOURCE_GROUP(Headers FILES ${MRMCHeaders})
SOURCE_GROUP(Sources FILES ${MRMCSources})
ADD_EXECUTABLE(MRMC-cpp ${MRMCSources} ${MRMCHeaders})
# Add base folder for better inclusion pathes
include_directories("${PROJECT_SOURCE_DIR}")
include_directories("${PROJECT_SOURCE_DIR}/src")
# external packages
FIND_PACKAGE(GTest REQUIRED)
FIND_PACKAGE(Boost REQUIRED)
FIND_PACKAGE(Doxygen REQUIRED)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
endif(Boost_FOUND)
# add a target to generate API documentation with Doxygen
if(DOXYGEN_FOUND)
SET(CMAKE_DOXYGEN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc")
STRING(REGEX REPLACE ";" " " CMAKE_DOXYGEN_INPUT_LIST "${PROJECT_SOURCE_DIR}/src")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc ALL
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)
if (GTEST_FOUND)
# For make-based builds, defines make target named test.
# For Visual Studio builds, defines Visual Studio project named RUN_TESTS.
enable_testing()
add_executable(MRMC-tests ${PROJECT_SOURCE_DIR}/test/mrmc-tests.cpp)
include_directories(${GTEST_INCLUDE_DIRS})
target_link_libraries(MRMC-tests ${GTEST_LIBRARIES})
add_test(
NAME MRMC-tests
COMMAND MRMC-tests
)
endif(GTEST_FOUND)

1826
doc/Doxyfile.in
File diff suppressed because it is too large
View File

BIN
resources/Google C++ Style Guide.pdf

BIN
resources/Google C++ Testing Framework.pdf

12
test/mrmc-tests.cpp

@ -0,0 +1,12 @@
#include <iostream>
#include "gtest/gtest.h"
int main(int argc, char** argv) {
std::cout << "Hello, World." << std::endl;
std::cout << "MRMC Testing" << std::endl;
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
Loading…
Cancel
Save