Skip to content
Snippets Groups Projects
Commit df518e1c authored by William Fledelius's avatar William Fledelius
Browse files

Main.cpp to src linking fixed, tests still broken

parent 5a075e11
No related branches found
No related tags found
No related merge requests found
cmake_minimum_required(VERSION 3.25)
project(BioinformatikProjekt)
# Set architecture to ARM on Mac
set(CMAKE_OSX_ARCHITECTURES "arm64")
# Set the C++ standard
set(CMAKE_CXX_STANDARD 20)
# Specify source files for the main executable
set(SOURCE_FILES main.cpp)
# Create the main executable target
add_executable(main_run ${SOURCE_FILES})
enable_testing()
add_subdirectory(src)
# Include directories
include_directories(src)
include_directories(test)
add_executable(main_run ${SOURCE_FILES})
target_link_libraries(main_run HPModel)
target_link_libraries(main_run PUBLIC HPModel)
# Include subdirectories for building
add_subdirectory(src)
add_subdirectory(test)
\ No newline at end of file
# Define the source files for the HPModel library
set(SOURCE_FILES HPModel.cpp)
# Create a library target for HPModel
add_library(HPModel STATIC ${SOURCE_FILES})
# Specify the include directory for this library
target_include_directories(HPModel PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -31,9 +31,6 @@ public:
// HPModel class declaration
class HPModel {
public:
// Constructor
HPModel();
// Member functions
void addPoint(DIRECTION direction, bool isHydrophobic);
void toString() const;
......
# Include directories for GTest
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
# Add the test executable
add_executable(runBasicHPFoldTests basic_check.cpp)
# Link the Google Test libraries
target_link_libraries(runBasicHPFoldTests gtest gtest_main)
target_link_libraries(runBasicHPFoldTests src_lib gtest_main)
target_link_libraries(runBasicHPFoldTests HPModel gtest_main)
# Link the src_lib library target to the test executable
target_link_libraries(runBasicHPFoldTests src_lib)
target_link_libraries(runBasicHPFoldTests HPModel)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment