You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
726 B
23 lines
726 B
add_library(MathFunctions MathFunctions.cxx)
|
|
|
|
# TODO 1: State that anybody linking to MathFunctions needs to include the
|
|
# current source directory, while MathFunctions itself doesn't.
|
|
# Hint: Use target_include_directories with the INTERFACE keyword
|
|
|
|
# should we use our own math functions
|
|
option(USE_MYMATH "Use tutorial provided math implementation" ON)
|
|
if (USE_MYMATH)
|
|
target_compile_definitions(MathFunctions PRIVATE "USE_MYMATH")
|
|
|
|
# library that just does sqrt
|
|
add_library(SqrtLibrary STATIC
|
|
mysqrt.cxx
|
|
)
|
|
|
|
# TODO 7: Link SqrtLibrary to tutorial_compiler_flags
|
|
|
|
target_link_libraries(MathFunctions PUBLIC SqrtLibrary)
|
|
endif()
|
|
|
|
# TODO 6: Link MathFunctions to tutorial_compiler_flags
|