diff --git a/.DS_Store b/.DS_Store index 004a2e5..36a673a 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ab7e3c..81575f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: [push, pull_request] +on: [push, pull_request] # On what action this workflow will be triggered jobs: build: @@ -41,10 +41,10 @@ jobs: # cd build # make clang-format-check - - name: Run Tests + - name: Run all Tests run: | cd build - ctest --output-on-failure + ctest -R AllTests --output-on-failure # - name: Generate code coverage # run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index b348451..3caa4f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,19 +19,25 @@ add_executable(Option_pricer main.cpp src/option.cpp src/payoff.cpp src/market_d enable_testing() add_subdirectory(tests) +#[[ # clang-tidy integration find_program(CLANG_TIDY_EXECUTABLE NAMES clang-tidy) if(CLANG_TIDY_EXECUTABLE) set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_EXECUTABLE};-checks=*,-clang-analyzer-alpha.*") endif() +]] +#[[ # clang-format integration (target to check formatting) -#add_custom_target(clang-format-check -# COMMAND find ${CMAKE_SOURCE_DIR} -name '*.cpp' -o -name '*.h' | xargs clang-format -i -#) +add_custom_target(clang-format-check + COMMAND find ${CMAKE_SOURCE_DIR} -name '*.cpp' -o -name '*.h' | xargs clang-format -i +) +]] +#[[ # Code coverage integration (optional) -#if (CMAKE_BUILD_TYPE STREQUAL "Coverage") -# target_compile_options(Option_pricer PRIVATE --coverage) -# target_link_libraries(Option_pricer PRIVATE --coverage) -#endif() \ No newline at end of file +if (CMAKE_BUILD_TYPE STREQUAL "Coverage") + target_compile_options(Option_pricer PRIVATE --coverage) + target_link_libraries(Option_pricer PRIVATE --coverage) +endif() +]] \ No newline at end of file diff --git a/cmake-build-cmake/.cmake/api/v1/reply/cmakeFiles-v1-e2deea0ff5c40d999209.json b/cmake-build-cmake/.cmake/api/v1/reply/cmakeFiles-v1-e2deea0ff5c40d999209.json deleted file mode 100644 index 7f09344..0000000 --- a/cmake-build-cmake/.cmake/api/v1/reply/cmakeFiles-v1-e2deea0ff5c40d999209.json +++ /dev/null @@ -1,253 +0,0 @@ -{ - "inputs" : - [ - { - "path" : "CMakeLists.txt" - }, - { - "isGenerated" : true, - "path" : "cmake-build-cmake/CMakeFiles/3.28.1/CMakeSystem.cmake" - }, - { - "isExternal" : true, - "path" : "/Users/anthony/.vcpkg-clion/vcpkg/scripts/buildsystems/vcpkg.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeDependentOption.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeSystemSpecificInitialize.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Darwin-Initialize.cmake" - }, - { - "isGenerated" : true, - "path" : "cmake-build-cmake/CMakeFiles/3.28.1/CMakeCCompiler.cmake" - }, - { - "isGenerated" : true, - "path" : "cmake-build-cmake/CMakeFiles/3.28.1/CMakeCXXCompiler.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeSystemSpecificInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeGenericSystem.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeInitializeConfigs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Darwin.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/UnixPaths.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeLanguageInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/AppleClang-C.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/Clang.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/CMakeCommonCompilerMacros.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/GNU.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/CMakeCommonCompilerMacros.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-AppleClang-C.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang-C.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCommonLanguageInclude.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCXXInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeLanguageInformation.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/AppleClang-CXX.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/Clang.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-AppleClang-CXX.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang-CXX.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCommonLanguageInclude.cmake" - }, - { - "path" : "tests/CMakeLists.txt" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindGTest.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/GoogleTest.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindPackageMessage.cmake" - }, - { - "isExternal" : true, - "path" : "/Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestConfigVersion.cmake" - }, - { - "isExternal" : true, - "path" : "/Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestConfig.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeFindDependencyMacro.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindThreads.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckLibraryExists.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckIncludeFile.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckCSourceCompiles.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Internal/CheckSourceCompiles.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake" - }, - { - "isCMake" : true, - "isExternal" : true, - "path" : "/Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindPackageMessage.cmake" - }, - { - "isExternal" : true, - "path" : "/Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets.cmake" - }, - { - "isExternal" : true, - "path" : "/Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets-debug.cmake" - }, - { - "isExternal" : true, - "path" : "/Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets-release.cmake" - } - ], - "kind" : "cmakeFiles", - "paths" : - { - "build" : "/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake", - "source" : "/Users/anthony/CLionProjects/Option_pricer" - }, - "version" : - { - "major" : 1, - "minor" : 0 - } -} diff --git a/cmake-build-cmake/.ninja_deps b/cmake-build-cmake/.ninja_deps index 286e819..e241eb7 100644 Binary files a/cmake-build-cmake/.ninja_deps and b/cmake-build-cmake/.ninja_deps differ diff --git a/cmake-build-cmake/.ninja_log b/cmake-build-cmake/.ninja_log index 04c2011..2f1583f 100644 --- a/cmake-build-cmake/.ninja_log +++ b/cmake-build-cmake/.ninja_log @@ -1,20 +1,35 @@ # ninja log v6 +4161 4369 1721108975744067628 tests/integration/Integration_tests edd9ec63126cdae +12 4160 1721108971594987859 tests/integration/CMakeFiles/Integration_tests.dir/__/test_main.cpp.o 44e651753dca70b1 5 1170 1720955557087634788 tests/CMakeFiles/Option_tester.dir/test.cpp.o c8c1f7b23ef8a20f -21 3423 1721059118279173551 CMakeFiles/Option_pricer.dir/src/option.cpp.o 34b12ad3b988bd8a -4348 4470 1721055680561407195 tests/Option_tester c47550924c8b64 +7 5051 1721109039201880729 tests/unit/CMakeFiles/Unit_tests.dir/__/__/src/option.cpp.o 10300bd25d5e0479 +927 1406 1721062065787680098 tests/Option_tester 84dc17b496be3108 33 3487 1721055676246866783 tests/CMakeFiles/Option_tester.dir/__/src/option.cpp.o 29c2c6cca40a9b65 -3682 4173 1721059121940349810 Option_pricer 8068c323144f72c1 +6 5324 1721109039201205645 tests/unit/CMakeFiles/Unit_tests.dir/__/__/src/market_data.cpp.o 9a44fc6175ad42bb 21 3427 1721059118279570836 CMakeFiles/Option_pricer.dir/src/payoff.cpp.o f46db1c7e239eff3 +6079 6516 1721109045273979129 tests/unit/Unit_tests 3f878dc6b8ec39a1 21 4059 1720973518946469648 tests/CMakeFiles/Option_tester.dir/payoff_tests.cpp.o ff08abb0ecc1a332 +12 1082 1721108971595705803 tests/integration/CMakeFiles/Integration_tests.dir/test_integration_option.cpp.o 1a3ce84ec1e71b3c 20 1121 1721059118278176272 CMakeFiles/Option_pricer.dir/main.cpp.o 29be609f97193f5a -32 3485 1721055676245831941 tests/CMakeFiles/Option_tester.dir/__/src/payoff.cpp.o a0e3d0d7499ef87c -33 3657 1721055676246226090 tests/CMakeFiles/Option_tester.dir/__/src/market_data.cpp.o 6b5f9d9d6aae0d70 -12 253 1721062064821590577 build.ninja e3219aea2288c68 -22 3682 1721059118279905490 CMakeFiles/Option_pricer.dir/src/market_data.cpp.o 61d812ddbf6caa55 +35 926 1721062064895852943 tests/CMakeFiles/Option_tester.dir/test_option.cpp.o a32c329a8da0ea2d 35 4372 1720974100669728067 tests/CMakeFiles/Option_tester.dir/market_data_tests.cpp.o 7392fc35dd320ee6 +21 3423 1721059118279173551 CMakeFiles/Option_pricer.dir/src/option.cpp.o 34b12ad3b988bd8a +14 3608 1721108971597325811 tests/integration/CMakeFiles/Integration_tests.dir/__/__/src/payoff.cpp.o 32d5536a5fa83e01 +11 346 1721111070850770322 build.ninja e3219aea2288c68 +22 3682 1721059118279905490 CMakeFiles/Option_pricer.dir/src/market_data.cpp.o 61d812ddbf6caa55 +6 5841 1721109039200530988 tests/unit/CMakeFiles/Unit_tests.dir/test_payoff.cpp.o 73e0b1cb6552e096 +5 6079 1721109039199903474 tests/unit/CMakeFiles/Unit_tests.dir/test_market_data.cpp.o 306bd583d3d116d3 32 4120 1721055676245245503 tests/CMakeFiles/Option_tester.dir/test_payoff.cpp.o 28ec6f5c54cf60c2 31 4348 1721055676244799577 tests/CMakeFiles/Option_tester.dir/test_market_data.cpp.o bee51a59a9faec9e +3682 4173 1721059121940349810 Option_pricer 8068c323144f72c1 +13 3598 1721108971596720262 tests/integration/CMakeFiles/Integration_tests.dir/__/__/src/option.cpp.o dc7cf54f58c31d1b +13 3846 1721108971596193890 tests/integration/CMakeFiles/Integration_tests.dir/__/__/src/market_data.cpp.o bbe92c0ea85d0fb 31 3878 1721055676244173670 tests/CMakeFiles/Option_tester.dir/test_main.cpp.o c3a82df49cebf608 -13 368 1721062064821590577 build.ninja e3219aea2288c68 -35 926 1721062064895852943 tests/CMakeFiles/Option_tester.dir/test_option.cpp.o a32c329a8da0ea2d -927 1406 1721062065787680098 tests/Option_tester 84dc17b496be3108 +32 3485 1721055676245831941 tests/CMakeFiles/Option_tester.dir/__/src/payoff.cpp.o a0e3d0d7499ef87c +33 3657 1721055676246226090 tests/CMakeFiles/Option_tester.dir/__/src/market_data.cpp.o 6b5f9d9d6aae0d70 +8 5054 1721109039202996038 tests/unit/CMakeFiles/Unit_tests.dir/__/__/src/payoff.cpp.o 3d7b76e93249cfd3 +4 5562 1721109039199235442 tests/unit/CMakeFiles/Unit_tests.dir/__/test_main.cpp.o 1449d7a4f28ee071 +30 224 1721111159292832750 tests/CMakeFiles/Tests 51903612152c3c7d +30 224 1721111159292832750 /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/CMakeFiles/Tests 51903612152c3c7d +49 278 1721112733607081719 tests/CMakeFiles/Tests 51903612152c3c7d +49 278 1721112733607081719 /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/CMakeFiles/Tests 51903612152c3c7d diff --git a/cmake-build-cmake/CMakeCache.txt b/cmake-build-cmake/CMakeCache.txt index 7639798..90803ab 100644 --- a/cmake-build-cmake/CMakeCache.txt +++ b/cmake-build-cmake/CMakeCache.txt @@ -375,7 +375,7 @@ CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_NM CMAKE_NM-ADVANCED:INTERNAL=1 //number of local generators -CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=2 +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=4 //ADVANCED property for variable: CMAKE_OBJCOPY CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_OBJDUMP diff --git a/cmake-build-cmake/CMakeFiles/TargetDirectories.txt b/cmake-build-cmake/CMakeFiles/TargetDirectories.txt index 2f457f0..9259812 100644 --- a/cmake-build-cmake/CMakeFiles/TargetDirectories.txt +++ b/cmake-build-cmake/CMakeFiles/TargetDirectories.txt @@ -2,7 +2,15 @@ /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/CMakeFiles/test.dir /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/CMakeFiles/edit_cache.dir /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/CMakeFiles/rebuild_cache.dir -/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/CMakeFiles/Option_tester.dir +/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/CMakeFiles/Tests.dir /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/CMakeFiles/test.dir /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/CMakeFiles/edit_cache.dir /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/CMakeFiles/rebuild_cache.dir +/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit/CMakeFiles/Unit_tests.dir +/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit/CMakeFiles/test.dir +/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit/CMakeFiles/edit_cache.dir +/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit/CMakeFiles/rebuild_cache.dir +/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration/CMakeFiles/Integration_tests.dir +/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration/CMakeFiles/test.dir +/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration/CMakeFiles/edit_cache.dir +/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration/CMakeFiles/rebuild_cache.dir diff --git a/cmake-build-cmake/CMakeFiles/rules.ninja b/cmake-build-cmake/CMakeFiles/rules.ninja index 3d5c954..9389449 100644 --- a/cmake-build-cmake/CMakeFiles/rules.ninja +++ b/cmake-build-cmake/CMakeFiles/rules.ninja @@ -41,7 +41,7 @@ rule CUSTOM_COMMAND ############################################# # Rule for compiling CXX files. -rule CXX_COMPILER__Option_tester_unscanned_Debug +rule CXX_COMPILER__Unit_tests_unscanned_Debug depfile = $DEP_FILE deps = gcc command = ${LAUNCHER}${CODE_CHECK}/Library/Developer/CommandLineTools/usr/bin/c++ $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in @@ -51,7 +51,26 @@ rule CXX_COMPILER__Option_tester_unscanned_Debug ############################################# # Rule for linking CXX executable. -rule CXX_EXECUTABLE_LINKER__Option_tester_Debug +rule CXX_EXECUTABLE_LINKER__Unit_tests_Debug + command = $PRE_LINK && /Library/Developer/CommandLineTools/usr/bin/c++ $FLAGS -Wl,-search_paths_first -Wl,-headerpad_max_install_names $LINK_FLAGS $in -o $TARGET_FILE $LINK_PATH $LINK_LIBRARIES && $POST_BUILD + description = Linking CXX executable $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for compiling CXX files. + +rule CXX_COMPILER__Integration_tests_unscanned_Debug + depfile = $DEP_FILE + deps = gcc + command = ${LAUNCHER}${CODE_CHECK}/Library/Developer/CommandLineTools/usr/bin/c++ $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building CXX object $out + + +############################################# +# Rule for linking CXX executable. + +rule CXX_EXECUTABLE_LINKER__Integration_tests_Debug command = $PRE_LINK && /Library/Developer/CommandLineTools/usr/bin/c++ $FLAGS -Wl,-search_paths_first -Wl,-headerpad_max_install_names $LINK_FLAGS $in -o $TARGET_FILE $LINK_PATH $LINK_LIBRARIES && $POST_BUILD description = Linking CXX executable $TARGET_FILE restat = $RESTAT diff --git a/cmake-build-cmake/Testing/Temporary/CTestCostData.txt b/cmake-build-cmake/Testing/Temporary/CTestCostData.txt index 9874fc4..19aa189 100644 --- a/cmake-build-cmake/Testing/Temporary/CTestCostData.txt +++ b/cmake-build-cmake/Testing/Temporary/CTestCostData.txt @@ -1,2 +1,4 @@ OptionTester 40 0.0342838 +UnitTests 2 0.00472549 +IntegrationTests 2 0.00503248 --- diff --git a/cmake-build-cmake/Testing/Temporary/LastTest.log b/cmake-build-cmake/Testing/Temporary/LastTest.log index eb68ad5..e2b1650 100644 --- a/cmake-build-cmake/Testing/Temporary/LastTest.log +++ b/cmake-build-cmake/Testing/Temporary/LastTest.log @@ -1,10 +1,10 @@ -Start testing: Jul 15 18:47 CEST +Start testing: Jul 16 08:52 CEST ---------------------------------------------------------- -1/1 Testing: OptionTester -1/1 Test: OptionTester -Command: "/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/Option_tester" -Directory: /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests -"OptionTester" start time: Jul 15 18:47 CEST +1/2 Testing: UnitTests +1/2 Test: UnitTests +Command: "/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit/Unit_tests" +Directory: /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit +"UnitTests" start time: Jul 16 08:52 CEST Output: ---------------------------------------------------------- [==========] Running 12 tests from 4 test suites. @@ -49,11 +49,29 @@ Output: [==========] 12 tests from 4 test suites ran. (0 ms total) [ PASSED ] 12 tests. -Test time = 1.37 sec +Test time = 0.01 sec ---------------------------------------------------------- Test Passed. -"OptionTester" end time: Jul 15 18:47 CEST -"OptionTester" time elapsed: 00:00:01 +"UnitTests" end time: Jul 16 08:52 CEST +"UnitTests" time elapsed: 00:00:00 ---------------------------------------------------------- -End testing: Jul 15 18:47 CEST +2/2 Testing: IntegrationTests +2/2 Test: IntegrationTests +Command: "/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration/Integration_tests" +Directory: /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration +"IntegrationTests" start time: Jul 16 08:52 CEST +Output: +---------------------------------------------------------- +[==========] Running 0 tests from 0 test suites. +[==========] 0 tests from 0 test suites ran. (0 ms total) +[ PASSED ] 0 tests. + +Test time = 0.01 sec +---------------------------------------------------------- +Test Passed. +"IntegrationTests" end time: Jul 16 08:52 CEST +"IntegrationTests" time elapsed: 00:00:00 +---------------------------------------------------------- + +End testing: Jul 16 08:52 CEST diff --git a/cmake-build-cmake/build.ninja b/cmake-build-cmake/build.ninja index 0b225e6..9b497cd 100644 --- a/cmake-build-cmake/build.ninja +++ b/cmake-build-cmake/build.ninja @@ -133,120 +133,271 @@ build rebuild_cache: phony CMakeFiles/rebuild_cache.util # /Users/anthony/CLionProjects/Option_pricer/CMakeLists.txt # ============================================================================= + +############################################# +# Utility command for Tests + +build tests/Tests: phony tests/CMakeFiles/Tests tests/integration/Integration_tests tests/unit/Unit_tests + + +############################################# +# Utility command for test + +build tests/CMakeFiles/test.util: CUSTOM_COMMAND + COMMAND = cd /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests && /Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/ctest --force-new-ctest-process + DESC = Running tests... + pool = console + restat = 1 + +build tests/test: phony tests/CMakeFiles/test.util + + +############################################# +# Utility command for edit_cache + +build tests/CMakeFiles/edit_cache.util: CUSTOM_COMMAND + COMMAND = cd /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests && /Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. + DESC = No interactive CMake dialog available... + restat = 1 + +build tests/edit_cache: phony tests/CMakeFiles/edit_cache.util + + +############################################# +# Utility command for rebuild_cache + +build tests/CMakeFiles/rebuild_cache.util: CUSTOM_COMMAND + COMMAND = cd /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests && /Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/cmake --regenerate-during-build -S/Users/anthony/CLionProjects/Option_pricer -B/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake + DESC = Running CMake to regenerate build system... + pool = console + restat = 1 + +build tests/rebuild_cache: phony tests/CMakeFiles/rebuild_cache.util + + +############################################# +# Custom command for tests/CMakeFiles/Tests + +build tests/CMakeFiles/Tests | ${cmake_ninja_workdir}tests/CMakeFiles/Tests: CUSTOM_COMMAND tests/unit/Unit_tests tests/integration/Integration_tests || tests/integration/Integration_tests tests/unit/Unit_tests + COMMAND = cd /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests && /Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/ctest -C Debug --output-on-failure + +# ============================================================================= +# Write statements declared in CMakeLists.txt: +# /Users/anthony/CLionProjects/Option_pricer/tests/CMakeLists.txt +# ============================================================================= + # ============================================================================= -# Object build statements for EXECUTABLE target Option_tester +# Object build statements for EXECUTABLE target Unit_tests ############################################# -# Order-only phony target for Option_tester +# Order-only phony target for Unit_tests -build cmake_object_order_depends_target_Option_tester: phony || tests/CMakeFiles/Option_tester.dir +build cmake_object_order_depends_target_Unit_tests: phony || tests/unit/CMakeFiles/Unit_tests.dir -build tests/CMakeFiles/Option_tester.dir/test_main.cpp.o: CXX_COMPILER__Option_tester_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/tests/test_main.cpp || cmake_object_order_depends_target_Option_tester - DEP_FILE = tests/CMakeFiles/Option_tester.dir/test_main.cpp.o.d +build tests/unit/CMakeFiles/Unit_tests.dir/__/test_main.cpp.o: CXX_COMPILER__Unit_tests_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/tests/test_main.cpp || cmake_object_order_depends_target_Unit_tests + DEP_FILE = tests/unit/CMakeFiles/Unit_tests.dir/__/test_main.cpp.o.d FLAGS = -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -fcolor-diagnostics INCLUDES = -I/Users/anthony/CLionProjects/Option_pricer/include -isystem /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/include - OBJECT_DIR = tests/CMakeFiles/Option_tester.dir - OBJECT_FILE_DIR = tests/CMakeFiles/Option_tester.dir + OBJECT_DIR = tests/unit/CMakeFiles/Unit_tests.dir + OBJECT_FILE_DIR = tests/unit/CMakeFiles/Unit_tests.dir/__ -build tests/CMakeFiles/Option_tester.dir/test_market_data.cpp.o: CXX_COMPILER__Option_tester_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/tests/test_market_data.cpp || cmake_object_order_depends_target_Option_tester - DEP_FILE = tests/CMakeFiles/Option_tester.dir/test_market_data.cpp.o.d +build tests/unit/CMakeFiles/Unit_tests.dir/test_market_data.cpp.o: CXX_COMPILER__Unit_tests_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/tests/unit/test_market_data.cpp || cmake_object_order_depends_target_Unit_tests + DEP_FILE = tests/unit/CMakeFiles/Unit_tests.dir/test_market_data.cpp.o.d FLAGS = -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -fcolor-diagnostics INCLUDES = -I/Users/anthony/CLionProjects/Option_pricer/include -isystem /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/include - OBJECT_DIR = tests/CMakeFiles/Option_tester.dir - OBJECT_FILE_DIR = tests/CMakeFiles/Option_tester.dir + OBJECT_DIR = tests/unit/CMakeFiles/Unit_tests.dir + OBJECT_FILE_DIR = tests/unit/CMakeFiles/Unit_tests.dir -build tests/CMakeFiles/Option_tester.dir/test_payoff.cpp.o: CXX_COMPILER__Option_tester_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/tests/test_payoff.cpp || cmake_object_order_depends_target_Option_tester - DEP_FILE = tests/CMakeFiles/Option_tester.dir/test_payoff.cpp.o.d +build tests/unit/CMakeFiles/Unit_tests.dir/test_payoff.cpp.o: CXX_COMPILER__Unit_tests_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/tests/unit/test_payoff.cpp || cmake_object_order_depends_target_Unit_tests + DEP_FILE = tests/unit/CMakeFiles/Unit_tests.dir/test_payoff.cpp.o.d FLAGS = -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -fcolor-diagnostics INCLUDES = -I/Users/anthony/CLionProjects/Option_pricer/include -isystem /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/include - OBJECT_DIR = tests/CMakeFiles/Option_tester.dir - OBJECT_FILE_DIR = tests/CMakeFiles/Option_tester.dir + OBJECT_DIR = tests/unit/CMakeFiles/Unit_tests.dir + OBJECT_FILE_DIR = tests/unit/CMakeFiles/Unit_tests.dir -build tests/CMakeFiles/Option_tester.dir/test_option.cpp.o: CXX_COMPILER__Option_tester_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/tests/test_option.cpp || cmake_object_order_depends_target_Option_tester - DEP_FILE = tests/CMakeFiles/Option_tester.dir/test_option.cpp.o.d +build tests/unit/CMakeFiles/Unit_tests.dir/__/__/src/market_data.cpp.o: CXX_COMPILER__Unit_tests_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/src/market_data.cpp || cmake_object_order_depends_target_Unit_tests + DEP_FILE = tests/unit/CMakeFiles/Unit_tests.dir/__/__/src/market_data.cpp.o.d FLAGS = -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -fcolor-diagnostics INCLUDES = -I/Users/anthony/CLionProjects/Option_pricer/include -isystem /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/include - OBJECT_DIR = tests/CMakeFiles/Option_tester.dir - OBJECT_FILE_DIR = tests/CMakeFiles/Option_tester.dir + OBJECT_DIR = tests/unit/CMakeFiles/Unit_tests.dir + OBJECT_FILE_DIR = tests/unit/CMakeFiles/Unit_tests.dir/__/__/src -build tests/CMakeFiles/Option_tester.dir/__/src/payoff.cpp.o: CXX_COMPILER__Option_tester_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/src/payoff.cpp || cmake_object_order_depends_target_Option_tester - DEP_FILE = tests/CMakeFiles/Option_tester.dir/__/src/payoff.cpp.o.d +build tests/unit/CMakeFiles/Unit_tests.dir/__/__/src/option.cpp.o: CXX_COMPILER__Unit_tests_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/src/option.cpp || cmake_object_order_depends_target_Unit_tests + DEP_FILE = tests/unit/CMakeFiles/Unit_tests.dir/__/__/src/option.cpp.o.d FLAGS = -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -fcolor-diagnostics INCLUDES = -I/Users/anthony/CLionProjects/Option_pricer/include -isystem /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/include - OBJECT_DIR = tests/CMakeFiles/Option_tester.dir - OBJECT_FILE_DIR = tests/CMakeFiles/Option_tester.dir/__/src + OBJECT_DIR = tests/unit/CMakeFiles/Unit_tests.dir + OBJECT_FILE_DIR = tests/unit/CMakeFiles/Unit_tests.dir/__/__/src -build tests/CMakeFiles/Option_tester.dir/__/src/market_data.cpp.o: CXX_COMPILER__Option_tester_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/src/market_data.cpp || cmake_object_order_depends_target_Option_tester - DEP_FILE = tests/CMakeFiles/Option_tester.dir/__/src/market_data.cpp.o.d +build tests/unit/CMakeFiles/Unit_tests.dir/__/__/src/payoff.cpp.o: CXX_COMPILER__Unit_tests_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/src/payoff.cpp || cmake_object_order_depends_target_Unit_tests + DEP_FILE = tests/unit/CMakeFiles/Unit_tests.dir/__/__/src/payoff.cpp.o.d FLAGS = -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -fcolor-diagnostics INCLUDES = -I/Users/anthony/CLionProjects/Option_pricer/include -isystem /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/include - OBJECT_DIR = tests/CMakeFiles/Option_tester.dir - OBJECT_FILE_DIR = tests/CMakeFiles/Option_tester.dir/__/src + OBJECT_DIR = tests/unit/CMakeFiles/Unit_tests.dir + OBJECT_FILE_DIR = tests/unit/CMakeFiles/Unit_tests.dir/__/__/src + -build tests/CMakeFiles/Option_tester.dir/__/src/option.cpp.o: CXX_COMPILER__Option_tester_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/src/option.cpp || cmake_object_order_depends_target_Option_tester - DEP_FILE = tests/CMakeFiles/Option_tester.dir/__/src/option.cpp.o.d +# ============================================================================= +# Link build statements for EXECUTABLE target Unit_tests + + +############################################# +# Link the executable tests/unit/Unit_tests + +build tests/unit/Unit_tests: CXX_EXECUTABLE_LINKER__Unit_tests_Debug tests/unit/CMakeFiles/Unit_tests.dir/__/test_main.cpp.o tests/unit/CMakeFiles/Unit_tests.dir/test_market_data.cpp.o tests/unit/CMakeFiles/Unit_tests.dir/test_payoff.cpp.o tests/unit/CMakeFiles/Unit_tests.dir/__/__/src/market_data.cpp.o tests/unit/CMakeFiles/Unit_tests.dir/__/__/src/option.cpp.o tests/unit/CMakeFiles/Unit_tests.dir/__/__/src/payoff.cpp.o | /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/manual-link/libgmock_main.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/manual-link/libgtest_main.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/libgmock.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/libgtest.a + FLAGS = -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk + LINK_LIBRARIES = /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/manual-link/libgmock_main.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/manual-link/libgtest_main.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/libgmock.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/libgtest.a + OBJECT_DIR = tests/unit/CMakeFiles/Unit_tests.dir + POST_BUILD = : + PRE_LINK = : + TARGET_FILE = tests/unit/Unit_tests + TARGET_PDB = Unit_tests.dbg + + +############################################# +# Utility command for test + +build tests/unit/CMakeFiles/test.util: CUSTOM_COMMAND + COMMAND = cd /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit && /Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/ctest --force-new-ctest-process + DESC = Running tests... + pool = console + restat = 1 + +build tests/unit/test: phony tests/unit/CMakeFiles/test.util + + +############################################# +# Utility command for edit_cache + +build tests/unit/CMakeFiles/edit_cache.util: CUSTOM_COMMAND + COMMAND = cd /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit && /Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. + DESC = No interactive CMake dialog available... + restat = 1 + +build tests/unit/edit_cache: phony tests/unit/CMakeFiles/edit_cache.util + + +############################################# +# Utility command for rebuild_cache + +build tests/unit/CMakeFiles/rebuild_cache.util: CUSTOM_COMMAND + COMMAND = cd /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit && /Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/cmake --regenerate-during-build -S/Users/anthony/CLionProjects/Option_pricer -B/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake + DESC = Running CMake to regenerate build system... + pool = console + restat = 1 + +build tests/unit/rebuild_cache: phony tests/unit/CMakeFiles/rebuild_cache.util + +# ============================================================================= +# Write statements declared in CMakeLists.txt: +# /Users/anthony/CLionProjects/Option_pricer/tests/CMakeLists.txt +# ============================================================================= + +# ============================================================================= +# Object build statements for EXECUTABLE target Integration_tests + + +############################################# +# Order-only phony target for Integration_tests + +build cmake_object_order_depends_target_Integration_tests: phony || tests/integration/CMakeFiles/Integration_tests.dir + +build tests/integration/CMakeFiles/Integration_tests.dir/__/test_main.cpp.o: CXX_COMPILER__Integration_tests_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/tests/test_main.cpp || cmake_object_order_depends_target_Integration_tests + DEP_FILE = tests/integration/CMakeFiles/Integration_tests.dir/__/test_main.cpp.o.d FLAGS = -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -fcolor-diagnostics INCLUDES = -I/Users/anthony/CLionProjects/Option_pricer/include -isystem /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/include - OBJECT_DIR = tests/CMakeFiles/Option_tester.dir - OBJECT_FILE_DIR = tests/CMakeFiles/Option_tester.dir/__/src + OBJECT_DIR = tests/integration/CMakeFiles/Integration_tests.dir + OBJECT_FILE_DIR = tests/integration/CMakeFiles/Integration_tests.dir/__ + +build tests/integration/CMakeFiles/Integration_tests.dir/test_integration_option.cpp.o: CXX_COMPILER__Integration_tests_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/tests/integration/test_integration_option.cpp || cmake_object_order_depends_target_Integration_tests + DEP_FILE = tests/integration/CMakeFiles/Integration_tests.dir/test_integration_option.cpp.o.d + FLAGS = -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -fcolor-diagnostics + INCLUDES = -I/Users/anthony/CLionProjects/Option_pricer/include -isystem /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/include + OBJECT_DIR = tests/integration/CMakeFiles/Integration_tests.dir + OBJECT_FILE_DIR = tests/integration/CMakeFiles/Integration_tests.dir + +build tests/integration/CMakeFiles/Integration_tests.dir/__/__/src/market_data.cpp.o: CXX_COMPILER__Integration_tests_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/src/market_data.cpp || cmake_object_order_depends_target_Integration_tests + DEP_FILE = tests/integration/CMakeFiles/Integration_tests.dir/__/__/src/market_data.cpp.o.d + FLAGS = -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -fcolor-diagnostics + INCLUDES = -I/Users/anthony/CLionProjects/Option_pricer/include -isystem /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/include + OBJECT_DIR = tests/integration/CMakeFiles/Integration_tests.dir + OBJECT_FILE_DIR = tests/integration/CMakeFiles/Integration_tests.dir/__/__/src + +build tests/integration/CMakeFiles/Integration_tests.dir/__/__/src/option.cpp.o: CXX_COMPILER__Integration_tests_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/src/option.cpp || cmake_object_order_depends_target_Integration_tests + DEP_FILE = tests/integration/CMakeFiles/Integration_tests.dir/__/__/src/option.cpp.o.d + FLAGS = -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -fcolor-diagnostics + INCLUDES = -I/Users/anthony/CLionProjects/Option_pricer/include -isystem /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/include + OBJECT_DIR = tests/integration/CMakeFiles/Integration_tests.dir + OBJECT_FILE_DIR = tests/integration/CMakeFiles/Integration_tests.dir/__/__/src + +build tests/integration/CMakeFiles/Integration_tests.dir/__/__/src/payoff.cpp.o: CXX_COMPILER__Integration_tests_unscanned_Debug /Users/anthony/CLionProjects/Option_pricer/src/payoff.cpp || cmake_object_order_depends_target_Integration_tests + DEP_FILE = tests/integration/CMakeFiles/Integration_tests.dir/__/__/src/payoff.cpp.o.d + FLAGS = -g -std=c++20 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -fcolor-diagnostics + INCLUDES = -I/Users/anthony/CLionProjects/Option_pricer/include -isystem /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/include + OBJECT_DIR = tests/integration/CMakeFiles/Integration_tests.dir + OBJECT_FILE_DIR = tests/integration/CMakeFiles/Integration_tests.dir/__/__/src # ============================================================================= -# Link build statements for EXECUTABLE target Option_tester +# Link build statements for EXECUTABLE target Integration_tests ############################################# -# Link the executable tests/Option_tester +# Link the executable tests/integration/Integration_tests -build tests/Option_tester: CXX_EXECUTABLE_LINKER__Option_tester_Debug tests/CMakeFiles/Option_tester.dir/test_main.cpp.o tests/CMakeFiles/Option_tester.dir/test_market_data.cpp.o tests/CMakeFiles/Option_tester.dir/test_payoff.cpp.o tests/CMakeFiles/Option_tester.dir/test_option.cpp.o tests/CMakeFiles/Option_tester.dir/__/src/payoff.cpp.o tests/CMakeFiles/Option_tester.dir/__/src/market_data.cpp.o tests/CMakeFiles/Option_tester.dir/__/src/option.cpp.o | /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/manual-link/libgmock_main.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/manual-link/libgtest_main.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/libgmock.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/libgtest.a +build tests/integration/Integration_tests: CXX_EXECUTABLE_LINKER__Integration_tests_Debug tests/integration/CMakeFiles/Integration_tests.dir/__/test_main.cpp.o tests/integration/CMakeFiles/Integration_tests.dir/test_integration_option.cpp.o tests/integration/CMakeFiles/Integration_tests.dir/__/__/src/market_data.cpp.o tests/integration/CMakeFiles/Integration_tests.dir/__/__/src/option.cpp.o tests/integration/CMakeFiles/Integration_tests.dir/__/__/src/payoff.cpp.o | /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/manual-link/libgmock_main.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/manual-link/libgtest_main.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/libgmock.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/libgtest.a FLAGS = -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk LINK_LIBRARIES = /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/manual-link/libgmock_main.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/manual-link/libgtest_main.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/libgmock.a /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/debug/lib/libgtest.a - OBJECT_DIR = tests/CMakeFiles/Option_tester.dir + OBJECT_DIR = tests/integration/CMakeFiles/Integration_tests.dir POST_BUILD = : PRE_LINK = : - TARGET_FILE = tests/Option_tester - TARGET_PDB = Option_tester.dbg + TARGET_FILE = tests/integration/Integration_tests + TARGET_PDB = Integration_tests.dbg ############################################# # Utility command for test -build tests/CMakeFiles/test.util: CUSTOM_COMMAND - COMMAND = cd /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests && /Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/ctest --force-new-ctest-process +build tests/integration/CMakeFiles/test.util: CUSTOM_COMMAND + COMMAND = cd /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration && /Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/ctest --force-new-ctest-process DESC = Running tests... pool = console restat = 1 -build tests/test: phony tests/CMakeFiles/test.util +build tests/integration/test: phony tests/integration/CMakeFiles/test.util ############################################# # Utility command for edit_cache -build tests/CMakeFiles/edit_cache.util: CUSTOM_COMMAND - COMMAND = cd /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests && /Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +build tests/integration/CMakeFiles/edit_cache.util: CUSTOM_COMMAND + COMMAND = cd /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration && /Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. DESC = No interactive CMake dialog available... restat = 1 -build tests/edit_cache: phony tests/CMakeFiles/edit_cache.util +build tests/integration/edit_cache: phony tests/integration/CMakeFiles/edit_cache.util ############################################# # Utility command for rebuild_cache -build tests/CMakeFiles/rebuild_cache.util: CUSTOM_COMMAND - COMMAND = cd /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests && /Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/cmake --regenerate-during-build -S/Users/anthony/CLionProjects/Option_pricer -B/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake +build tests/integration/CMakeFiles/rebuild_cache.util: CUSTOM_COMMAND + COMMAND = cd /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration && /Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/cmake --regenerate-during-build -S/Users/anthony/CLionProjects/Option_pricer -B/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake DESC = Running CMake to regenerate build system... pool = console restat = 1 -build tests/rebuild_cache: phony tests/CMakeFiles/rebuild_cache.util +build tests/integration/rebuild_cache: phony tests/integration/CMakeFiles/rebuild_cache.util # ============================================================================= # Target aliases. -build Option_tester: phony tests/Option_tester +build Integration_tests: phony tests/integration/Integration_tests + +build Tests: phony tests/Tests + +build Unit_tests: phony tests/unit/Unit_tests # ============================================================================= # Folder targets. @@ -263,7 +414,21 @@ build all: phony Option_pricer tests/all ############################################# # Folder: /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests -build tests/all: phony tests/Option_tester +build tests/all: phony tests/unit/all tests/integration/all + +# ============================================================================= + +############################################# +# Folder: /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration + +build tests/integration/all: phony tests/integration/Integration_tests + +# ============================================================================= + +############################################# +# Folder: /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit + +build tests/unit/all: phony tests/unit/Unit_tests # ============================================================================= # Built-in targets @@ -272,14 +437,14 @@ build tests/all: phony tests/Option_tester ############################################# # Re-run CMake if any of its inputs changed. -build build.ninja: RERUN_CMAKE | /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCXXInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCommonLanguageInclude.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeDependentOption.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeFindDependencyMacro.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeGenericSystem.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeInitializeConfigs.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeLanguageInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeSystemSpecificInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeSystemSpecificInitialize.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckCSourceCompiles.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckIncludeFile.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckLibraryExists.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/AppleClang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/AppleClang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/CMakeCommonCompilerMacros.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/Clang.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/GNU.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindGTest.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindPackageMessage.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindThreads.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/GoogleTest.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Internal/CheckSourceCompiles.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-AppleClang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-AppleClang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Darwin-Initialize.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Darwin.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/UnixPaths.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestConfig.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestConfigVersion.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets-debug.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets-release.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets.cmake /Users/anthony/.vcpkg-clion/vcpkg/scripts/buildsystems/vcpkg.cmake /Users/anthony/CLionProjects/Option_pricer/CMakeLists.txt /Users/anthony/CLionProjects/Option_pricer/tests/CMakeLists.txt CMakeCache.txt CMakeFiles/3.28.1/CMakeCCompiler.cmake CMakeFiles/3.28.1/CMakeCXXCompiler.cmake CMakeFiles/3.28.1/CMakeSystem.cmake +build build.ninja: RERUN_CMAKE | /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCXXInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCommonLanguageInclude.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeDependentOption.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeFindDependencyMacro.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeGenericSystem.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeInitializeConfigs.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeLanguageInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeSystemSpecificInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeSystemSpecificInitialize.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckCSourceCompiles.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckIncludeFile.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckLibraryExists.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/AppleClang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/AppleClang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/CMakeCommonCompilerMacros.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/Clang.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/GNU.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindGTest.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindPackageMessage.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindThreads.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/GoogleTest.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Internal/CheckSourceCompiles.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-AppleClang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-AppleClang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Darwin-Initialize.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Darwin.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/UnixPaths.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestConfig.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestConfigVersion.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets-debug.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets-release.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets.cmake /Users/anthony/.vcpkg-clion/vcpkg/scripts/buildsystems/vcpkg.cmake /Users/anthony/CLionProjects/Option_pricer/CMakeLists.txt /Users/anthony/CLionProjects/Option_pricer/tests/CMakeLists.txt /Users/anthony/CLionProjects/Option_pricer/tests/integration/CMakeLists.txt /Users/anthony/CLionProjects/Option_pricer/tests/unit/CMakeLists.txt CMakeCache.txt CMakeFiles/3.28.1/CMakeCCompiler.cmake CMakeFiles/3.28.1/CMakeCXXCompiler.cmake CMakeFiles/3.28.1/CMakeSystem.cmake pool = console ############################################# # A missing CMake input file is not an error. -build /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCXXInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCommonLanguageInclude.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeDependentOption.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeFindDependencyMacro.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeGenericSystem.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeInitializeConfigs.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeLanguageInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeSystemSpecificInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeSystemSpecificInitialize.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckCSourceCompiles.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckIncludeFile.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckLibraryExists.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/AppleClang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/AppleClang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/CMakeCommonCompilerMacros.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/Clang.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/GNU.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindGTest.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindPackageMessage.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindThreads.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/GoogleTest.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Internal/CheckSourceCompiles.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-AppleClang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-AppleClang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Darwin-Initialize.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Darwin.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/UnixPaths.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestConfig.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestConfigVersion.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets-debug.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets-release.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets.cmake /Users/anthony/.vcpkg-clion/vcpkg/scripts/buildsystems/vcpkg.cmake /Users/anthony/CLionProjects/Option_pricer/CMakeLists.txt /Users/anthony/CLionProjects/Option_pricer/tests/CMakeLists.txt CMakeCache.txt CMakeFiles/3.28.1/CMakeCCompiler.cmake CMakeFiles/3.28.1/CMakeCXXCompiler.cmake CMakeFiles/3.28.1/CMakeSystem.cmake: phony +build /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCXXInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeCommonLanguageInclude.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeDependentOption.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeFindDependencyMacro.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeGenericSystem.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeInitializeConfigs.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeLanguageInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeSystemSpecificInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CMakeSystemSpecificInitialize.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckCSourceCompiles.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckIncludeFile.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/CheckLibraryExists.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/AppleClang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/AppleClang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/CMakeCommonCompilerMacros.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/Clang.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Compiler/GNU.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindGTest.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindPackageMessage.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/FindThreads.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/GoogleTest.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Internal/CheckSourceCompiles.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-AppleClang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-AppleClang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Apple-Clang.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Darwin-Initialize.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/Darwin.cmake /Applications/CLion.app/Contents/bin/cmake/mac/x64/share/cmake-3.28/Modules/Platform/UnixPaths.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestConfig.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestConfigVersion.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets-debug.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets-release.cmake /Users/anthony/.vcpkg-clion/vcpkg/installed/x64-osx/share/gtest/GTestTargets.cmake /Users/anthony/.vcpkg-clion/vcpkg/scripts/buildsystems/vcpkg.cmake /Users/anthony/CLionProjects/Option_pricer/CMakeLists.txt /Users/anthony/CLionProjects/Option_pricer/tests/CMakeLists.txt /Users/anthony/CLionProjects/Option_pricer/tests/integration/CMakeLists.txt /Users/anthony/CLionProjects/Option_pricer/tests/unit/CMakeLists.txt CMakeCache.txt CMakeFiles/3.28.1/CMakeCCompiler.cmake CMakeFiles/3.28.1/CMakeCXXCompiler.cmake CMakeFiles/3.28.1/CMakeSystem.cmake: phony ############################################# diff --git a/cmake-build-cmake/tests/CTestTestfile.cmake b/cmake-build-cmake/tests/CTestTestfile.cmake index 45ff149..08e3006 100644 --- a/cmake-build-cmake/tests/CTestTestfile.cmake +++ b/cmake-build-cmake/tests/CTestTestfile.cmake @@ -4,5 +4,5 @@ # # This file includes the relevant testing commands required for # testing this directory and lists subdirectories to be tested as well. -add_test([=[OptionTester]=] "/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/Option_tester") -set_tests_properties([=[OptionTester]=] PROPERTIES _BACKTRACE_TRIPLES "/Users/anthony/CLionProjects/Option_pricer/tests/CMakeLists.txt;21;add_test;/Users/anthony/CLionProjects/Option_pricer/tests/CMakeLists.txt;0;") +subdirs("unit") +subdirs("integration") diff --git a/cmake-build-cmake/tests/cmake_install.cmake b/cmake-build-cmake/tests/cmake_install.cmake index d1d24dc..6607cbd 100644 --- a/cmake-build-cmake/tests/cmake_install.cmake +++ b/cmake-build-cmake/tests/cmake_install.cmake @@ -37,3 +37,13 @@ if(NOT DEFINED CMAKE_OBJDUMP) set(CMAKE_OBJDUMP "/Library/Developer/CommandLineTools/usr/bin/objdump") endif() +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for the subdirectory. + include("/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit/cmake_install.cmake") +endif() + +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for the subdirectory. + include("/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration/cmake_install.cmake") +endif() + diff --git a/project_struct.txt b/project_struct.txt index 2c173ce..512354f 100644 --- a/project_struct.txt +++ b/project_struct.txt @@ -1,3 +1,4 @@ +(base) anthony@MacBook-Air-de-anthony-2 Option_pricer % tree . ├── CMakeLists.txt ├── README.md @@ -134,6 +135,7 @@ │   │   ├── test.cpp.o │   │   ├── test_main.cpp.o │   │   ├── test_market_data.cpp.o +│   │   ├── test_option.cpp.o │   │   └── test_payoff.cpp.o │   ├── CTestTestfile.cmake │   ├── Option_tester @@ -187,19 +189,18 @@ │   ├── option.h │   └── payoff.h ├── main.cpp -├── main_example.cpp -├── option_former.cpp -├── option_former.h -├── option_pricer_description.docx -├── option_tests_former.cpp +├── project_struct.txt ├── src │   ├── market_data.cpp │   ├── option.cpp │   └── payoff.cpp -├── tests -│   ├── CMakeLists.txt -│   ├── test_main.cpp -│   ├── test_market_data.cpp -│   ├── test_option.cpp -│   └── test_payoff.cpp -└── ~$tion_pricer_description.docx +└── tests + ├── CMakeLists.txt + ├── config + │   ├── mock_classes.h + │   └── test_support.h + ├── test_main.cpp + └── unit + ├── test_market_data.cpp + ├── test_option.cpp + └── test_payoff.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1ed2f0f..5106458 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,38 +1,12 @@ -# Find Google Test -find_package(GTest REQUIRED) +# Top-level CMake configuration for tests +enable_testing() -# Define the test executable -add_executable(Option_tester - test_main.cpp - unit/test_market_data.cpp - unit/test_payoff.cpp - config/mock_classes.h - config/test_support.h - unit/test_option.cpp - ../src/payoff.cpp - ../src/market_data.cpp - ../src/option.cpp -) - -# Link Google Test and Google Mock to the test executable -target_link_libraries(Option_tester GTest::GTest GTest::Main GTest::gmock_main) - -# Registers the Option_tester executable as a test with CTest -add_test(NAME OptionTester COMMAND Option_tester) +# Add subdirectories for unit and integration tests +add_subdirectory(unit) +add_subdirectory(integration) -# clang-tidy integration -find_program(CLANG_TIDY_EXECUTABLE NAMES clang-tidy) -if(CLANG_TIDY_EXECUTABLE) - set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_EXECUTABLE};-checks=*,-clang-analyzer-alpha.*") -endif() - -# clang-format integration (target to check formatting) -#add_custom_target(clang-format-check -# COMMAND find ${CMAKE_SOURCE_DIR} -name '*.cpp' -o -name '*.h' | xargs clang-format -i -#) - -# Code coverage integration (optional) -#if (CMAKE_BUILD_TYPE STREQUAL "Coverage") -# target_compile_options(Option_tester PRIVATE --coverage) -# target_link_libraries(Option_tester PRIVATE --coverage) -#endif() \ No newline at end of file +# Custom target to run all tests at once using CTest +add_custom_target(Tests + COMMAND ${CMAKE_CTEST_COMMAND} -C $ --output-on-failure + DEPENDS Unit_tests Integration_tests +) diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..c2b36ff --- /dev/null +++ b/tests/README.md @@ -0,0 +1,110 @@ +# Tests Directory + +This directory contains all the test files and configurations for the Option Pricer project. The tests are organized to ensure modularity, clarity, and ease of maintenance. + +## Directory Structure +```plaintext +tests +├── CMakeLists.txt +├── README.md +├── config +│   ├── mock_classes.h +│   └── test_support.h +├── test_main.cpp +├── unit +│ ├── CMakeLists.txt +│   ├── test_market_data.cpp +│   ├── test_option.cpp +│   └── test_payoff.cpp +└── integration + ├── CMakeLists.txt + └── test_integration_option.cpp + +``` + +## Dependencies + +- [Google Test (GTest)](https://github.com/google/googletest): A popular C++ testing framework. +- [Google Mock](https://github.com/google/googletest/tree/main/googlemock): A library for writing and using C++ mock classes. + +## Building and Running Tests + +### Prerequisites +Make sure you have CMake and GTest installed. You can install GTest using a package manager or +through [vcpkg](https://github.com/microsoft/vcpkg). + +### Build Instructions + +1. **Navigate to the project root directory**: + ```sh + cd path/to/your/project + ``` +2. **Create a build directory**: + ``` + mkdir build && cd build + ``` +3. **Configure the project with CMake**: + ``` + cmake .. + ``` +4. **Build the project**: + ``` + make + ``` +### Running tests +After building the project, you can run the tests using CTest: +``` +ctest --output-on-failure +``` +Alternatively, you can run specific tests: +- **Run all Tests**: +``` +ctest -R AllTests --output-on-failure +``` +- **Run only Unit Tests**: +``` +ctest -R UnitTests --output-on-failure +``` +- **Run only Integration Tests**: +``` +ctest -R IntegrationTests --output-on-failure +``` + +## Adding New Tests + +### Create a new test file: +Add your test file in the appropriate directory. +For example, to add unit tests for a new module, place the file in the `unit` directory. +For integration tests, place the file in the `integration` directory + +### Include the test in CMake: +Edit the `CMakeLists.txt` file to include your new test file in the `add_executable` and `target_link_libraries` sections. + +### Write Test Cases: +Use GTest and Google Mock to write your test cases. Refer to the [GTest documentation](https://github.com/google/googletest/blob/main/googletest/docs/primer.md) for more details. + +## Directory Overview + +### `config` +- **mock_classes.h**: Contains mock classes used in testing. These mocks simulate the behavior of real classes to isolate the functionality being tested. +- **test_support.h**: Additional utilities and support functions for tests. + +### `unit` +- **CMakeLists.txt**: CMake configuration for unit tests. +- **test_market_data.cpp**: Unit tests for the Market Data module. +- **test_option.cpp**: Unit tests for the Option module. +- **test_payoff.cpp**: Unit tests for the Payoff module. + +### `integration` +- **CMakeLists.txt**: CMake configuration for integration tests. +- **test_integration_option.cpp**: Integration test for interaction between `option.h`, `market_data.h` and `payoff.h` + +### `CMakeLists.txt` +CMake configuration for running all the tests. + +### `test_main.cpp` +This is the main entry point for running the tests. +It initializes the Google Test framework and runs all the test cases defined in the `unit` and `integration`directory. + +## Contact +For any questions or contributions, please contact Anthony Makarewicz at [anthonymakarewicz@gmail.com]. diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt new file mode 100644 index 0000000..67bff69 --- /dev/null +++ b/tests/integration/CMakeLists.txt @@ -0,0 +1,37 @@ +# Integration tests configuration +find_package(GTest REQUIRED) + +add_executable(Integration_tests + ${CMAKE_CURRENT_SOURCE_DIR}/../test_main.cpp + test_integration_option.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../../src/market_data.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../../src/option.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../../src/payoff.cpp +) + +target_link_libraries(Integration_tests GTest::GTest GTest::Main GTest::gmock_main) +# Register the tests for running with CTest +add_test(NAME IntegrationTests COMMAND Integration_tests) + +#[[ +# clang-tidy integration +find_program(CLANG_TIDY_EXECUTABLE NAMES clang-tidy) +if(CLANG_TIDY_EXECUTABLE) + set_target_properties(Integration_tests PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_EXECUTABLE};-checks=*,-clang-analyzer-alpha.*") +endif() +]] + +#[[ +# clang-format integration (target to check formatting) +add_custom_target(clang-format-check + COMMAND find ${CMAKE_SOURCE_DIR} -name '*.cpp' -o -name '*.h' | xargs clang-format -i +) +]] + +#[[ +# Code coverage integration (optional) +if (CMAKE_BUILD_TYPE STREQUAL "Coverage") + target_compile_options(Integration_tests PRIVATE --coverage) + target_link_libraries(Integration_tests PRIVATE --coverage) +endif() +]] \ No newline at end of file diff --git a/tests/integration/test_integration_option.cpp b/tests/integration/test_integration_option.cpp new file mode 100644 index 0000000..4daacf1 --- /dev/null +++ b/tests/integration/test_integration_option.cpp @@ -0,0 +1,8 @@ +#ifndef TEST_INTEGRATION_OPTION_CPP +#define TEST_INTEGRATION_OPTION_CPP + + + + + +#endif //TEST_INTEGRATION_OPTION_CPP \ No newline at end of file diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt new file mode 100644 index 0000000..78a3fc5 --- /dev/null +++ b/tests/unit/CMakeLists.txt @@ -0,0 +1,41 @@ +# Unit tests configuration +find_package(GTest REQUIRED) + +add_executable(Unit_tests + ${CMAKE_CURRENT_SOURCE_DIR}/../test_main.cpp + test_market_data.cpp + #test_option.cpp + test_payoff.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../config/mock_classes.h + ${CMAKE_CURRENT_SOURCE_DIR}/../config/test_support.h + ${CMAKE_CURRENT_SOURCE_DIR}/../../src/market_data.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../../src/option.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../../src/payoff.cpp +) + +target_link_libraries(Unit_tests GTest::GTest GTest::Main GTest::gmock_main) +# Register the tests for running with CTest +add_test(NAME UnitTests COMMAND Unit_tests) + +# clang-tidy integration +#[[ +find_program(CLANG_TIDY_EXECUTABLE NAMES clang-tidy) +if(CLANG_TIDY_EXECUTABLE) + set_target_properties(Unit_tests PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_EXECUTABLE};-checks=*,-clang-analyzer-alpha.*") +endif() +]] + +#[[ +# clang-format integration (target to check formatting) +add_custom_target(clang-format-check + COMMAND find ${CMAKE_SOURCE_DIR} -name '*.cpp' -o -name '*.h' | xargs clang-format -i +) +]] + +#[[ +# Code coverage integration (optional) +if (CMAKE_BUILD_TYPE STREQUAL "Coverage") + target_compile_options(Unit_tests PRIVATE --coverage) + target_link_libraries(Unit_tests PRIVATE --coverage) +endif() +]] \ No newline at end of file diff --git a/tests/unit/test_payoff.cpp b/tests/unit/test_payoff.cpp index 4d5053e..438db1a 100644 --- a/tests/unit/test_payoff.cpp +++ b/tests/unit/test_payoff.cpp @@ -3,7 +3,7 @@ #include #include -#include "payoff.h" +#include "../../include/payoff.h" // Test fixture for PayoffSingleStrike classes class PayoffSingleStrikeTest : public ::testing::Test {