File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1- # Define executable and its properties
1+ # ---- Define executable ----
2+
23add_executable (Application App.cpp)
34target_link_libraries (Application PRIVATE Core)
4- set_target_properties (Application PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /Application)
55install (TARGETS Application)
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ set(LIBRARY_SOURCES
1010 ${SRCROOT} /Lib.cpp
1111)
1212
13- # Define library and its properties
13+ # ---- Define library ----
1414add_library (Core ${LIBRARY_HEADERS} ${LIBRARY_SOURCES} )
1515target_include_directories (Core PUBLIC ${PROJECT_SOURCE_DIR} /library/include )
1616target_compile_features (Core PUBLIC cxx_std_17)
Original file line number Diff line number Diff line change 1+ # ---- Dependencies ----
2+
13include (Catch)
24set (CMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE PRE_TEST)
35
6+ # ---- Define executable ----
7+
48add_executable (CoreTests ${PROJECT_SOURCE_DIR} /library/test /Tests.cpp)
59target_link_libraries (CoreTests PRIVATE Core Catch2::Catch2WithMain)
610target_compile_features (CoreTests PRIVATE cxx_std_17)
7- set_target_properties (CoreTests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /Core/Tests)
11+
12+ # ---- Tests ----
13+
814catch_discover_tests(CoreTests WORKING_DIRECTORY $<TARGET_FILE_DIR:Core>)
You can’t perform that action at this time.
0 commit comments