mirror of
https://github.com/Kitware/CMake.git
synced 2026-07-04 13:47:54 +00:00
Propagate the refactor in Step 10 MathFunctions through all of the steps. Use MathFunctions/MathFunctions.cxx instead of Tutorial.cxx to determine which sqrt library is called. Adds .h files which correspond to their .cxx files by name.
12 lines
457 B
CMake
12 lines
457 B
CMake
add_library(MathFunctions MathFunctions.cxx mysqrt.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")
|
|
endif()
|